App Clips in iOS

Whether you’re picking up coffee or renting a bike, you’ve likely been faced with the decision of installing an app or not. Living in a time where there truly is an app for everything, it’s often frustrating to download an app just to get a ride home or book a hotel on-the-go. With App Clips, developers can make a small portion of their app available for near-instant use, so users can avoid the installation, sign-in, and onboarding process. In this course, learn how to implement your own App Clips in your iOS apps and help users discover your app while on the move! By Vardhan Agrawal.

4.3 (8) · 1 Review

Download materials
Save for later

Who is this for?

This course is for developers looking to add App Clips to their apps. If you’re someone who already has an app, especially one which involves brick-and-mortar stores, and wants to make your app more discoverable, this is the perfect course for you! This is also a great course for someone who’s just curious about how App Clips work and how they can be an invaluable tool in any developer’s toolkit. If you have some experience working on Swift apps in Xcode or if you already have a basic app up-and-running, this course is for you!

Covered concepts

  • Launching App Clips by URL
  • Passing Data to App Clips
  • Location Confirmation API
  • Simulating User Location
  • Sending Ephemeral Notifications

Part 1: App Clips in iOS

Toggle description

An App Clip is a small, lightweight portion of your app that users can install immediately. App Clips allow your users to experience your apps without needing to download your full app. In this episode, learn what App Clips are and get a tour of this course’s lemonade-ordering app, SwiftyLemonade.

Toggle description

Since App Clips are technically a different version of your app, you’ll need to create a separate target for them, almost as if you were making a cross-platform app. In this episode, create an App Clip target for SwiftyLemonade. Then, share code and assets between the two, for a seamless integration between your App and its corresponding App Clip.

Toggle description

An App Clip experience is how your users first interact with your App Clip: by scanning an App Clip Code, or following a link. In this episode, learn how to design your App Clip experience by using a URL.

Toggle description

Since your App Clip’s launch URLs contain data, you’ll need to parse them before use. In this case, they contain longitude and latitude data to map you to the correct lemonade stand. In this episode, you’ll learn about parsing your URLs and use the location data to return the name of a lemonade stand.

Toggle description

After your App Clip is launched, you’ll need to implement its real-life features. With the SwiftyLemonade App Clip, users should be able to order lemonade from the correct stand. In this episode, you’ll display your lemonade stand’s menu and allow users to place their order through your App Clip.

Toggle description

While it’s useful to pass location information through a URL, there are many obvious security flaws with relying solely on URL data to place orders to a lemonade stand. In this episode, use the Location Confirmation API bundled with App Clips to confirm that a user’s location matches the one provided by the URL before allowing users to place orders.

Toggle description

Now that you’ve used the Location Confirmation API to verify your user’s location, you should disable the ability to order lemonade. In this episode, prevent the user from being able to place an order if their physical location doesn’t match the URL location.

Toggle description

The SwiftyLemonade App Clip should now respond to user location and prevent users from placing orders, where appropriate. To test these features, simulate a user’s location in various scenarios. In this episode, explore ways to simulate situations and test your App Clip’s intended functionality.

Toggle description

To add a finishing touch to the SwiftyLemonade App Clip, you can notify your user when their order is ready. Even though an App Clip isn’t the full version of your app, it can still send notifications to your user up to 8 hours after it’s been installed. In this episode, learn to use push notifications with App Clips.