【问题标题】:iOS 13 not getting VoIP Push tokeniOS 13 未获得 VoIP 推送令牌
【发布时间】:2020-03-03 17:01:41
【问题描述】:

我通过以下代码在AppDelegate 方法func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool 中为PKPushRegistry 注册委托:

let voipRegistry: PKPushRegistry = PKPushRegistry(queue: nil)
voipRegistry.delegate = self
voipRegistry.desiredPushTypes = [.voIP]
self.voipRegistry = voipRegistry

当我在 iOS 12 上运行应用程序时,一切正常 - 方法 func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) 被触发,但在 iOS 13 情况下,此方法根本不会被触发。

在 iOS 13 案例中我做错了什么?可能我需要添加一些额外的代码吗?

【问题讨论】:

    标签: ios voip pushkit


    【解决方案1】:

    我不知道发生了什么变化,但一天之后一切正常 - 收到令牌,触发方法 func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-04
      • 1970-01-01
      • 2019-08-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多