SMPushService Class Reference
Inherits from | NSObject |
---|---|
Declared in | SMPushService.h |
pushSubscriptionDelegate
The delegate object that must be implemented to receive the callbacks.
@property (nonatomic, strong, nullable) id<SMPushSubscriptionDelegate> pushSubscriptionDelegate
Availability
4.6.0
See Also
Declared In
SMPushService.h
– subscribeToPushNotificationsWithStandardPushToken:andVoipPushToken:andRealm:completionHandler:
This method registers application to push notifications channel. Fail and success calls will be transmitted through the completion block. If the registration is successful, a subscriptionID will be returned which can be used to update or remove the push subscription.
- (void)subscribeToPushNotificationsWithStandardPushToken:(nonnull NSData *)standardPushToken andVoipPushToken:(nonnull NSData *)voipPushToken andRealm:(nonnull NSString *)realm completionHandler:(void ( ^ _Nonnull ) ( NSString *_Nullable subscriptionID , SMMobileError *_Nullable error ))completionBlock
Parameters
standardPushToken |
standard push token generated by the apns |
---|---|
voipPushToken |
voip push token generated by the apns |
realm |
realm of the push server |
completionBlock |
block implementation that will be used to return success or fail @updated 5.4.0 |
Discussion
This method registers application to push notifications channel. Fail and success calls will be transmitted through the completion block. If the registration is successful, a subscriptionID will be returned which can be used to update or remove the push subscription.
Declared In
SMPushService.h
– updatePushSubscriptionWithStandardPushToken:andVoipPushToken:andSubscriptionID:completionHandler:
This method updates the push subscription with a new device tokens.
- (void)updatePushSubscriptionWithStandardPushToken:(nonnull NSData *)standardPushToken andVoipPushToken:(nonnull NSData *)voipPushToken andSubscriptionID:(nonnull NSString *)subscriptionID completionHandler:(void ( ^ _Nullable ) ( SMMobileError *_Nullable error ))completionBlock
Parameters
standardPushToken |
standard push token generated by the apns |
---|---|
voipPushToken |
voip push token generated by the apns |
subscriptionID |
unique ID assigned to the subscribed device by SPiDR/KL after the push subscription |
completionBlock |
block implementation that will be used to return success or fail @updated 5.4.0 |
Discussion
This method updates the push subscription with a new device tokens.
Declared In
SMPushService.h
– unsubscribeFromPushNotificationsWithSubscriptionID:completionHandler:
This method removes the push notification subscription.
- (void)unsubscribeFromPushNotificationsWithSubscriptionID:(nonnull NSString *)subscriptionID completionHandler:(void ( ^ _Nullable ) ( SMMobileError *_Nullable error ))completionBlock
Parameters
subscriptionID |
unique ID assigned to the subscribed device by SPiDR/KL after the push subscription |
---|---|
completionBlock |
block implementation that will be used to return success or fail |
Availability
4.6.0
Discussion
This method removes the push notification subscription.
Declared In
SMPushService.h
– injectPushMessage:completionHandler:
Enables message passing to MobileSDK (messages can be sent via push notification, websocket or any different way)
- (void)injectPushMessage:(nonnull NSDictionary *)message completionHandler:(void ( ^ _Nonnull ) ( SMMobileError *_Nullable error ))completionHandler
Parameters
message |
payload dictionary for incoming notification |
---|---|
completionHandler |
returns error if any json object parse error exists or notification data is not related with the MobileSDK |
error |
json object parse error if exists |
Availability
3.0.5 @updated 4.6.0
Discussion
Enables message passing to MobileSDK (messages can be sent via push notification, websocket or any different way)
Declared In
SMPushService.h
– parsePushNotification:
Parses Incoming Call Voip Push Notification(PushKit) and returns the information neccesary to trigger CallKit
- (SMCKInfo *_Nonnull)parsePushNotification:(NSDictionary *_Nonnull)pushMessage
Parameters
pushMessage |
payload dictionary for incoming notification |
---|
Return Value
CallKit Information Object
Availability
5.5.0
Discussion
Parses Incoming Call Voip Push Notification(PushKit) and returns the information neccesary to trigger CallKit
Declared In
SMPushService.h