Dunfey · Hotel WWDC as data, est. 1983
Front desk everything
Years
Topics

2023 App Services

WWDC23 · 6 min · App Services

What’s new in App Clips

Explore the latest updates to App Clips. We’ll show you how to build App Clips more easily using default App Clip links. Learn how you can take advantage of the increased App Clip size limit to build richer and more engaging experiences, and find out how you can launch App Clips directly from your app.

Watch at developer.apple.com ↗

Transcript all transcripts

Chapters

Code shown on screen · 4 snippets

Parsing URL parameters as components swift · at 3:53 ↗
ContentView(parameters: $parameters)
    .onContinueUserActivity(NSUserActivityTypeBrowsingWeb, perform: { userActivity in
        guard let inputURL = userActivity.webpageURL else {
            return
        }

        let components = NSURLComponents(url: inputURL, resolvingAgainstBaseURL: true)
        guard let parameters = components?.queryItems else {
            return
        }

        self.parameters = parameters
    }
Providing metadata to an LPLinkView swift · at 4:39 ↗
let provider = LPMetadataProvider()

provider.startFetchingMetadata(for: url) { (metadata, error) in
    guard let metadata = metadata else {
        return
    }

    DispatchQueue.main.async {
        lpView.metadata = metadata
    }
}
Launching App Clips from a SwiftUI app swift · at 5:00 ↗
var body: some View {
    let appClipURL = URL(
        string: "https://appclip.apple.com/id?p=com.example.naturelab.backyardbirds.Clip"
    )!

    Link("Backyard Birds", destination: appClipURL)
}
Launching App Clips with UIApplication swift · at 5:11 ↗
func launchAppClip() {
    let appClipURL = URL(
        string: "https://appclip.apple.com/id?p=com.example.naturelab.backyardbirds.Clip"
    )!

    UIApplication.shared.open(appClipURL)
}

Resources