Skip to content

Latest commit

 

History

History
89 lines (54 loc) · 2.6 KB

PUSHKIT.md

File metadata and controls

89 lines (54 loc) · 2.6 KB

Flutter Callkit Incoming

Setup Pushkit for IOS.

If you are making VoIP application than you definitely want to update your application in the background state as well as wake your application when any VoIP call is being received.

🚀  Setup

Make sure when you create Bundle ID(https://developer.apple.com/account/resources/identifiers) for app you have checked Push Notifications

  1. Enable Voice over IP Setting
  • Xcode Project > Capabilities

    image info



  • Export .p12

    image info


  • Convert .p12 to .pem (VOIP.pem)

      openssl pkcs12 -in YOUR_CERTIFICATES.p12 -out VOIP.pem -nodes -clcerts

  1. Configure VoIP Push Notifications in Xcode project (Swift)
  • Setup VoIP

    image info


  • DeviceToken and handle incoming pushs image info

  • Start call from Recent history on click (add if necessary)

    image info




3. Testing
  • Using Curl

    curl -v \
    -d '{"aps":{"alert":"Hien Nguyen Call"},"id":"44d915e1-5ff4-4bed-bf13-c423048ec97a","nameCaller":"Hien Nguyen","handle":"0123456789","isVideo":true}' \
    -H "apns-topic: com.hiennv.testing.voip" \
    -H "apns-push-type: voip" \
    --http2 \
    --cert VOIP.pem:'<passphrase>' \
    https://api.development.push.apple.com/3/device/<device token>
    
  • NOTE

    To be able to testing in Terminated State Xcode -> Edit Schema -> Wait for the executable to be launched