zk-passport / openpassport

Generate privacy-preserving ID proofs
https://openpassport.app
327 stars 56 forks source link

Optimize App Clip #188

Open 0xturboblitz opened 1 month ago

0xturboblitz commented 1 month ago

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:

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

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.