MacKuba

🍎 Kuba Suder's blog on Mac & iOS development

WWDC 20

Explore app clips

Categories: App Clips, UIKit 0 comments Watch the video

App clip is a part of an app – you need to have an app to add an app clip

App Clip Experience – a specific URL configured to display an app clip popup sheet on iOS 14 when opened in some app

App clip itself  ⭢  an on-demand binary

App clip experience is a new entry point to your app

Configured in a similar way as Universal Links, + additional setup in App Store Connect

App clip appears whenever a user accesses that URL: through a QR code or NFC tag, links in Safari and Messages, places in Maps

Also through Siri suggestions

Coming later this year: special Apple-designed circular QR codes for app clips

App clip

Created as another target in your app project in Xcode

Uploaded to App Store Connect together with the whole app

Once the app containing an app clip is released, the app clip will be downloaded separately when its URL is opened by the user

→ if the full app is already installed, it will be launched instead, so it must be able to do everything that the clip does

App clips are designed to be downloaded quickly in the background, so they should be as small as possible

App clip bundle must be less than 10 MB after thinning

Include only what is needed immediately, and download other assets and data from the internet when needed

Include only a minimal part of the app UI in the app clip, only what will be required in this specific context where the app clip will be used

App clips should generally not include top level parts of your navigation flow, like tab bars; also things like profile screens

They should deep-link to the specific screen in the app that they are concerned with

Use separate URLs for any distinct experiences, each app clip experience should focus on one thing

E.g. if you have multiple physical stores, have separate URLs for each store so that you can skip a “Choose store” screen

An app clip receives an NSUserActivity with the given URL when launched

App clips can use any frameworks from the iOS SDK (including Apple Pay and notifications), and use UIKit or SwiftUI app lifecycle

Access to some sensitive user data is limited (e.g. no access to HealthKit)

New location confirmation API – lets you confirm if the user really is where you think they are

You can migrate data from the app clip to the full app using a group container

→ group container is deleted when the data is migrated

Autorizations for camera, microphone and Bluetooth access are automatically migrated to the app when installed

App clip and its storage are deleted from user’s device after a period of inactivity (~ several days)

App clips also aren’t included in backups

Any app clip data should be treated more like a cache

If a specific app clip is used frequently, iOS will keep it on device for a longer period after last use

App clip can’t register as document or URL scheme opener, it can only be opened using the URL configured in the app clip experience

They also can’t include their own extensions, like content blockers

SKOverlay or .appStoreOverlay in SwiftUI – a standard UI for inviting your users to the full app

Use ASAutthorizationController if you need a way to log the user in to an account



Leave a comment

*

*
This will only be used to display your Gravatar image.

*

What's the name of the base class of all AppKit and UIKit classes?

*