Pushwoosh/pushwoosh-ios-sdk

Function - (void)onPushAccepted does not called

Closed this issue · 2 comments

Function - (void)onPushAccepted:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification onStart:(BOOL)onStart is not called after user taps on push
Framework Version: Pushwoosh (5.23.0)

  1. Setup Pushwoosh framework:

`
NSString *appCode = @"some_code";
[PushNotificationManager initializeWithAppCode:appCode appName:@"appName"];

PushNotificationManager * pushManager = [PushNotificationManager pushManager];
pushManager.delegate = self;

[UNUserNotificationCenter currentNotificationCenter].delegate = [PushNotificationManager pushManager].notificationCenterDelegate;

// track application open statistics
[[PushNotificationManager pushManager] sendAppOpen];
[[PushNotificationManager pushManager] registerForPushNotifications]; 

`

  1. Send push with structure:
    { "aps": { "alert": "Hi", "content-available": "1" }, "data": { "type": "catalog", "value": "", "title": "Price" } }

  2. Push is handled by application

  3. Tap on push

Expected behaviour:
Function - (void)onPushAccepted:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification onStart:(BOOL)onStart is called after user taps on push

Actial behaviour:
Function - (void)onPushAccepted:(PushNotificationManager *)pushManager withNotification:(NSDictionary *)pushNotification onStart:(BOOL)onStart is NOT called after user taps on push

wfhm commented

@IgorFedurchuk,

Checking it.

wfhm commented

Resolved via support ticket. Push payload should contain "pw_msg":1 key for SDK to handle it.