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

Optimize App Clip #188

Open
0xturboblitz opened this issue Sep 6, 2024 · 0 comments
Open

Optimize App Clip #188

0xturboblitz opened this issue Sep 6, 2024 · 0 comments

Comments

@0xturboblitz
Copy link
Member

0xturboblitz commented Sep 6, 2024

App Clips have a size limit of 50MB. To measure the App Clip size, see here

After removing a few things and setting up .dat files to be downloaded with zkeys, got it slightly below 50 MB. Details here at the bottom. Progress on this branch app-clip-optis-playground

Note that I had to remove the nice Lottie animation on MRZ scanning, which we should bring back.

We should strive to make the App Clip smaller. Possible steps:

  • Remove parts of OpenSSL (10.6 MB) or SwiftyTesseract (5.6 MB)
  • Switch to a witness generator like circom-witness-rs that doesn't do static bundling

Also, we should distinguish between App and App Clip in the JS code to:

  • Selectively bundle things like Lottie in the App but not in the App Clip
  • Remove some support for some sig algs (without witnesscalcs, it's 33 MB uncompressed)
  • Maybe good direction here

EDIT:
From Apple docs:

To ensure a fast launch experience, App Clips must be small:

  • If you make your App Clip available on devices running iOS 15 and earlier, the uncompressed App Clip binary can be up to 10 MB in size.
  • 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.
  • If you make your App Clip available on devices running iOS 17 and later, the uncompressed App Clip binary can be up to 50 MB in size if it meets the following conditions:
    • The App Clip only supports digital invocations — for example, from your website or Spotlight search — and not from physical invocations like App Clip Codes, QR codes, or NFC tags
    • People use your App Clip in situations where a reliable internet connection is likely, for example, at home
    • Your App Clip doesn’t support iOS versions prior to iOS 17

This explains why our app clip only opens through links and not on QR codes.

This means as long as it is not less then 20MB, we need to have an extra page that prompts the user to open the app clip.

@0xturboblitz 0xturboblitz changed the title Compress iOS app clip Optimize App Clip Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant