How it works

Before you can take advantage of our SDK, you need to install the module(s) you want to use, initialize the SDK, and understand the order of operations.

Our SDKs provide a ready-made integration to identify people who use mobile devices and send them notifications. Before you start using the SDK, you should understand a bit about how the SDK works with Customer.io.

sequenceDiagram participant A as Mobile User participant B as SDK participant C as Customer.io A-->>B: Anonymous User activity B-->>C:   A->>B: Logs in (identify method) rect rgb(229, 254, 249) Note over A,C: Now you can Send events and receive messages B-->>C: Person added/updated in CIO C-->>C: Associate anonymous
activity with identified user A->>B: User activity (track event) B->>C: Event triggers campaign C->>B: Campaign triggered push B->>A: Display push A->>B: Logs out (clearIdentify method) end A-->>B: Anonymous user activity

Before a person logs into your app, any activity they perform is associated with an anonymous person in Customer.io. In this state, you can track their activity, but you can’t send them messages through Customer.io.

When someone logs into your app, you’ll send an identify call to Customer.io. This makes the person eligible to receive messages and reconciles their anonymous activity to their identified profile in Customer.io.

You send messages to a person through the Customer.io campaign builder, broadcasts, etc. These messages are not stored on the device side. If you want to send an event-triggered campaign to a mobile device, the mobile device user must be identified and have a connection such that it can send an event back to Customer.io and receive a message payload.

Your app is a data source and Customer.io is a destination

Our iOS SDK is a data sourceA source is a website or server that you want to capture data from—it’s a source of data! in Customer.io Data PipelinesCustomer.io’s customer data platform, helping you capture data from your sources, transform it, and send it to destinations where you can act on it. Data Pipelines is also the preferred integration path for your Customer.io workspace, as it supports all of our Journeys features and other destinations that rely on your data.. This makes it easy route data from your app to both Customer.io and other data sources. This makes it easier to use your app as a part of your larger data stack without using extra services or code.

When you set up your app, you’ll integrate our SDK. But you’ll also determine where you want to route your data to—your Customer.io workspace and destinations outside of Customer.io.

Minimum support requirements

To support the Customer.io SDK, you must:

  • Set iOS 13 or later as your minimum deployment target in XCode

  • Have an iOS 13+ device to test your implementation. You cannot test push notifications in a simulator.

Objective-C support

Our SDK is written in Swift and tested in a Swift environment.

Our iOS SDK may work in Objective-C-based projects, but we haven’t tested it that way. If you use our SDK in an Objective-C project and run into trouble, please let us know.

The Processing Queue

The SDK automatically adds all calls to a queue system, and waits to perform these calls until certain criteria is met. This queue makes things easier, both for you and your users: it handles errors and retries for you (even when users lose connectivity), and it can save users’ battery life by batching requests.

The queue holds requests until any one of the following criteria is met:

  • There are 20 or more tasks in the queue.
  • 30 seconds have passed since the SDK performed its last task.
  • The app is closed and re-opened.

For example, when you identify a new person in your app using the SDK, you won’t see the created/updated person immediately. You’ll have to wait for the SDK to meet any of the criteria above before the SDK sends a request to the Customer.io API. Then, if the request is successful, you’ll see your created/updated person in your workspace.

Copied to clipboard!
  Contents
Current release
 3.3.0
Is this page helpful?
Chat with AI