How to fix optimazition error publish in play store - ionic4

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.

Related

Expo release channels and project folder

I am using Expo’s managed workflow. My app uses google authentication to sign in. During development I was using the Expo client for android and as per the docs I used 'Expo.Google' to achieve google authentication and it worked as intended.
After developing the app, I built a staging version of my app (standalone app) by typing 'expo build:android -t apk --release-channel staging-v1' in my project directory. After the build was finished, I downloaded and installed the apk on my android phone. Only then I realized that I didn’t change 'Expo.Google' to 'GoogleSignIn' which is required for standalone apps.
I can change that in my project files and then publish it to the staging-v1 channel. I think this would make google authentication work in the standalone app but it would also change my project files and then it won’t work in the Expo client. So, do I need to create and maintain two different project folders which would basically be the same except for the google authentication part? In general, how should I manage the channels and the corresponding project files?

React Native application deployment

I have already developed a React native application on my mac book, this is myfirst application. I want to deploy it to iPhone so that I can test it. I don't want to put it on appstore yet. I am not sure how to compile the application and get it ready to put it on iPhone. I tried this web site
https://www.diawi.com/, but not sure which .ipa or a.pk file, I need to upload. I can also try using expo, but not sure how to use it. Can anyone give me step by step instruction on how to upload this application on iPhone.
any help will be greatly appreciated.
For iPhone
For react-native-init you will probably need Apple developer account to test your app on your phone
Since you are using react-native-init, You should checkout this article by Facebook
https://facebook.github.io/react-native/docs/running-on-device
In the second point, it says Register for an Apple developer account if you don't have one yet
For create-react-native-app you need to do following
Download expo client from App store
Scan the QR code expo generate when you run your app using terminal (npm run start in terminal )
Note: Both Laptop and your phone should be on the same network
According to this thread, You can't use expo with react-native-init but alternatively you can create an expo project using create-react-native-app and then copy, paste files from your init project
For Android
For running your App on Android, You can directly generate/build an apk, send it to your device and just open it to see how it works (In Android you don't need a console or developer account to run your app)
Again, Open this link https://facebook.github.io/react-native/docs/running-on-device
And click on Android Tab to see how you can generate an Apk

Is it possible to compile a react-native app for android with an offline pc

Upon trying my first react-native android app with a win 10 pc, after entering the command react-native run-android, the compiler downloads a lot of files gradle-**-all and some *.pom files before finally deploying the app. i'm in a country with expensive data bundles so i want to ask:
Does this happen for every project, or every compile ?
If yes, are there workarounds ?
Because i need to be able to develop apps while offline.

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

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).