Overview

Last updated: 2021-01-21 15:56:30

    Pushing messages to iOS devices involves client application (Client App), APNs (Apple Push Notification service), and TPNS server (TPNS Provider). They need to collaborate throughout the entire process to successfully push messages to the client. An exception from any of them can lead to a push message delivery failure.

    SDK Description

    File composition

    • XGPush.h, XGPushPrivate.h (header files where the SDK provides APIs)
    • libXG-SDK-Cloud.a (main SDK file)
    • libXGExtension.a, XGExtension.h ("arrival and rich media" extension library and API header file)
    • XGMTACloud.framework ("click report" component)
    • TPNSInAppMessage.framework, TPNSInAppMessageResource.bundle ("in-app message" component and "in-app message" template resource package)

    Release notes

    • iOS 8.0+ is supported;
    • For iOS 10.0+:
      • You also need to import UserNotification.framework.
      • We recommend you use Xcode 8.0+.
      • If you use the Xcode 7 version or below, you need to configure the SDK for iOS on your own to support the compilation of the UserNotification framework.

    Feature description

    The SDK for iOS provided by TPNS contains APIs for clients to implement message pushing. It is mainly used to:

    • Automatically get and register device tokens to facilitate integration;
    • Bind accounts, tags, and devices, so you can push messages to specific user groups and have more varied push methods;
    • Report the number of clicks, i.e., how many times a message is clicked by users.

    Push channel

    Message delivery channels used by TPNS:

    • TPNS channel: the channel built by TPNS. It can deliver messages only when the TPNS service is online (maintaining a persistent connection with the TPNS backend server). It requires the SDK 1.2.8.0 or above.
    • APNs channel: Apple's official message push service. For more information, please see APNs.

    Flow Description

    Device registration flow

    The device registration flow is as shown below. For specific API methods, please see the API documentation.

    Device unregistration flow

    The device unregistration flow is as shown below. For specific API methods, please see the API documentation.

    Account flow

    The account flow is as shown below. For specific API methods, please see the API documentation.

    Tag flow

    The tag flow is as shown below. For specific API methods, please see the API documentation.

    User attribute flow

    The user attribute flow is as shown below. For specific API methods, please see the API documentation.