Appcues

4.0.0-alpha.1

The Appcues iOS SDK
appcues/appcues-ios-sdk

What's New

4.0.0-alpha.1

2024-05-06T17:48:48Z
  • [2024-05-06] 🍏 Update version to 4.0.0-alpha.1 (cacad1e)
  • [2024-05-06] 🍏 Set initial version for AppcuesNotificationService (77a550c)
  • [2024-05-01] πŸ“ˆ Track device updated events on re-identify (6b06959)
  • [2024-05-01] πŸ“ˆ Add reason to device unregistered analytic event (fa48cf6)
  • [2024-04-18] ♻️ Update push verifier to publish status changes to backend (b96cc02)
  • [2024-04-18] ♻️ Update push verifier to only query backend if local tests pass (927d578)
  • [2024-04-17] ♻️ Update push auto config to store values for future instances (4a6534b)
  • [2024-04-15] ♻️ Update push auto config to be static (9bd3a32)
  • [2024-04-11] ♻️ Extract delegate swizzling to single implementation (83b5789)
  • [2024-04-11] ✨ Add one line push config (cde4394)
  • [2024-04-16] ♻️ Add new push analytics properties (6ba60ed)
  • [2024-04-05] ♻️ Update push verifier to open app settings if push permission denied (0ced779)
  • [2024-04-05] ♻️ Add config values to push handler testing (240e90e)
  • [2024-04-03] ♻️ Remove push transaction ID (7a45c16)
  • [2024-03-26] ♻️ Validate push app (1a03db9)
  • [2024-03-20] ♻️ Determine push attachment file type using file mime type (da0d49e)
  • [2024-03-19] ♻️ Omit analytics from test/preview pushes (bc29bb3)
  • [2024-03-19] ♻️ Rename ExperienceLoader to ContentLoader (75e30c2)
  • [2024-03-18] ✨ Add support for push trigger deep links (8a91daa)
  • [2024-03-15] ♻️ Add deferred handling for push notifications received without a session (d2945d6)
  • [2024-03-15] ♻️ Send device_updated event on push status change (1b86cfa)
  • [2024-03-14] ♻️ Update didReceiveNotification argument types (e1c7ecf)
  • [2024-03-14] ✨ Add search bar to debug logger (1a844d9)
  • [2024-03-14] πŸ”Š Add push action handler logging (6aa90d9)
  • [2024-03-12] 🍏 Add SPM support for AppcuesNotificationService (5101d1e)
  • [2024-03-12] 🍏 Add Cocoapods support with AppcuesNotificationService.podspec (1fac206)
  • [2024-03-12] ✨ Add AppcuesNotificationService (7e0fd2d)
  • [2024-03-13] ✨ Add foreground hander verification to PushVerifier (369de6e)
  • [2024-03-12] ✨ Add push test send trigger (08598b0)
  • [2024-03-08] ✨ Add push install verification to debugger (2552f14)
  • [2024-03-06] ♻️ Register @appcues/request-push action (d4f565a)
  • [2024-03-06] ♻️ Update push handler session management (0697da9)
  • [2024-03-06] ♻️ Update push handler event properties (5363bc4)
  • [2024-03-05] ✨ Add push response handler (2b10b53)
  • [2024-03-05] 🚚 Create Push group (5c3de3a)
  • [2024-02-26] ✨ Add push primer support (57b9beb)
  • [2024-02-26] ✨ Add push status device properties (73ce08c)
  • [2024-02-21] ✨ Add device events (a798efb)
  • [2024-02-16] ✨ Add setPushToken (869c28c)
  • [2024-02-15] ✨ Add _device auto properties (52ed5a3)
  • [2024-02-15] ♻️ Refactor AutoPropertyDecorator to improve readability (f13e9c7)

AppcuesKit

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

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:

  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"),
]

Cocoapods

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

XCFramework

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:)

After identifying a user, you can optionally associate that user with group.

  • group(groupID:)

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.

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu May 16 2024 22:10:55 GMT-0900 (Hawaii-Aleutian Daylight Time)