PyzeNotification

@interface PyzeNotification : NSObject

PyzeNotification Use this class to define Pyze default notification categories, push payload and handle default notification actions provided by Pyze (Ex. Share/Deep link/Web page url).

Since

3.7.0
  • Use this API to get the list of Pyze default notification categories available.

    Since

    3.7.0

    Declaration

    Objective-C

    + (NSSet *)getPyzeDefaultNotificationCategories;

    Swift

    class func getPyzeDefaultNotificationCategories() -> Any!

    Return Value

    NSSet containing Push categories

  • This will perform the selected notification action as identified by ‘actionIdentifier’

    Declaration

    Objective-C

    + (void)handlePushNotificationResponseWithUserinfo:(NSDictionary *)userInfo
                                      actionIdentifier:(NSString *)actionIdentifier;

    Swift

    class func handlePushResponse(withUserinfo userInfo: Any!, actionIdentifier: Any!)

    Parameters

    userInfo

    User info dictionary obtained from the notification receive callback method in AppDelegate

    actionIdentifier

    Identifier of user opted action.

  • THIS METHOD IS DEPRECATED. USE ‘parsePushNotificationResponseWithUserinfo:completionHandler:’

    Use this API to parse the push notification response.

    Declaration

    Objective-C

    + (void)parsePushNotificatoinResponseWithUserinfo:(NSDictionary *)userInfo
                                    completionHandler:
                                        (void (^)(PyzeNotificationContent *))
                                            completionHandler;

    Swift

    class func parsePushNotificatoinResponse(withUserinfo userInfo: Any!, completionHandler: ((PyzeNotificationContent?) -> Void)!)

    Parameters

    userInfo

    User information received as a payload

    completionHandler

    Completion handler, with ‘PyzeNotificationContent’ as parameter

  • Use this API to parse the push notification response.

    Declaration

    Objective-C

    + (void)parsePushNotificationResponseWithUserinfo:(NSDictionary *)userInfo
                                    completionHandler:
                                        (void (^)(PyzeNotificationContent *))
                                            completionHandler;

    Swift

    class func parsePushResponse(withUserinfo userInfo: Any!, completionHandler: ((PyzeNotificationContent?) -> Void)!)

    Parameters

    userInfo

    User information received as a payload

    completionHandler

    Completion handler, with ‘PyzeNotificationContent’ as parameter

  • THIS METHOD IS DEPRECATED. USE ‘parsePushNotificationResponseWithUserinfo:actionIdentifier:completionHandler:’

    Use this API to parse the push notification response. In addition to ‘parsePushNotificatoinResponseWithUserinfo:completionHandler:’, this method will provide 'PyzeNotificationContent.selectedAction’ which is the user opted action and respective details.

    Declaration

    Objective-C

    + (void)parsePushNotificatoinResponseWithUserinfo:(NSDictionary *)userInfo
                                     actionIdentifier:(NSString *)actionIdentifier
                                    completionHandler:
                                        (void (^)(PyzeNotificationContent *))
                                            completionHandler;

    Swift

    class func parsePushNotificatoinResponse(withUserinfo userInfo: Any!, actionIdentifier: Any!, completionHandler: ((PyzeNotificationContent?) -> Void)!)

    Parameters

    userInfo

    User information received as a payload

    actionIdentifier

    Identifier of user opted action.

    completionHandler

    Completion handler, with ‘PyzeNotificationContent’ as parameter

  • Use this API to parse the push notification response. In addition to ‘parsePushNotificationResponseWithUserinfo:completionHandler:’, this method will provide ‘PyzeNotificationContent.selectedAction’ which is the user opted action and respective details.

    Declaration

    Objective-C

    + (void)parsePushNotificationResponseWithUserinfo:(NSDictionary *)userInfo
                                     actionIdentifier:(NSString *)actionIdentifier
                                    completionHandler:
                                        (void (^)(PyzeNotificationContent *))
                                            completionHandler;

    Swift

    class func parsePushResponse(withUserinfo userInfo: Any!, actionIdentifier: Any!, completionHandler: ((PyzeNotificationContent?) -> Void)!)

    Parameters

    userInfo

    User information received as a payload

    actionIdentifier

    Identifier of user opted action.

    completionHandler

    Completion handler, with ‘PyzeNotificationContent’ as parameter