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