Swiftpack.co - appcues/appcues-ios-sdk as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by appcues.
appcues/appcues-ios-sdk 3.1.0
The Appcues iOS SDK
⭐️ 7
πŸ•“ 3 days ago
.package(url: "https://github.com/appcues/appcues-ios-sdk.git", from: "3.1.0")


Appcues iOS SDK

CircleCI Cocoapods License: MIT

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


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.


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:

  1. In Xcode, open your project and navigate to File β†’ Add Packages…
  2. Enter the package URL https://github.com/appcues/appcues-ios-sdk
  3. For Dependency Rule, select Up to Next Major Version
  4. Click Add Package

Alternatively, if your project has a Package.swift file, you can add Appcues iOS SDK to your dependencies:

dependencies: [
    .package(url: "https://github.com/appcues/appcues-ios-sdk", from: "3.0.0"),


  1. Add the pod to your Podfile
    pod 'Appcues'
  2. In Terminal, run
    pod install


An XCFramework is attached with each release.

  1. Download AppcuesKit.xcframework.zip attached to the latest release and unzip.
  2. In Xcode, open your project and navigate to File β†’ Add Files to "<Project>"…
  3. Find the XCFramework in the file navigator and select it
  4. Ensure the option to "Copy items if needed" is checked and that your app's target is selected
  5. Click Add
  6. 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:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  let appcuesConfig = Appcues.Config(
    accountID: <#APPCUES_ACCOUNT_ID#>,
    applicationID: <#APPCUES_APPLICATION_ID#>)
  appcues = Appcues(config: appcuesConfig)

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 Builder Preview and Screen Capture

During installation, follow the steps outlined in Configuring the Appcues URL Scheme. This is necessary for the complete Appcues builder experience, supporting experience preview, screen capture and debugging. 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:)

Anchored Tooltips

Anchored tooltips use element targeting to point directly at specific views in your application. For more information about how to configure your application's views for element targeting, refer to the Anchored Tooltips Guide.

Embedded Experiences

Add AppcuesFrameView instances in your application layouts to support embedded experience content, with a non-modal presentation. For more information about how to configure your application layouts to use frame views, refer to the guide on Configuring an Appcues Frame.

Refer to the full Getting Started Guide for more 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.


Stars: 7
Last commit: 4 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

4 days ago
  • [2023-09-21] 🍏 Update version to 3.1.0 (5753ba7)
  • [2023-09-20] πŸ‘Œ Map context value in FailedExperience (bc7e36b)
  • [2023-09-20] ✨ Add locale context to experience analytics (8e3499d)
  • [2023-09-20] ♻️ Update _lastBrowserLanguage autoproperty value (4a57933)
  • [2023-09-20] πŸ› Update debugger to always display left-to-right (608a93e)
  • [2023-09-13] ✨ Add session_id to the root of activity/qualify API request body (2be6b0b)
  • [2023-09-13] ✨ Add experienceInstanceId to experience analytics (e989350)
  • [2023-09-13] πŸ‘Œ Simplify switch, fix comment, fix test double imports (0d26345)
  • [2023-09-12] πŸ‘Œ Fix the tooltip trait access of the backdrop view (308dc94)
  • [2023-09-12] ♻️ Create and return backdrop view from wrapper creating trait, rather than passing in to it (53d3599)
  • [2023-09-12] πŸ‘Œ Remove slide in/out edge support (8e4cb74)
  • [2023-09-11] πŸ‘Œ Add fade transition on backdrop view during slideout (439e23f)
  • [2023-09-07] πŸ‘Œ Add support for margin from edge on slideout (74bc793)
  • [2023-09-06] ✨ Add slideout options to dialog modal presentation (f644d26)
  • [2023-09-05] πŸ› Update text init to avoid inadvertant localization (9bc2624)

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics