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

App Clip uncompressed size is larger than 10MB #71098

Open
2 of 4 tasks
xster opened this issue Nov 23, 2020 · 23 comments
Open
2 of 4 tasks

App Clip uncompressed size is larger than 10MB #71098

xster opened this issue Nov 23, 2020 · 23 comments
Labels
a: size Reducing IPA/APK/JS sizes P4 Priority 4 issue (default for bugs, things we're likely to work on) passed first triage tests are present, the PR follows the PR template, no obvious coding errors platform-ios iOS applications specifically.

Comments

@xster
Copy link
Member

xster commented Nov 23, 2020

Submitting a minimal app currently exceeds the 10mb uncompressed size limit with a

ITMS-90865: Thinned app clip size is too large

on 1.24.0-8.0.pre.344.

Compressed, thinned IPA is 4.6mb, but the current uncompressed breakdown is:

Total: 11,289,773 bytes

[ 320]  AppClip.app
├── [ 90K]  AppClip
├── [ 34K]  Assets.car
├── [ 128]  Base.lproj
│   ├── [ 160]  LaunchScreen.storyboardc
│   │   ├── [2.2K]  01J-lp-oVM-view-Ze5-6b-2t3.nib
│   │   ├── [ 258]  Info.plist
│   │   └── [ 896]  UIViewController-01J-lp-oVM.nib
│   └── [ 160]  Main.storyboardc
│       ├── [1.8K]  BYZ-38-t0r-view-8bC-Xf-vdC.nib
│       ├── [ 258]  Info.plist
│       └── [ 923]  UIViewController-BYZ-38-t0r.nib
├── [ 128]  Frameworks
│   ├── [ 192]  App.framework
│   │   ├── [1.7M]  App
│   │   ├── [ 794]  Info.plist
│   │   ├── [  96]  _CodeSignature
│   │   │   └── [2.7K]  CodeResources
│   │   └── [ 160]  flutter_assets
│   │       ├── [   2]  AssetManifest.json
│   │       ├── [   2]  FontManifest.json
│   │       └── [725K]  NOTICES
│   └── [ 192]  Flutter.framework
│       ├── [7.4M]  Flutter
│       ├── [ 956]  Info.plist
│       ├── [  96]  _CodeSignature
│       │   └── [2.0K]  CodeResources
│       └── [781K]  icudtl.dat
├── [4.2K]  Info.plist
├── [   8]  PkgInfo
├── [  96]  _CodeSignature
│   └── [6.7K]  CodeResources
└── [104K]  embedded.mobileprovision

The App.framework/App breakdown is:

Screen Shot 2020-11-23 at 11 15 52 AM

The flutter package breakdown is:
Screen Shot 2020-11-23 at 11 17 10 AM

The Flutter.framework/Flutter breakdown (on an equivalent Android libflutter.so, since we don't have a tool to break down iOS dylibs yet dart-lang/sdk#44278):

Screen Shot 2020-11-23 at 11 23 09 AM

Possible explorations

  • [90k] Dig more into what the AppClip binary is.
  • [1.6m] Build App.framework/App with split-debug-info.
  • [781k] The NOTICES file is huge. Since the uncompressed size is being measured here, there might be de-duplication potential. Deduplicate NOTICES #71102
  • [1m] The 70kb ld-temp.o and the 950kb unattributed code in the Flutter.framework/Flutter / libflutter.so is suspicious.
@xster xster added platform-ios iOS applications specifically. a: size Reducing IPA/APK/JS sizes P4 Priority 4 issue (default for bugs, things we're likely to work on) labels Nov 23, 2020
@xster
Copy link
Member Author

xster commented Nov 24, 2020

The measured App.framework/App is already building with split-debug-info, which went from 2,057,088 bytes to 1,774,672.

@pedromassangocode pedromassangocode added the passed first triage tests are present, the PR follows the PR template, no obvious coding errors label Nov 24, 2020
@jmagman jmagman added this to Awaiting triage in Mobile - app publication/release review via automation Dec 3, 2020
@jmagman jmagman moved this from Awaiting triage to Engineer reviewed in Mobile - app publication/release review Dec 3, 2020
@xster
Copy link
Member Author

xster commented Dec 15, 2020

#71102 brings it down by a bit

> zipinfo -m AppClip-9C3E397E-C262-473A-AB39-9E3F03DD9B35.ipa
Archive:  AppClip-9C3E397E-C262-473A-AB39-9E3F03DD9B35.ipa
Zip file size: 4651240 bytes, number of entries: 37
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/_CodeSignature/
-rw-r--r--  2.1 unx     6863 bX 72% defN 20-Dec-15 13:14 Payload/AppClip.app/_CodeSignature/CodeResources
-rwxr-xr-x  2.1 unx    92416 bX 90% defN 20-Dec-15 13:14 Payload/AppClip.app/AppClip
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/Main.storyboardc/
-rw-r--r--  2.1 unx      923 bX 35% defN 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
-rw-r--r--  2.1 unx     1832 bX 41% defN 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
-rw-r--r--  2.1 unx      258 bX 42% defN 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/Main.storyboardc/Info.plist
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/LaunchScreen.storyboardc/
-rw-r--r--  2.1 unx     2260 bX 43% defN 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
-rw-r--r--  2.1 unx      896 bX 34% defN 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
-rw-r--r--  2.1 unx      258 bX 42% defN 20-Dec-15 13:14 Payload/AppClip.app/Base.lproj/LaunchScreen.storyboardc/Info.plist
-rw-r--r--  2.1 unx    34440 bX 57% defN 20-Dec-15 13:14 Payload/AppClip.app/Assets.car
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/Flutter.framework/
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/Flutter.framework/_CodeSignature/
-rw-r--r--  2.1 unx     2084 bX 75% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/Flutter.framework/_CodeSignature/CodeResources
-rw-r--r--  2.1 unx   799760 bX 42% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/Flutter.framework/icudtl.dat
-rwxr-xr-x  2.1 unx  7733808 bX 56% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/Flutter.framework/Flutter
-rw-r--r--  2.1 unx      956 bX 59% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/Flutter.framework/Info.plist
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/_CodeSignature/
-rw-r--r--  2.1 unx     2758 bX 75% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/_CodeSignature/CodeResources
-rwxr-xr-x  2.1 unx  1794752 bX 65% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/App
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/flutter_assets/
-rw-r--r--  2.1 unx    63100 bX  2% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/flutter_assets/NOTICES.Z
-rw-r--r--  2.1 unx        2 bX-99% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/flutter_assets/AssetManifest.json
-rw-r--r--  2.1 unx        2 bX-99% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/flutter_assets/FontManifest.json
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/flutter_assets/packages/
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/
drwxr-xr-x  2.1 unx        0 bx  0% stor 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/flutter_assets/packages/cupertino_icons/assets/
-rw-r--r--  2.1 unx      794 bX 57% defN 20-Dec-15 13:14 Payload/AppClip.app/Frameworks/App.framework/Info.plist
-rw-r--r--  2.1 unx   106203 bX 64% defN 20-Dec-15 13:14 Payload/AppClip.app/embedded.mobileprovision
-rw-r--r--  2.1 unx     4280 bX 78% defN 20-Dec-15 13:14 Payload/AppClip.app/Info.plist
-rw-r--r--  2.1 unx        8 bX  0% defN 20-Dec-15 13:14 Payload/AppClip.app/PkgInfo
37 files, 10648653 bytes uncompressed, 4642890 bytes compressed:  56.4%

Looks like the NOTICES part is down by ~700kB.

@acoutts
Copy link

acoutts commented Apr 30, 2021

Does this mean it's under the 10mb limit now to use in production?

@alex-zige
Copy link

@xster thanks for the #71102, looks like it's still just a bit over 10m for production?

@oantajames
Copy link

@xster any updates on when this will be addressed?

@xster
Copy link
Member Author

xster commented May 8, 2021

Correct, it's still over 10mb currently unfortunately. I don't have an ETA for when it'll be addressed.

@marcguillem

This comment was marked as duplicate.

@neiljaywarner
Copy link

@xster bump :). (since it's been 2 months since request for info and 6 months since your last comment hope you don't mind gentle bump

@oantajames

This comment was marked as duplicate.

@kw214

This comment was marked as duplicate.

@cweagans

This comment was marked as duplicate.

@IanTsang

This comment was marked as duplicate.

@joshzhao

This comment was marked as duplicate.

@oantajames

This comment was marked as duplicate.

@marcguillem

This comment was marked as duplicate.

@eliabieri
Copy link

IOS16 seems to increase the size constraints of App Clips

CleanShot 2022-06-06 at 21 00 30

@joshzhao

This comment was marked as off-topic.

@jmagman
Copy link
Member

jmagman commented Oct 5, 2022

Was anyone able to submit Flutter App Clips to the Store with iOS 16?

@cyberpwnn
Copy link

Would be cool to have a flutter create generated target for app clips in the future if the engine keeps getting smaller and apple keeps moving in the app clip direction.

@workerbee22
Copy link

So the existing documentation on the flutter.dev site is here and may need an update if it turns out we can fit into 15MB?

https://developer.apple.com/documentation/app_clips/choosing_the_right_functionality_for_your_app_clip

@jmagman
Copy link
Member

jmagman commented Dec 19, 2022

So the existing documentation on the flutter.dev site is here and may need an update if it turns out we can fit into 15MB?

Yes, that's correct, the note should be updated. https://docs.flutter.dev/development/platform-integration/ios/ios-app-clip

Was anyone able to submit Flutter App Clips to the Store with iOS 16?

@jmagman
Copy link
Member

jmagman commented Dec 19, 2022

And if so how specifically did you satisfy this requirement? Did you make the app clip target minimum version iOS 16?

If you make your App Clip available on devices running iOS 16 and later, the uncompressed App Clip binary can be up to 15 MB in size.

@GabrielTK
Copy link

I just tried to build an empty AppClip with Flutter and got around 14.9 MB, leaving little room for app code even by iOS 16 standards. I'm trying to analyse size now, but from what I can see, submitting App Clips with Flutter might not be possible yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: size Reducing IPA/APK/JS sizes P4 Priority 4 issue (default for bugs, things we're likely to work on) passed first triage tests are present, the PR follows the PR template, no obvious coding errors platform-ios iOS applications specifically.
Projects
Development

No branches or pull requests