AppClips

AppClips – technology that allows users to use the valuable functionality of an app, without having to install it first. It is a small part of the app (less than 10 Mb) that can be called up and used exactly when it comes in handy.

You can find more information in a presentation and video.

Discovery

In order to use App Clip, it must be discovered.

Default App Clip Experiences

  • Safari App Banner
  • Links in Messages
  • Recently Used App Clips

Advanced App Clip Experience

  • Place Cards in Maps
  • NFC Tags
  • QR Codes
  • App Clip Codes

More information:

Implementing

App Clip is implemented in the project as a new Target. Once added, you can share existing modules and resources from the project, for later use in App Clip, or you can create your own internally.

For proper operation, you need to link the application and the web server:

Server Side ServerSide Add an Associated Domain file (named apple-app-site-association) to the server and insert the following content where the first part is the Team ID and the second part is the Bundle ID App Clip of the Target.

You can also set up a Smart App Banner right away, which is a great way to redirect traffic from your site to the App Clip. If you have a full application, Smart App Banner calls it, not App Clip. To create the banner, you need to add the meta tag you see below:

<meta name="apple-itunes-app" content="app-id=myAppStoreID, app-clip-bundle-id=appClipBundleID, affiliate-data=myAffiliateData, app-argument=myAppArgument">

App Side

In Capabilities you need to add Associated Domains, where you need to list all the domains used with the service prefix "appclips:"

More information:

Responding to Invocations

When the user launches App Clip, the application gets an NSUserActivity object that can be used to respond to the call. It can be caught in methods:

SwiftUI’s life-cycle:

onContinueUserActivity(_:perform:)

SceneDelegate:

scene(_:willConnectTo:options:)
scene(_:continue:)

AppDelegate:

application(_:continue:restorationHandler:)

More information:

Additional Features

App Clip provides the ability to send notifications within 8 hours after each launch and check the user's location. When connected, an alert will appear in the App Clip card for the user. In turn, he can disable.

To connect the functions you need to change the variables in Info.plist that you see below: Additional Features

More information:

Share Data Between the App Clip and the App

You need to use Groups to exchange data between App Clip and the corresponding application. The same Groups Capability is added for both application targets, for example:

group.exampleApp.appClipMigration

Once the group is created, the developer can use two ways to exchange data:

  • FileManager Shared Container
  • UserDefaults

More information:

Recommending an App Clip’s Corresponding App

App Clip allows you to recommend your app for download using SKOverlay.

UIKit Additional Features

  1. Create a configuration specifying the iTunes identifier of the application.
  2. Create a SKOverlay object with the created configuration in mind.
  3. Call the present method of SKOverlay.

SwiftUI

Use modifier:

appStoreOverlay(isPresented:configuration:)

More information:

Limitations

App Clips use SwiftUI and UIKit and have access to the same frameworks as the full app. However, some technologies are limited. A list can be found in the documentation.

Developed By

  • Kvasnetskyi Artem, Kosyi Vlad, CHI Software

License

Copyright 2020 CHI Software.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.