【发布时间】:2017-05-02 05:21:37
【问题描述】:
我的应用中有设置,我有一个切换按钮,用于打开打开和关闭声音和振动 也是如此,同时接收远程通知。下面是我在AppDelegate注册远程通知的代码
let notificationTypes: UIUserNotificationType = [UIUserNotificationType.Alert, UIUserNotificationType.Sound]
let pushNotificationSettings = UIUserNotificationSettings(forTypes: notificationTypes, categories: nil)
application.registerUserNotificationSettings(pushNotificationSettings)
application.registerForRemoteNotifications()
对于声音,我提到了这个Remove sound from notification,但它似乎不起作用。
Whatsapp 有这个功能,所以肯定有可能
谁能给点建议?
【问题讨论】:
标签: ios swift audio vibration remote-notifications