SDK Methods
Manually Triggering the Permission Dialog
PushSDK.PushNotifications.showPermissionPrompt() { granted, settings, error in
// optional callback
print("User accepted permissions: \(granted)")
}[PushSDKPushNotifications showPermissionPrompt:^(BOOL granted, UNNotificationSettings * _Nonnull settings, NSError * _Nullable error) {
// optional callback
NSLog(@"User accepted permissions: %d", granted);
}];Adding Attributes to a Subscriber's Profile
PushSDK.UserProfile.set(["politics", "news"], forKey: "interests")[PushSDKUserProfile set:@YES forKey:@"is_paying_subscriber"];PushSDK.UserProfile.set([
"is_paying_subscriber": true,
"interests": ["politics", "news"]
])[PushSDKUserProfile set:@{
@"is_paying_subscriber": @YES,
@"interests": @[@"politics", @"news"]
}];// add 'sports' to the subscriber's existing interests
PushSDK.UserProfile.append(["sports"], to: "interests")
// remove 'fashion' and 'news' from the subscriber's interests
PushSDK.UserProfile.remove(["fashion", "news"], from: "interests")// add 'sports' to the subscriber's existing interests
[PushSDKUserProfile append:@[@"sports"] to:@"interests"];
// remove 'fashion' and 'news' from the subscriber's interests
[PushSDKUserProfile remove:@[@"fashion", @"news"] from:@"interests"];Activity Tracking (URL / Screen Visits)
Retrieving Your Anonymous Push ID
Setting the Subscriber's External ID
Determining if a Visitor is Already Subscribed
Determining if a Visitor is Eligible to Prompt
Pausing / Resuming a User's Notifications (Soft Unsubscribe)
Permanently Delete a User
Setting the SDK Log Level
Last updated