如何以编程方式配置iOS'远程通知,只是振动不播放声音或播放声音而不振动?

时间:2016-11-16 04:41:27

标签: ios push-notification remote-notifications

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

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 ???

1 个答案:

答案 0 :(得分:0)

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>