I am using barcode scanner module on my Titanium Android app to scan barcode. However, because of this library my app is requesting too many permissions from users which include READ_HISTORY_BOOKMARKS and WRITE_CONTACT. Obviously this is unnecessary and too intrusive for end-users.
Is there any way that I can remove some of the permissions?
I have already tried editing custom AndroidManifest file. But it always adds back those permissions in the .gen file.
You are working with Titanium to build the app. Androidmanifest is not used by Titanium. It perhaps is generated by Titanium, but not used.
You need to edit the Tiapp.xml file, and remove the permissions you don't need from there. This way, it should not come back.
But as Sean Owen suggested, don't copy-paste an app, and use it for own purposses. If you just need a module, implement the module yourself, and use it from there.
You can maintain a custom Manifest file in Titanium, by taking the generated Manifest file and paste it into the tiapp.xml. Titanium will use that one everytime instead of the generated one. Read more on how this works here http://developer.appcelerator.com/doc/mobile/android-custom-androidmanifest
Related
I know we can't use SVG directly in RN, but we can convert it to .ttf. My question is how can we use those TTF files without installing react-native-vector-icons and similar libraries? All tutorials I could find on Google involve installing such libraries, but I'm not allowed to use them in my project. I'm not allowed to implement any solution that requires changes in the android or iOS folders.
What do I know so far?
Well, I can go to fontello.com and convert any SVG icon to .ttf. It'll generate a folder containing the font file and also a config.json file.
What I don't know?
I don't know how to use the files generated by Fontello to display the icon without the help of any library.
Answering my own question, you can put the TTF files inside android/app/src/assets/fonts and use them directly as a font family name. The problem is that I'm creating an NPM package, so it's not a suitable solution. So I discovered that react-native-svg doesnt'need any special configuration, and you can use the XML code directly by importing SvgXml from the library.
I created a mobile app by expo (react native), I would like to display profile image, knowing that the images are located outside my project.
when I want to access any image I do not get there, and I get this type of error
"SHA-1 for file (D:\Workspace\ImagesProfile\images3.jpg) is not computed".
this is the hierarchy of my workspace.
-Workspace
--ImagesProfile
--Myproject
Pleace how can we solve this problem?
The way the react-native packager works right now, it's just going to scan the roots of your project and below when creating the JavaScript bundle, so it will be really hard to do this.
You basically just need to put the files under the root of your directory. There are some tools out there for syncing files from another directory into a directory under the root so you could use one of those if you really need to.
Some people are working on ways to make symlinks work with this. Notably, you might look at Haul from Callstack. https://github.com/callstack-io/haul But that isn't integrated into Expo yet.
Okay at first you should understand what you are doing. You're creating a react native application, which means this application is running on external devices and not on your PC. Your simulator or expo client running your application encapsulated from your PC using only project files. When you wanna use external images in your application you need to host them. You can create a local docker instance as image server ( e.g. an express application with a static folder ).
To make it clear, it's not possible to use images inside your filesystem which are not a part of your react native application. You can use external image server like "imgbb" for test purposes, but it's not recommended to use them in your final version.
Happy Coding!
I have created a react-native app using expo. Now I am looking for share-extension to the app to import CSV data from email attachment to my app.
I have tried npm package but that does not work for me(I was not able to build my project with that npm package in Xcode)
I think react-native or expo does not have any share API
In this picture, you can see how he got the option to import data into the app.
I understand that without share extension API, I think react-native and Expo both are useless because you can create the app but you don't expand it.
Looking for the solution or any other alternate solution.
I'm afraid this is not possible with expo.
First of all, are you looking for a way to create your own extension, or do you just want your app to be in the "open with list" that you have in the screenshot on the right? (Sharing and "open with" are two distinct things.)
If you just want your app to be listed in the standard "open with list", you do not need to use github.com/alinz/react-native-share-extension since it serves a different purpose. To quote the repo:
This is a helper module which brings react native as an engine to drive share extension for your app.
So with the package you can use react native to create your own share extension
To get your app into the "open with list", you need to go to target settings and change it according to the screenshot (example for MS word). Read more about it here. However, I'm afraid you won't be able to do this with expo without ejecting.
How to get the url of the file in react-native? You need to make sure that libRCTLinking.a is in the Link Binary with Libraries in Xcode (it'll probably be there already). And then you can follow the docs and call Linking.getInitialURL to get the file url. Then it really depends on what you want to do with the file. If you need something complicated, you'll likely need to write native code. If you just want to upload the file to some server, then you can make use of blob support that was added to RN 0.54 in this commit. An example of how to use the blob support is here.
I am developing a schedule app using Appcelerator, and I want to prevent a hacker from accessing any resources, assets or source code from the APK file.
If someone changes the .apk extension to .zip then they can unzip it and easily access all the app's resources and assets, and using dex2jar and a Java decompiler, they can also access the source code. It's very easy to reverse engineer an Android APK file.
Is there any functionality available in titanium SDK that prevent reverse engineering? I am using Titanium SDK Version 3.4.1.GA I tried following code but nothing works
<property name="ti.deploytype">distribution</property>
<property name="ti.android.compilejs" type="bool">true</property>
You'll drive yourself crazy trying to protect your code from someone determined to get into it. Generally, Appcelerator is getting you the ability to convert your code from JavaScript into something that resembles a mix of native with JavaScript controlling logic. If the Android platform doesn't accomplish what you want, I don't believe Appcelerator is attempting to do it either. I believe the JavaScript that doesn't get turned into native code is being obfuscated. I'm pretty sure that the Appcelerator project gets turned into an Android project. Perhaps you'll want to look for protections at that level and compile your app with the Android SDK tools.
I tried to remove an iOS8 today view extension from my iOS App in Xcode6, but somehow the extension is still built and always appearing on the device. I removed both the extensions files from the project as well as the build target. I also removed the application multiple times but the widget is still always copied whenever I build the application.
If you want to keep the sourcecode and only remove the today widget:
go to your app target into your project file
select General -> Embedded binaries
remove the TodayWidgetName.appex file with the minus button
do a clean
If you compile or archive you should not see any longer the today widget appearing in the iOS notification center.
I finally found a solution: in the menu go to Product > Clean and the extensions that are not used or built anymore are gone!
Apparently, there is a way of removing embedded binaries from compiled IPA package if you don't want to recompile. Obviously, after altering the package you'll have to resign it.
This is where embedded binaries are placed:
Payload > .app > PlugIns > .appex
I've tried removing the PlugIns and resigning the whole bundle - seems to be working well.