App Clips are a new feature in iOS 14 that allow you to quickly download a small portion of an app for quick and easy use. In this video, see how it works.
- [Instructor] App clips are another new feature in iOS 14 that allow you to bundle a very small, up to 10 megabyte mini application within your app. The purpose of this is to provide a specific feature to a user so they can quickly use it without having to download the full application. This is good for a point of sale. Maybe you're at a store that has a large app and they want you to be able to do some feature of that app, maybe order some food very quickly. This would be a good situation to use an app clip. They could have a code that your phone could scan, download the up to 10 megabyte app clip, and order your food without having to download a larger application. You can add an app clip to your app by going to File New Target and then choosing app clip. So I'm going to filter for app clip and then just double click it. And we'll call this FirstLookClip. I'm going to leave the interface at Swift UI, lifecycle at Swift UI app, the language at Swift, everything else unchecked, and I'll hit finish. So once you do that, you're going to see this new group added to your project, as well as a new scheme. Before we run the application, let's differentiate between the main view of the full application and the content view of the clip. So I'm going to select content view in the developer first look group. And I'll add some text to specify that this is the full app and save the file. Then I'll go to the content view of the clip and then I'll make sure that we specify in the text that we're looking at a clip. Now what we'll do is run the application in the simulator. And what I'm running is the clip rather than the full app. So here it says powered by and it has an empty icon. So once we have an icon for our application, you'll of course see it there. So now we're just looking at a clip of our application. It's important to note that a clip is supposed to be a subset of what your application can do. So all the functionality in the clip must also be in the full app. And as I said previously, the clip can max out at 10 megabytes. And for the purpose of keeping the size small and keeping good privacy, there are many features that are limited in app clips. We'll talk about those in more detail at the end of the course. But as an example, you can't do calling or access to users' contacts from an app clip. So remember, if you want to create an app clip, all you need to do is add the app clip target, and then you can customize your app clip in the app clips group.