title: iOS - PushKit without VOIP / FCM with CallKit
body: <p>I am developing an application which uses CallKit for notify users. However, I am testing the application with APNs and it is not working as I expected.</p>
  
  <p>The flow should be:
  Receive FCM -> Create a call with Callkit -> user accept the call -> do something.</p>
  
  <p>THE FLOW IS SIMILAR WITH APP LIKE WHATSAPP BUT I DON'T HAVE VOIP, I JUST NEED TO MAKE SURE CALLKIT IS ACTIVATE EVERY TIME THERE IS A FCM.</p>
  
  <p>However, currently, if the app is in background or inactive, the callkit will not start.</p>
  
  <p>I am thinking of using PushKit for implement that. However, I have no experience what so ever with PushKit (and not sure if my app will be banned or not, according to this post: <a href="https://stackoverflow.com/questions/36176585/pushkit-can-we-use-push-kitvoip-push-in-chat-application-without-using-voip">PushKit: Can we use push kit(VoiP Push) in Chat Application without using VoiP</a></p>
  
  <pre><code>func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any],
                   fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -&gt; Void) {
      // If you are receiving a notification message while your app is in the background,
      // this callback will not be fired till the user taps on the notification launching the application.
      // TODO: Handle data of notification
      // With swizzling disabled you must let Messaging know about the message, for Analytics
      // Messaging.messaging().appDidReceiveMessage(userInfo)
      // Print message ID.
      if let messageID = userInfo[gcmMessageIDKey] {
          print("Message ID: \(messageID)")
      }
  
      let aps = userInfo["aps"] as! [String: AnyObject]
      // 1
      if aps["content-available"] as? Bool == true {
          let uuid = UUID(uuidString: MyVariables.uuid)
  
          AppDelegate.shared.displayIncomingCall(uuid: uuid!, handle: "Sanoste", hasVideo: false) { _ in}
  
      }else  {
          completionHandler(UIBackgroundFetchResult.newData)
      }
  
      // Print full message.
      print(userInfo)
  
      completionHandler(UIBackgroundFetchResult.newData)
  
  }
  </code></pre>
  
  <p>The code above is what I am using right now for CallKit.</p>