0
VoIP 서비스 푸시를받을 수 있도록 PKPushRegistry를 설정하려고하지만 대리자가 실행되지 않습니다. 나는 프로세스의 첫 부분이 작동하고 있다는 것을 알고 있으므로 devicetoken을 성공적으로 가져 왔습니다. 또한, 내 서버에는 두 종류의 푸시에 대한 적절한 인증서가 있습니다.Voip services (PKPush) 대리자 메서드가 호출되지 않음
class AppDelegate: UIResponder, UIApplicationDelegate, PKPushRegistryDelegate {
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
self.voipRegistration()
}
func voipRegistration() {
let mainQueue = DispatchQueue.main
let voipRegistry: PKPushRegistry = PKPushRegistry(queue: mainQueue)
voipRegistry.delegate = self
voipRegistry.desiredPushTypes = [PKPushType.voIP]
}
func pushRegistry(_ registry: PKPushRegistry, didInvalidatePushTokenFor type: PKPushType) {
//
}
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType) {
//
}
func pushRegistry(_ registry: PKPushRegistry, didUpdate pushCredentials: PKPushCredentials, for type: PKPushType) {
//
}
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping() -> Void) {
//
}