Setup Guide to Suprsend's iOS SDK


This document contains SDK setup process for iOS device. Further, we'll cover basic and advanced methods to track user properties, events and push tokens from frontend clients. With the help of this SDK, you will be able to send Communication directly from your app, and render push notifications on iOS devices.

For a better understanding of how to trigger a communication using your frontend SDK, we first need to understand how SuprSend sends communications to the end users. This is what a typical communication flow looks like

SuprSend Communication flow

SuprSend Communication flow

Communications are made up of 5 major components - templates, vendors, end users, trigger and workflows. All of these components are defined below:

1. Template

Template contains the message content that needs to be sent. You can manage your templates on the SuprSend dashboard. This gives you the flexibility of making changes in the message content without changing anything in the code. You can create a template on SuprSend dashboard by following our Templates documentation

2. Users

Users are your end recipients who need to be notified. Users are identified by a unique identifier distinct_id on SuprSend platform. There can be multiple channels attached to a user profile. Notification will be sent to active channels in a user profile. For example - If your template contains a message corresponding to SMS and email channels, but your user profile contains information relating only to email channels, only email will be sent. We'll learn more about how to add a user and their channel preferences in this document

3. Vendors

Vendors are the channel providers through which your messages will be routed. SuprSend only requires you to add your vendor configurations to start sending notifications. Messages will always be routed through the default vendor set on SuprSend dashboard. You can configure your vendors by following our vendor configurations guides

4. Workflow

Workflow combines all the communication elements (like user, trigger, template, vendor, etc) and adds a business logic to it to determine how / when the notification should be triggered

5. Trigger

Trigger initiates the workflow. There are two ways in which you can trigger a workflow:

  1. Event-based trigger: where you design the workflow on Suprsend platform and pass event from SDK as a trigger point.
  2. From API: Configure all the workflow components (users, template name, business logic etc) including the business logic in an API payload and trigger workflow through API. (We'll not cover this method here as it is triggered using backend SDK)

For most usecases, event-based triggers are recommended as most of the workflow elements are not tied to the code, and can be easily modified through SuprSend dashboard without changing anything in the code.

What is covered next in this documentation

In this documentation , we'll cover:

  1. How to integrate iOS SDK
  2. How to create User profile and add user channel preferences to it
  3. How to send and track events for triggering event based workflows
  4. How to render iOS push notification using APNs