首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何以编程方式将iOS的远程通知配置为仅振动而不播放声音或播放声音而不振动?

如何以编程方式将iOS的远程通知配置为仅振动而不播放声音或播放声音而不振动?
EN

Stack Overflow用户
提问于 2016-11-16 12:41:27
回答 1查看 160关注 0票数 1

如何以编程方式将iOS推送通知配置为:

代码语言:javascript
复制
not play sound + not vibrate --> OK (Not set `sound` value when push notification)
not play sound + vibrate --> OK (play custom sound (sound with no sound) .i.e: 'sound': 'mute.aiff'))
play sound + vibrate? --> OK (Set `sound` i.e. to `default`)
play sound + not vibrate ???
EN

回答 1

Stack Overflow用户

发布于 2016-11-16 13:00:32

代码语言:javascript
复制
You can use a silent remote notification
add the remote-notification key in  UIBackgroundModes  in your application Info.plist file. 
For more info please check UIBackgroundModes

<key>UIBackgroundModes</key>
<array>
    <string>remote-notification</string>
</array>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40624203

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档