Skip to main content

iOS Push SDK

Wisdom Tooth Push SDK, if you have already integrated Umeng Push, there is no need to use this SDK. You can directly focus on the 3. Bind Alias section. Binding an alias can still use Umeng’s method to bind directly. Relevant Restrictions and Precautions
  1. Enable network request permission
  2. The App enables the push notification function
  3. Integrate the Umeng Push SDK

Integration Method

Manual Integration
Download link: iOS_Push_SDK Unzip [iOS_SDK], and add the necessary files SobotPush.framework and the Umeng push SDK integration package to your project. The ZhiChi push SDK is based on the implementation of the Umeng SDK and relies on some system frameworks. When developing the app, these frameworks need to be added to the project. First, the developer clicks the project name on the right side of the project, then selects TARGETS -> Build Phases -> Link Binary With Libraries in sequence on the right side of the project name. After expanding Link Binary With Libraries, click the ”+” below to add the following dependencies:
  • CoreAudio.framework
  • libz.tbd
  • SystemConfiguration.framework
  • libsqlite3.tbd
  • UserNotifications.framework
  • CoreTelephony.framework
File Description
The SDK includes SobotPush.framework, SobotDemo, and Doc-related documentation.

Quick Start

Step 1 Initialization

Initialize Umeng Push The main calling code is as follows: Interface:
Parameter: Example code:

Step 2 Permission Settings

Permissions to be added

Step 3 Register Push Notification

1. Register for remote push notifications
Register for remote push notifications at
  • Add push notification registration code in the (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method Example code
2. Register the deviceToken of this device with Umeng
Register the deviceToken of this device with Umeng to facilitate sending Push messages. Example
3. Bind Alias
Bind an alias to a device (including account and platform type), and unbind the device that this alias was previously bound to. Note: The prerequisite for adding an Alias is that the device_token has been successfully obtained; otherwise, it will fail (kUMessageErrorDependsErr). After logging in, users can set aliases in three ways: [You can directly use the Umeng API to bind aliases]
  1. Connection ID partnerId 2.Email email 3.Phone tel Select one of the methods to set an alias. Call it after the app logs in successfully and registers the device’s deviceToken with Umeng. Example

Function Description

Click Push Message Event

Click the push notification to go to the specified page in the app or open the link.

iOS Rich Text Push Notifications

If you want to add images to push notifications, you can achieve this by adding a Notification Service Extension. First, we create a Notification Service Extension. The specific steps are as follows: File——>New——>Target——->Notification Service Extension——->Name the created Notification Service Extension Copy the following code into the NotificationService.m file, or you can write related code by yourself.
Notice
  1. Self.bestAttemptContent.title = [NSString stringWithFormat:@”%@ [modified]”, self.bestAttemptContent.title]; can be used to test if the project has called the notification service.
  2. The image size cannot exceed 10M, and the content link must be https.
  3. Add network permissions to the info.plist file in the Notification Service Extension project. NSAppTransportSecurity
  4. When testing push notifications, select NotificationService Target for packaging.
  5. Test push needs to be packaged in adHoc format for verification.

Custom Push UI

If you want to modify the push UI, you can add Notification Content Extension to implement a custom UI. First, we create a Notification Content Extension. The specific steps are as follows: File——>New——>Target——->Notification Content Extension——->Name the created Notification Content Extension Copy the code below into the NotificationViewController.m file, and add custom UI code. Example

Umeng Integration Document

Umeng Push SDK_iOS Integration Document

Privacy and Permissions

《ZhiChi Technology SDK Personal Information Collection and Usage Statement》