Я хочу перейти к определенному контроллеру представления после того, как я нажал push-уведомление, как это сделать здесь с уведомлениями OneSignal Push?OneSignal нажмите кнопку push для перехода к контроллеру представления iOS Swift
_ = OneSignal(launchOptions: launchOptions, appId: "b2f7f966-d8cc-11e4-bed1-df8f05be55ba") { (message, additionalData, isActive) in
NSLog("OneSignal Notification opened:\nMessage: %@", message)
if additionalData != nil {
NSLog("additionalData: %@", additionalData)
// Check for and read any custom values you added to the notification
// This done with the "Additonal Data" section the dashbaord.
// OR setting the 'data' field on our REST API.
if let customKey = additionalData["newid"] as! Int {
//The navigation to a view controller code should be goes here...
//I've no idea how to do it, I've tried some ways from stackoverflow also didn't work for me
}
}
}
Я считаю, что это общий вопрос о глубокой привязке. Pl взгляните на [это] (http://docs.urbanairship.com/topic-guides/ios-deep-linking.html) и [еще одна ссылка] (http://www.brianjcoleman.com/tutorial-deep -linking-in-swift /) – Raviprakash