Appcues iOS SDK allows you to integrate Appcues experiences into your native iOS and iPadOS apps.
The SDK is a Swift library for sending user properties and events to the Appcues API and retrieving and rendering Appcues content based on those properties and events.
Add the Appcues iOS SDK package to your app. There are several supported installation options. A tutorial video is also available for reference, showing an installation using Swift Package Manager.
Download AppcuesKit.xcframework.zip attached to the latest release and unzip.
In Xcode, open your project and navigate to File → Add Files to “<Project>“…
Find the XCFramework in the file navigator and select it
Ensure the option to “Copy items if needed” is checked and that your app’s target is selected
Click Add
Select your project in the Project navigator, select your app target and then the General tab. Under Frameworks, Libraries, and Embedded Content, set AppcuesKit.xcframework to Embed & Sign
One Time Setup
After installing the package, you can reference Appcues iOS SDK by importing the package with import AppcuesKit.
Initializing the SDK
An instance of the Appcues iOS SDK should be initialized when your app launches. A lifecycle method such as application(_:didFinishLaunchingWithOptions:) would be a common location:
Initializing the SDK requires you to provide two values, an Appcues account ID, and an Appcues mobile application ID. These values can be obtained from your Appcues settings. Refer to the help documentation on Registering your mobile app in Studio for more information.
Supporting Debugging and Experience Previewing
During installation, follow the steps outlined in Configuring the Appcues URL Scheme. This is necessary for the optimal Appcues builder experience, to support debugging and experience preview. Refer to the Debug Guide for details about using the Appcues debugger.
Identifying Users
In order to target content to the right users at the right time, you need to identify users and send Appcues data about them. A user is identified with a unique ID.
identify(userID:)
Tracking Screens and Events
Events are the “actions” your users take in your application, which can be anything from clicking a certain button to viewing a specific screen. Once you’ve installed and initialized the Appcues iOS SDK, you can start tracking screens and events using the following methods:
The Examples directory in repository contains full example iOS apps demonstrating different methods of installation and providing references for usage of the Appcues API.
👷 Contributing
See the contributing guide to learn how to get set up for development and how to contribute to the project.
📄 License
This project is licensed under the MIT License. See LICENSE for more information.
Appcues iOS SDK
Appcues iOS SDK allows you to integrate Appcues experiences into your native iOS and iPadOS apps.
The SDK is a Swift library for sending user properties and events to the Appcues API and retrieving and rendering Appcues content based on those properties and events.
🚀 Getting Started
Installation
Add the Appcues iOS SDK package to your app. There are several supported installation options. A tutorial video is also available for reference, showing an installation using Swift Package Manager.
Segment
Appcues supports integration with Segment’s analytics-swift library. To install with Segment, you’ll use the Segment Appcues plugin.
Swift Package Manager
Add the Swift package as a dependency to your project in Xcode:
https://github.com/appcues/appcues-ios-sdk
Alternatively, if your project has a
Package.swift
file, you can add Appcues iOS SDK to your dependencies:Cocoapods
XCFramework
An XCFramework is attached with each release.
AppcuesKit.xcframework.zip
attached to the latest release and unzip.One Time Setup
After installing the package, you can reference Appcues iOS SDK by importing the package with
import AppcuesKit
.Initializing the SDK
An instance of the Appcues iOS SDK should be initialized when your app launches. A lifecycle method such as
application(_:didFinishLaunchingWithOptions:)
would be a common location:Initializing the SDK requires you to provide two values, an Appcues account ID, and an Appcues mobile application ID. These values can be obtained from your Appcues settings. Refer to the help documentation on Registering your mobile app in Studio for more information.
Supporting Debugging and Experience Previewing
During installation, follow the steps outlined in Configuring the Appcues URL Scheme. This is necessary for the optimal Appcues builder experience, to support debugging and experience preview. Refer to the Debug Guide for details about using the Appcues debugger.
Identifying Users
In order to target content to the right users at the right time, you need to identify users and send Appcues data about them. A user is identified with a unique ID.
identify(userID:)
Tracking Screens and Events
Events are the “actions” your users take in your application, which can be anything from clicking a certain button to viewing a specific screen. Once you’ve installed and initialized the Appcues iOS SDK, you can start tracking screens and events using the following methods:
track(name:)
screen(title:)
Refer to the full Getting Started Guide for more details.
🛠 Customization
Refer to the Extending Guide for details.
📝 Documentation
SDK Documentation is available at https://appcues.github.io/appcues-ios-sdk/documentation/appcueskit and full Appcues documentation is available at https://docs.appcues.com/
🎬 Examples
The
Examples
directory in repository contains full example iOS apps demonstrating different methods of installation and providing references for usage of the Appcues API.👷 Contributing
See the contributing guide to learn how to get set up for development and how to contribute to the project.
📄 License
This project is licensed under the MIT License. See LICENSE for more information.