首页 > 解决方案 > 应用程序暂停时的 Ionic iOS 推送通知

问题描述

`didFinishLaunchingWithOptions` can be called and can get the notification details. With notification details, there is a URL that needs to be opened in the in-app browser. We tried our self to open the InAppBrowser in the `AppDelegate` but, can't be achieved. Is there any alternative workaround to achieve this?

为了实现这个目标,我需要自定义cordova插件,但我对Objective C很陌生。从警报正文中我可以得到URL字符串。现在,我需要从无法实现的目标 C 打开/启动科尔多瓦插件“InAppBrowser”。我在导入应用内浏览器插件后尝试了以下方法,但没有运气

代码:NSMutableDictionary *userInfo =

[launchOptionsbjectForKey:
UIApplicationLaunchOptionsRemoteNotificationKey]; 
if (userInfo.count>=1) {

NSDictionary *apsInfo1 = [userInfo objectForKey:@"aps"]; 
NSDictionary *alertData = [apsInfo1 objectForKey:@"alert"]; 
NSString *alertDataBody = [alertData objectForKey:@"body"]; 

}
I have tried the below after importing  but no luck. How to open the cordova plugin features from Objective C? .

谢谢

贾瓦哈拉尔

标签: iospush-notification

解决方案


推荐阅读