Core Problem: VoIP push notifications are not delivered to the application when it is in the background or terminated. After reviewing existing discussions on the forum, I concluded that the cause might be related to CallKit not having enough time to register. Yes, that's sort of correct. I think root of the problem is actually here: private let voipRegistry = PKPushRegistry(queue: .main) private var provider: CXProvider? ...and is tied to the dynamic of how static object initialization occurs. Basically, your PKPushRegistry object is going to be created IMMEDIATELY after your AppDelegate object is created and before basically any normal app methods are called, including didFinishLaunchingWithOptions. I'm not sure how the full process plays out from there, but I think the net result is that you're losing the initial push because of the time gap between PKPushRegistry's creation and when didFinishLaunchingWithOptions is called and the rest of your initialization completes. One thing to note here is th
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags: