I am trying to make an app the launches the app or the incoming call UI when a silent notification is received.
Currently I have the notifications working and I am able to send a notification and print out a log when I receive the notification
This function handels the receiving of notifications:
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void){
print("Enitre message \(userInfo)")
let state: UIApplication.State = application.applicationState
switch state {
case UIApplication.State.active:
print("State: App is active")
case UIApplication.State.inactive:
print("State: App is inactive")
case UIApplication.State.background:
print("State: App is running in the background")
default:
print("State: Unknown")
}
completionHandler(UIBackgroundFetchResult.newData)
}
Is it possible to open the app or incoming call UI in this function?
First register for VOIP Notification in
Import the call kit
Register Push kit
Delegates of VOIP(Push Kit)
Call incomingcall Method
And Call Kit Delegates Methods
Still if you require anything so please let us know. :)