Visitar URL original
App Clip uncompressed size is larger than 10MB · Issue #71098 · flutter/flutter · GitHub
Skip to content

App Clip uncompressed size is larger than 10MB #71098

Description

@xster

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.

Activity

  1. added
    platform-iosiOS applications specifically
    a: sizeReducing IPA/APK/JS sizes
    P2Important issues not at the top of the work list
    on Nov 23, 2020
  2. xster commented on Nov 24, 2020

    @xster
    MemberAuthor

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

  3. xster commented on Dec 15, 2020

    @xster
    MemberAuthor

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

  4. acoutts commented on Apr 30, 2021

    @acoutts

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

  5. alex-zige commented on May 4, 2021

    @alex-zige

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

  6. oantajames commented on May 5, 2021

    @oantajames

    @xster any updates on when this will be addressed?

  7. xster commented on May 8, 2021

    @xster
    MemberAuthor

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

  8. marcguillem commented on Sep 10, 2021

    @marcguillem
  9. neiljaywarner commented on Nov 3, 2021

    @neiljaywarner

    @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

  10. oantajames commented on Jan 3, 2022

    @oantajames
  11. kimmy-wang commented on Jan 10, 2022

    @kimmy-wang
  12. cweagans commented on Jan 10, 2022

    @cweagans
  13. 28 remaining items

  14. jmagman commented on Feb 13, 2024

    @jmagman
    Member

    Targeting iOS 17 increases the limit to 15MB;

    From that WWDC video:

    If you'd like to make use of physical invocations, such as those through NFC tags or App Clip codes, you'll have to keep to the 15 MB limitation introduced in iOS 16.

    So targeting iOS 16 allows the 15MB limit.

  15. keylinwu commented on Feb 13, 2024

    @keylinwu

    Targeting iOS 17 increases the limit to 15MB;

    From that WWDC video:

    If you'd like to make use of physical invocations, such as those through NFC tags or App Clip codes, you'll have to keep to the 15 MB limitation introduced in iOS 16.

    So targeting iOS 16 allows the 15MB limit.

    If doing an App Clip with Flutter could possibly be very limited by the size, would it be possible to create a Native AppClip(iOS)/Instant App(Android) within a Flutter Project?

  16. ggirotto commented on Feb 14, 2024

    @ggirotto

    If doing an App Clip with Flutter could possibly be very limited by the size, would it be possible to create a Native AppClip(iOS)/Instant App(Android) within a Flutter Project?

    Yes, just implement it natively

  17. espling commented on Feb 14, 2024

    @espling

    If doing an App Clip with Flutter could possibly be very limited by the size, would it be possible to create a Native AppClip(iOS)/Instant App(Android) within a Flutter Project?

    Yes, as you can see I wrote about that earlier. It's just another target in xcode, and that will use a separat prov profile. All those kind of stuff is well documented on apples dev site.

    Note, android instant apps does not support the nfc api (or at least it didn't some time ago), if you intend to use that for app clip invocation.

  18. jmagman commented on Feb 14, 2024

    @jmagman
    Member

    Please update the flutter webpage describing use of iOS App Clip

    flutter/website#10145

  19. jmagman commented on Feb 14, 2024

    @jmagman
    Member

    Updating the sample flutter/samples#2162

  20. sumanthratna commented on Jul 25, 2024

    @sumanthratna

    Hey @xster, is there anything we can do to help move this forward?

    Our App Clip (uncompressed, thinned) is currently at 14.9 MB (even after switching out MaterialApp for WidgetsApp). Happy to try and help to reduce Flutter engine size and overall iOS build size [with guidance]

    P.S. I noticed that App Thinning doesn't seem to help much -- the IPA size for Universal variant is equal to the IPA size for all compatible variants. Is this something you've seen before, and if so, does it imply that we've misconfigured something?

  21. MarkOSullivan94 commented on Feb 2, 2026

    @MarkOSullivan94
    Contributor

    Is there any updates on whether we can expect App Clip with Flutter apps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: sizeReducing IPA/APK/JS sizesplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions