0

我无法使用此功能获得 voip 令牌

func registerVoipNotifications() {
    let mainQueue = dispatch_get_main_queue()
    let voipRegistry: PKPushRegistry = PKPushRegistry(queue: mainQueue)
    voipRegistry.delegate = self
    voipRegistry.desiredPushTypes = [PKPushTypeVoIP]
}

func pushRegistry(registry: PKPushRegistry,
                  didUpdatePushCredentials credentials: PKPushCredentials,
                                           forType type: String) {

    //print out the VoIP token. We will use this to test the nofications.
    let voipToken = credentials.token
    self.getSipSetting("\(voipToken)")

}

但我无法输入“didUpdatePushCredentials”。

使用ios9,我没有这个问题。

你有想法吗 ?

4

1 回答 1

0
  • 您是否在项目功能中启用了推送通知?
  • 您是否在应用程序 ID 配置中添加了 SSL 证书(Apple Push Notification service SSL Certificates)?
于 2016-10-13T17:42:23.317 回答