Adding an app clip to your project
App clips do not exist independently; each app clip is part of an existing app. An app can have more than one app clip, with each app clip performing a single task.
To add an app clip to the LetsEat
project, you'll use the App Clip target from the template selector. This creates a new app clip for your app and configures a new target for it. Follow these steps:
- Choose File | New | Target from Xcode's menu bar to open the template selector.
- iOS should already be selected. In the Application section, choose App Clip and click Next:
Figure 25.1 – Template selector window with App Clip selected
- Make sure Interface: is set to Storyboard and Life Cycle: is set to UIKit App Delegate. Name the target
LetsEatAppClip
and click Finish:Figure 25.2 – Target options window
- Click Activate in the dialog box that appears. This will create a scheme to run your app clip in the iOS simulator:
Figure 25.3 – Activate...