简体   繁体   English

我可以在本地推送通知而不是远程通知中使用可变内容吗?

[英]Can I use mutable-content with local push notification instead of remote notification?

Can I use mutable-content with local push notification instead of remote notification?我可以在本地推送通知而不是远程通知中使用可变内容吗?

For example, send it in userInfo and use Notification Service Extension.例如,在 userInfo 中发送它并使用通知服务扩展。

NO.不。

If you are using the mutable-content and notifications service extension then as per Apple doc it clearly says:-如果您使用的是可变内容和通知服务扩展,那么根据Apple 文档,它清楚地说明:-

An object that modifies the content of a remote notification before it is delivered to the user.在将远程通知传送给用户之前修改远程通知内容的对象。

So you can't use service extension for the purpose of modifying content for local notification before it is delivered to the user.因此,您不能使用服务扩展来修改本地通知的内容,然后再将其交付给用户。

However, if you are trying to present custom interface you can always use content extension for local notification.但是,如果您尝试呈现自定义界面,您始终可以使用内容扩展进行本地通知。

Hope it clarifies.希望它澄清。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否确保UNNotificationServiceExtension调用可变内容= 1的每个通知 - Is UNNotificationServiceExtension guaranteed to call for every notification with mutable-content=1 如何在ios中一起使用本地通知和推送通知? - can I use local notification and push notification together in ios? 我应该使用推送还是可以使用本地通知? - Should I use push or can I use local notification? 本地推送通知可以包含可变内容吗? - Can a local push notification have variable content? 在Twilio聊天iOS APN推送有效载荷中将可变内容设置为1 - Set mutable-content to 1 in Twilio chat iOS APN push payload 我可以使用远程通知消息应用程序来唤醒我的应用程序,因为我不能使用推送工具包 - Can I use Remote Notification for messaging app to wake up my application since I can not use push kit 在远程通知上安排本地通知 - Schedule Local notification on Remote Notification (快速3)我需要向用户发送通知,以在特定时间打开应用。 更好地使用本地或推送通知? - (Swift 3) I need to send a notification to the user to open the app at a specific time. Better to use a local or push notification? PN(推送通知)远程通知到达时如何长时间播放声音 - how can I play sound for long time when PN(push-notification) remote notification arrive 具有丰富内容的iOS推送通知-我可以阻止通知被轻按吗? - iOS Push Notification with Rich Content - Can I prevent a notification from being tappable?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM