How to avoid reverse engineering of an apk build with Appcelerator? - titanium

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.

Related

Can I make react native project without using android studio?

I'm using onedrive from my school, and unfortunately I made my name of onedrive in korean(my country language). And It made lots of error in Android studio.. I can't start my react-native project since 2 weeks ago. Is it unpossible to make React-Native without Android Studio?
If It's not possible, I would buy another onedrive..
I don't know what you have tried already, but you might try Expo. It lets you test your apps on a real device by scanning a QR code with the Expo Go Mobile App without manual building for iOS or Android.
This article has some useful steps.
The official Website his here.
I also recommend not using OneDrive (if possible). You should use a source control provider like GitHub to store and save your code. This will solve all your problems with OneDrive, and it is free. It will also let you use Android Studio as long as your folders and files have their names in Latin/ASCII characters.
If you use OneDrive, you will run into problems with huge files taking up all of your storage after you build your app for the first time.

how to add ios support for existing React Native application with only Android support?

I know it might be very basic question. But I am very new and got a codebase with only android support. I need to add iOS for it. Please help me
As you're aiming to build a cross-platform app, React Native provides two ways to organize the code and seperate it by platform: platform module or platform-specific file extensions.
As you already have an Android app, I assume it has more complexity so you might want to split the code out into separate files.
You say you have an Android app but i don't thing that at any point you specified that the app should only build for Android (you can review in the package and the project configuration). So, the following command should be enough:
react-native run-ios
If you created your react native app from a template (e.g. using npx react-native init ProjectName), it already provides an ios and android folder, so it already supports it. If the file is not there, you could follow the instructions that #Rajan shared above to recreate the ios folder.
If your problem is running the iOS application using npm run ios, and its failing to build or the javascript throws an error, the quickest thing to try is cd ios, then pod install. If this does not work, it might be because you have additional dependencies you have installed, which require specific instructions and configuration to be done in the ios folder. This is library dependent, if needed, will be explained in depth in the README.md of the library. For example, react-native-firebase has a lot of steps, and is different to the android configuration.
Sometimes it is helpful to modify these configurations in XCode instead of editing the files manually (e.g. plist, xml, xproj). You can open xcode quickly using xed ios when in the root project folder.
Note: As usual, remember to have the libraries available in the node_modules folder, npm install.
In the future, you might choose to run different javascript code based on the platform (platform-specific code). React native allows that by using file.android.js and file.ios.js. However, your IDE is likely to struggle with the 2 files, and won't be as helpful compared to file.js. Alternatively, you can import Platform and conditionally check at runtime, what your platform is.
If you used Expo, you don't have access to the native code, but will already support iOS.

How to fix optimazition error publish in play store

my apk is 1.4MB but error is "This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower install success rates and take up storage on users' devices."
how to fix this error
It's only a warning, not an error.
For an app that small I wouldn't worry.
It's not something that's made its way into the Ionic ecosystem yet but I heard that if you open up your project in Android Studio and then do the build through there you can create an app bundle.
I'm not totally sure that its fully tested for Ionic so you might have issues with this, but Android have published a full guide:
https://developer.android.com/guide/app-bundle#get_started
This is what they say:
Download Android Studio 3.2 or higher—it's the easiest way
to add dynamic feature modules and build app bundles.
Add support for Dynamic Delivery
by including a base module, organizing code and resources for configuration
APKs, and, optionally, adding dynamic feature modules.
Build an Android App Bundle using Android Studio.
If you're not using the IDE, you can instead build an app bundle from the
command line.
Test your Android App Bundle by using it to generate APKs that
you deploy to a device.
Enroll into app signing by Google Play.
Otherwise, you can't upload your app bundle to the Play Console.
Publish your app bundle to Google Play.

Upload a prebuilt file to Crashlytics

I am trying to automate our build/release process. I am specifically concerned with the Android app at the moment, but I may also need to extend similar support for our iOs app.
Until now, all uploads to Crashlytics have been triggered with crashlyticsUploadDistributionRelease. However we are now building and testing the apk first, then looking to upload that same pre-built apk to Crashlytics. The new process means we need a way of uploading the apk to Crashlytics directly, without having any dependencies on rebuilding or being within the project's directory.
I can see that I can do this through Android Studio by dragging and dropping the apk. Is there a command line tool or script that I can use to automate something similar from our build machine?
This operation is not currently supported. See my comment above for the response from the Crashlytics team

AIR Google Play Services library classes missing apk

I am working on a test app to test an ane I have built with Google Play Services included. I had things working fine, but recently I updated the version of the Google Play Services library I was using, and now when I built the project in Adobe Flash CC, it seems to be stripping out the Google Play Services classes from the apk. When I decompile the apk I can see they are missing. When I put back the old version of GPlay, I can see it doesn't strip them out.
This post mentions a tool within the AIR needs updating (dx.jar) and this post seems to have the same message. I did update that file but it did not fix the issue.
Thanks!
The problem will be with the AIR SDK. You need to update the dx.jar in your AIR SDK, I've logged an issue with Adobe about this but they haven't updated the build tools as yet so we have to do it manually:
Have a look here for the details: http://airnativeextensions.com/knowledgebase/tutorial/5
It's important that you have a recent version of the Android SDK installed and updated for this to work.
Also rather than packaging the Google Play Libraries into your ANE I suggest you use a shared ANE, like this one:
https://github.com/distriqt/ANE-googleplayservices
Otherwise you can cause conflicts with other ANE's that use the Google Play Library.