Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Size of ipa #98

Open
Novotnde opened this issue Dec 13, 2021 · 3 comments
Open

Size of ipa #98

Novotnde opened this issue Dec 13, 2021 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Novotnde
Copy link

Hello,

I have quite unusual issue.
We are using ZXing on iOS since it doesn't require firebase, however we were facing some issues on android that's when BarcodeScanner.XF came to rescue. However the ipa package grew in size in 40MB after adding the BarcodeScanner.XF nuget to android and the shared project.

When going through the ipa content I have noticed some new Resources

GoogleMVFaceDetectorResources 10.1 MB 
GoogleMVTextDetectorResources 448kb

plus just the .iOS file is almost double the size.

Do you please have any suggestion? Our ipa is now quite large 102MB and that's just not cool.

@JimmyPun610
Copy link
Owner

Hi @Novotnde ,

Thank you for your question.
Generally, there are several ways to reduce iOS ipa size.

  1. Remove the redundant packages
  2. Enable bitcode

However, I do not have any solution at this moment, since the iOS library is highly relied on Xamarin.Firebase.iOS.MLKit.Vision, you will find extra packages like FaceDetector and TextDetector are included in your build. In native iOS, these packages could be imported separately but it seems the existing Xamarin.iOS package are putting them together. Besides, Xamarin.iOS is not supporting bitcode.

For the size double up, I guess it is because you are targeting for 2 architectures? The app size will increase because a binary will be created for each one.

@JimmyPun610 JimmyPun610 added good first issue Good for newcomers help wanted Extra attention is needed labels Dec 14, 2021
@dominik-weber
Copy link

We're facing the same issue as @Novotnde - after switching from ZXing to BarcodeScanner.XF, our ipa increased from around 50mb to 100mb. After being processed by Apple, the download size for the end user is increased again to 218mb (previously ~100mb), which means that our app can now only be downloaded via wifi by default.

image

@JimmyPun610 can you provide more details that could help us kickstart a fix for this?
Thanks a lot!

@JimmyPun610
Copy link
Owner

We're facing the same issue as @Novotnde - after switching from ZXing to BarcodeScanner.XF, our ipa increased from around 50mb to 100mb. After being processed by Apple, the download size for the end user is increased again to 218mb (previously ~100mb), which means that our app can now only be downloaded via wifi by default.

image

@JimmyPun610 can you provide more details that could help us kickstart a fix for this? Thanks a lot!

Here is some ideas that could help you
https://stackoverflow.com/questions/52176739/how-to-reduce-the-package-size-of-ml-kit-ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants