我有远程通知字典,但如何取出 AlertBody?
NSDictionary remoteNotification = options
[UIApplication.LaunchOptionsRemoteNotificationKey] as NSDictionary;
来自远程通知?
Best Answer-推荐答案 strong>
这对我有用:
发送推送通知:
oPushService.QueueNotification(NotificationFactory.Apple()
.ForDeviceToken("YourDeviceTokenASDASD!@#SDF")
.WithCustomItem("MyCustomItem","Item 3")
.WithAlert("Alert pop message")
.WithSound("default")
.WithBadge(7)));
在客户端:
void processNotification(NSDictionary options, bool fromFinishedLaunching) {
(options != null && options.ContainsKey(new NSString("aps"))) {
NSDictionary alertMsg = options;
NSObject codeCustomValue = alertMsg[NSObject.FromObject("MyCustomItem")];
// .... and continue your code.... }
希望对你有帮助!
阿曼多
关于c# - 单点触控 : getting NSDictionary value,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/11336527/
|