I have the following curl request

In

func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { let userInfo = response.notification.request.content.userInfo if let type = userInfo["type"] as? String, type == "new_summary", let summaryId = userInfo["summaryId"] as? String { MUser.sharedInstance.prevBookId = Int(summaryId) ?? 0 NotificationCenter.default.post( name: NSNotification.Name("OpenSummaryFromPush"), object: summaryId ) }

It doesn't recognize the summaryId. I'm I doing something wrong?

-d '{ "interests": ["hello_1"], "apns": { "aps": { "alert": { "title": "New Book Summary", "body": "Check out new summary It is not You" }, "sound": "default" } }, "data": { "type": "new_summary", "summaryId": "710" } }'

Chris Hansen's user avatar

1

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.