avatarMING

Summary

This article provides a comprehensive guide on how to create, debug, and distribute an "App Clip" for iOS 14 using Xcode 12 beta 5 or later, including steps for uploading to TestFlight and the App Store, testing via smart banners, and registering local experiences.

Abstract

The guide titled "How to: Build 'App Clip' for iOS 14 beta 5 or above" is a detailed walkthrough aimed at intermediate developers. It outlines the process of integrating an App Clip with an iOS app, starting with setting up a new target in Xcode and copying functions from the main app to the App Clip for testing. The article emphasizes the importance of adding associated domains and handling multi-window conflicts on iPad. It also covers the archiving and uploading process via App Store Connect, testing the App Clip through TestFlight, and utilizing smart banners and QR codes for local experiences. Additionally, the article addresses the deprecation of certain overlay banners and introduces the new SKOverlay for promoting the full app from within an App Clip. The guide concludes with instructions on configuring advanced App Clip experiences in App Store Connect, ensuring proper domain association, and generating App Clip Codes.

Opinions

  • The author provides a positive outlook on the ease of integrating App Clips with existing iOS apps using Xcode.
  • There is an emphasis on the importance of thorough testing and debugging to ensure a seamless user experience with App Clips.
  • The article suggests that the new App Clip experiences can significantly enhance user engagement and app discoverability.
  • The author appreciates the streamlined process of uploading App Clips to the App Store and TestFlight, indicating a smooth developer experience.
  • The guide highlights the necessity of adhering to Apple's guidelines for associated domains and domain verification to ensure successful App Clip deployment.
  • The author points out the evolution of App Clip promotion methods, with a particular note on the transition from the older "Get the full app" banner to the newer SKOverlay method.
  • The article concludes with encouragement for developers to explore and utilize the new App Clip Codes Generator, suggesting it as a valuable tool for developers.

How to: Build “App Clip” for iOS 14 beta 5 or above

The very first guideline of creating and upload App Clip to TestFlight and App Store…

On August 19, Apple updated the App Store Connect Interface and TestFlight, which allow developers to upload their app with app clips by using the Xcode 12 beta 5. In this article, you will learn how to integrate and distribute iOS app with App Clip.

Image Source Left: Apple | Right: My Calculator App

Background

Difficulty Level: Intermediate Goal: Create and Upload App Clip Platform: iOS 14 beta 5 and Xcode 12 beta 5 SDK

Image: Apple

Create App Clip(s)

Firstly, open your Xcode Project (just create a new one if you don’t have it).

Secondly, click “New” > “Target” (iOS). Search “App”, and you will see “App Clip”. And click “Next” button.

After setup the App Clip, you will see a new folder called, ‘AppClip”. It contains AppSwift and ContentView (similar to your shared folder). You may copy some functions from your app to App Clip and see whether it is working or not. Or by default, it shows “Hello, World!”.

Debug App Clip(s)

Upload App Clip(s)

If you want to upload it/them to app store or TestFlight, follow the steps below to avoid error.

  1. Check the “Requires full screen” in info.plist of App Clip. (This can avoid the iPad’s Multi-windows conflict)

2a). Add Target from shared assets folder to AppClip to make icon works.

Add Target from Shared.

Or 2b). You can use the assets inside AppClip folder.

3. Don’t forget to add Associated Domains for your app clip. You can use this pattern: appclips:<fully qualified domain>. For example, appclips:example.com.

Add associated domain on Signing & Capabilities.

If you wish to use Advanced App Clip Experiences, add applinks:<fully qualified domain>.

4. Archive the project and upload it via app store connect. 5. And now, you can test App Clips via TestFlight.

Test App Clip Card

Here’s the video preview, enjoy 👏👏👏👏👏

6. Install App Clip(s) via Website Smart Banner

BetterAppIcons App Store: https://icons.startway.io

Speechable App Store: https://speechable.startway.io

Register Local Experience is for Apple Developer only (iPhone customers jump to “QR Code” section)

Register Local Experience

Go to Settings > Developer > Local Experiences > Register Local Experience Notice: To enable Developer option, connect your iPhone to Mac and open Xcode 12.

Example:

The Smart banner only works after your app is published or enabled Pre-order on App Store. Developer can edit the details inside App Store Connect > Advanced App Clip Experiences.

QR Code

Environment: iOS14 GM 1 8a. After installed app clip and setup the above Local Experiences: i. Open QR Code scanner via Control Centre:

ii. Scan this QR Code:

Looks good :)

If you don’t have a Mac/iPhone, I also prepare a video for your quick peek.

Video Preview:

Smart Banner in Local Environment

8b. Open Safari You will see a smart banner on the top. If you click “Open”, it will redirect to your app clip automatically. To use app clip card, you need to uninstall the app clip first. (Back to settings, you can find “App Clip” under “Developer”.)

Cool! 👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏👏

Recommending an App Clip’s Corresponding App

App Store Overlay: “Get the full app” Banner (Outdated)

Update(2020.9.18): Deprecated after Xcode 12.2 beta.

On iOS 14 beta 5 or later, try SKOverlay to call the promote banner.

Preview:

To make this work, add Storekit first.

import StoreKit

Then, add appStoreOverlay (inside some View).

.appStoreOverlay(isPresented: $showAppStoreOverlay) {
SKOverlay.AppClipConfiguration(position: .bottom)
}

Don’t forget to define $showAppStoreOverlay (between View and some View).

@State private var showAppStoreOverlay = false

Looks Good! 👏👏👏

App Store Connect

Advanced App Clip Experiences (New App Clip Experience)

Configure an advanced app clip experience if: You want your app clip to support all possible invocations, including invocations from NFC tags and visual codes. You need to associate your app clip with a physical location. You’re creating an app clip for multiple businesses to use. — Apple

You will see a new interface called “New App Clip Experience”, just follow the steps and provide Apple required information. You must provide a working domain/url (associate) to make it work.

Example on the Right Hand Side.

Notes:

  • You cannot use dot(.) in Title Textfield.
  • Image Size must be 1800x1200
  • Apple will check your domain. Make sure you associate the app, app clip and configure your web server correctly.
The status is called “received” right now.

All done!

Update 2020.12.15: New App Clip Codes Generator is available now!

👏👏👏 That’s all! Thanks for reading 😄

If you have any questions, feel free to ask me via Twitter or simply comment below.

Ios Dev
App Clip
Swiftui
Programming
Software Engineering
Recommended from ReadMedium