โ Frequently Asked Questions (FAQ) & iOS Test Cases
This guide provides a comprehensive 10-step testing checklist for iOS QA/Dev validation and quick solutions to common iOS CallKit & PushKit integration issues.
๐งช QA Integration Test Cases Checklist (iOS)โ
Before deploying your iOS VoIP application to TestFlight or App Store production, execute these 10 verification scenarios on a physical iPhone:
| Test ID | Test Scenario | Steps to Execute | Expected Result | Pass/Fail |
|---|---|---|---|---|
| TC-01 | Foreground Incoming Call | Call the extension while app is open and unlocked. | Native Apple CallKit banner or full-screen UI appears with caller name & number. | [ ] |
| TC-02 | Background Incoming Call | Put app into background (Home screen) $\rightarrow$ Call extension. | Native CallKit rings with Accept & Decline buttons. | [ ] |
| TC-03 | Lockscreen Incoming Call | Lock physical iPhone $\rightarrow$ Call extension from another phone. | PushKit wakes device; full-screen native Apple CallKit UI rings with slider/buttons. | [ ] |
| TC-04 | Terminated / Killed App | Force-quit app from App Switcher $\rightarrow$ Call extension. | High-priority VoIP push launches app silently; CallKit rings normally. | [ ] |
| TC-05 | Answer Incoming Call | Tap "Accept" or slide to answer on CallKit. | Call connects, microphone un-mutes, clear two-way audio starts, call timer counts up. | [ ] |
| TC-06 | Decline Incoming Call | Tap "Decline" / "Reject" on CallKit. | Call terminates immediately (603 Decline), ringing stops on caller device. | [ ] |
| TC-07 | Early Cancellation | Caller hangs up while iPhone is still ringing. | Ringing stops immediately, CallKit dismisses without ghost ringing. | [ ] |
| TC-08 | Mute / Unmute | Tap Mute on CallKit or in-app UI during active call. | Audio is muted (remote side hears silence), then resumes cleanly upon unmuting. | [ ] |
| TC-09 | Speaker Toggle | Toggle speaker audio route during active call. | Audio seamlessly switches between iPhone receiver and loudspeaker. | [ ] |
| TC-10 | GSM Cellular Interrupt | Receive a cellular GSM phone call while in an active VoIP call. | CallKit puts VoIP call on hold gracefully; VoIP audio resumes after cellular call ends. | [ ] |
๐ ๏ธ Common iOS Pitfalls & Quick Solutionsโ
1. ๐ด Incoming call does not ring on iOS Simulatorโ
- Cause: iOS Simulator cannot receive PushKit VoIP pushes and does not generate APNs push tokens.
- Solution: Always test incoming calls on a physical iOS device (iPhone/iPad).
2. ๐ด App crashes immediately upon receiving an incoming call pushโ
- Cause (Apple Policy): iOS strictly requires that every PushKit push notification must report an incoming call to CallKit via
CXProvider.reportNewIncomingCallwithin a few seconds. If an app receives a VoIP push and fails to report a call, iOS terminates the process immediately. - Solution:
- Ensure your
AppDelegateinheritsPitelVoIPDelegateand callssuper.application(application, didFinishLaunchingWithOptions: launchOptions). - The SDK automatically handles
PKPushRegistryDelegateand reports the CallKit incoming call immediately.
- Ensure your
3. ๐ด Push notifications stopped working after several monthsโ
- Cause: Apple VoIP Services Certificates (
.p12) expire every 1 year. - Solution: Check certificate expiration date in Apple Developer Account. Renew the certificate, export a new
.p12file from Keychain Access, and upload it to the Pitel Portal.
4. ๐ด One-way audio or no sound after answeringโ
- Check 1: Info.plist: Ensure
NSMicrophoneUsageDescriptionis present inInfo.plist. - Check 2: Audio Session: If your app uses custom audio players (e.g. AVAudioPlayer, AVPlayer), ensure you do not deactivate the shared
AVAudioSessionduring an active VoIP call. - Check 3: NAT / Network: Test on 4G/5G mobile network to verify whether corporate Wi-Fi is blocking UDP RTP audio packets.
5. ๐ด Outgoing call fails or drops immediatelyโ
- Cause: The destination number passed to
PitelVoIP.makeCall(to:)is incomplete. PJSIP requires a complete SIP URI to route media and signaling packets to the registrar/PBX. - Solution: Always format the target as a valid SIP URI:
let outgoingCallId = "sip:\(destExt)@\(domain):\(port)"
PitelVoIP.makeCall(to: outgoingCallId, callerName: "Agent \(destExt)")
6. ๐จ How to customize CallScreen colors, logos, and button texts?โ
- Solution: Configure
PitelVoIP.customCallConfigin yourAppDelegatebefore calls occur:PitelVoIP.customCallConfig = PitelCallConfig(
colors: PitelCallConfig.Colors(
background: Color(red: 0.1, green: 0.1, blue: 0.12),
cardBackground: Color(red: 0.15, green: 0.15, blue: 0.18),
textPrimary: .white,
buttonBackgroundActive: Color.orange.opacity(0.2)
),
texts: PitelCallConfig.Texts(
callingText: "Connecting...",
incomingText: "Incoming Call..."
)
)