0
在Android中,您可以使用getFrom()
来阅读通知中的主题。 任何人都可以帮助我如何在iOS中了解这一点吗?如何从iOS中的Firebase消息通知中获取主题?
在Android中,您可以使用getFrom()
来阅读通知中的主题。 任何人都可以帮助我如何在iOS中了解这一点吗?如何从iOS中的Firebase消息通知中获取主题?
在Appdelegate。实现下面的函数,你可以在userInfo中获取它。
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject],
fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
// Access userInfo
let aps = userInfo["aps"] as? NSDictionary
if let aps = aps {
let alert = aps["alert"] as! NSDictionary
let body = alert["body"] as! String
let title = alert["title"] as! String
}
}