PDF417/pdf417-phonegap

Apk so large

Closed this issue · 6 comments

Before using the plugin the original size of my application is 7,5MB, but after using and building the size is 23,2MB.
Is there something that I can make the size smaller than this?

The PDF417.mobi SDK is native binary, compiled for each of supported architecture separately. However, if some processor architectures are not relevant for your use case, you can remove them. Please check the documentation to see how to do that.

Can I also do this with ios?

On iOS this is done automatically on Apple servers (the size of app that user sees is much smaller than size you upload to AppStore).

The app size is smaller with the latest releases. Please verify.

Use the lipo command to extract the architectures from the MicroBlink framework binary
See this post in the Microblink docs.

It works for blinkid-phonegap and I assume the same will work for pdf417-phonegap

Here is an example:
Lipo -remove has to be done once for each architecture to remove. lipo does not modify the input file, it only produces a file so you have to run lipo -remove once for x86_64 and i386.

example:

 cd plugins/com.microblink.BlinkIdScanner/src/ios/blinkid-ios/Microblink.framework
 mv MicroBlink MicroBlink_all_archs
 lipo -remove x86_64 MicroBlink_all_archs -o MicroBlink_some_archs
 lipo -remove i386 MicroBlink_some_archs -o MicroBlink
 rm MicroBlink_all_archs MicroBlink_some_archs 
culoi commented

Closing the issue, please reopen if you have additional questions or contact us directly at support@microblink.com