如何知道PushKit注册失败

时间:2018-08-20 14:21:56

标签: ios apple-push-notifications pushkit

在苹果公司PKPushRegistry的文档中,以下是注册PushRegistry对象的示例。

func registerForVoIPPushes() {
    self.voipRegistry = PKPushRegistry(queue: nil)
    self.voipRegistry.delegate = self
    self.voipRegistry.desiredPushTypes = [PKPushTypeVoIP]
}

它表示为期望的PushTypes设置值会向PushKit服务器注册推送注册表对象。注册完成或失败时,表示已通知委托对象。成功后,委托将接收可用于发送推送通知的推送令牌,但未说明注册失败时如何通知委托。代表如何获得此通知?

0 个答案:

没有答案