IPA file size on IBM Mobile First - ibm-mobilefirst

I'm using MobileFirst PLatform 7.1 for mobile app development and I generate an Android and iOS enviroment with it. I generate the apk and ipa file for distribution and the apk file its a 10 MB file but the ipa file is over 43 MB... a huge difference!!. Both applications have the same common files and they don't have any native specific code. How can I reduce the ipa file?
Thanks

Some things to look at:
Remove any unused code and libraries from the project
Remove unusedgenerated images from the native\resources folder or run them through pngcrush and alike
If using 3rd party libraries check if there are minified versions of them
Enable concatenation and minification: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.dev.doc/devref/c_optimizing_apps_build_settings.html

Related

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.

Is it possible to covert swf to apk and ipa file using AIR SDK?

I use FlashDevelop to make game using HaxeFlixel which handles multi-resolution and touch.
I've downloaded the merged SDK of Flex and AIR SDK but have no clue to convert.
I can easily compile to apk only if I download the Android SDK, NDK which use up more than 1 GB of space.
I read somewhere says that I need AIR SDK to compile to iPad file.
I want to use only AIR SDK to compile to both apk (without Android DK things) and ipa file.
I hope I'm not missing something here, but why are you trying to convert swf to apk when you can compile targeting directly to iOS target?
The whole point of using Haxe, is that you can target to misc platforms, including iOS, by
Exporting native code (Objective-C for iOS)
Compiling the exported native code, (using Hxcpp and Xcode for iOS)
The major advantage for compiling native code. is that after the compilation, your application will run much faster, better optimised for the targeted device, and way more reliably, compared to a converted swf.
For iOS targets, a full Xcode project will be created for you, so you can even use the Xcode's tools to test your app
more info about targeting to iOS on HaxeFlixel's docs

Worklight: Do the legal documents gets installed with the app?

Environment: Worklight 6.1.0.2
We have created a hybrid app using Worklight 6.1 for android, iOS and windows8 platform. We would like to include license documents and notices files as part of the app. To do this, we would like to know, if including these documents inside the "legal" folder (under application name folder) and installing the app on the device, will also install these license documents on the device ?
I browse through the android app, but didn't found these documents as part of the build.
The legal folder is not part of the generated Android project because it has no value there. The native project will become your .apk - the file that you distribute to your end-users. The license is of no use there; your customer cannot see it.

Flasshdevelop: How to bind air to apk

I am using FlashDevlop to make Android air app.
How can I bind the air SDK to the apk file so the user will not require to download air.
Look for the packageApp.bat file. It is added to the base folder of new FlashDevelop mobile projects. Execute that and you will see several options for packaging to Android and IOS. The option you want is #3 (apk-captive-runtime)

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