PDF417 / pdf417-phonegap

PDF417 and QR code scanning plugins for PhoneGap/Cordova framework
47 stars 21 forks source link

Apk so large #36

Closed marcosmfjunior closed 6 years ago

marcosmfjunior commented 7 years ago

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?

DoDoENT commented 7 years ago

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.

marcosmfjunior commented 7 years ago

Can I also do this with ios?

DoDoENT commented 7 years ago

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

Cerovec commented 7 years ago

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

vetikent commented 6 years ago

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 6 years ago

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