CKNotificationInfo soundName does not work

后端 未结 1 1647
醉酒成梦
醉酒成梦 2021-01-25 00:06

Sbuscription is create like below. It works, but no sound generated, why? Doc says: if you specify the string default for this property, the system plays the default alert

1条回答
  •  花落未央
    2021-01-25 00:48

    Need to update registerUserNotificationSettings method call too.

    UIApplication.sharedApplication().registerUserNotificationSettings(UIUserNotificationSettings(forTypes: .Sound | .Alert, categories: nil))
    

    0 讨论(0)
提交回复
热议问题