Upload a prebuilt file to Crashlytics - 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

Related

Impossible to update expo project inside Expo Go after switching to EAS Build

I have the need to run a project from Expo Go without being connected to PC. We are developing an app that require GPS and needs to be tested in open field.
Before EAS became the standard to create projects i used
expo build:android
ad this created not only the apk, but uploaded the project to my account and i was able to start it from Expo Go projects section just like the app was installed on phisical device. That worked also fo iOS and was a great testing feature.
After i moved to EAS Build
eas build -p android --profile preview --clear-cache
my project inside Expo Go does not update anymore and its stucked at sdk 44 even if now i'm working (and creating builds) with sdk 46.
I went through the official documentation many times but i don't get how to make the app start from Expo Go (project sction) as i did before. Maybe i'm missing some configuration.
Thank you all for any kind reply.
Have a good day.
EDIT
I found the solution to this problem and now my builds are working and uploading to Expo Go.
Check out this information: https://github.com/expo/fyi/blob/main/eas-build-archive.md
Basically EAS Updates will not bundle anything inside your .gitignore, in my case it needed specific config files. Did a quick test by taking them off the .gitignore and now it's working. Will move to GitHub SECRETS in the future.
Hope that helps.

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.

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

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.

Tips/help to debug no apk file

My environment :
Eclipse sdk 3.7.2
Worklight pluin 5.0.5
Android sdk 2.2
First I tried a simple Hello World, everything works fine, android native project was created and I see the corresponding apk file was generated after a build and deploy.
Next I imported a sample project, successfully got it run on the test (localhost) server, able to see the expected result on the android Mobile Browser Simulator but the problem now is I am not seeing the corresponding android apk file got generated (the android native project was created). No errors on the logs, Any idea what could be the problem? How one debug such a problem.
APK will be generated under \bin\ folder once you run your app for the first time.
Connect your Android device to dev machine via USB cable (assuming you got Android SDK etc installed), right click on Android project and do Run as->Android app.
The app will be installed and started on Android device. APK will be generated in \bin folder.
In general, you don't need the device, same thing can be done with emulator.
You can also do an export on the android application project. This is what you would do if you are looking at doing some key signing. This is the way you would want to export it if you are uploading to Google play or an enterprise app store.
Keep in mind, Worklight doesn't build your .ipa, .apk, or etc. It builds you compile ready resources. It will build you the folder structure and the project layers needed to build in the corresponding Native Environment (for apple, you would export to xcode, build it, and run).