Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

This PR was automatically cherry-picked based on the following PR:

Original PR description:


BugWPB-17848 [iOS] App crashes in background when there are CallKit calls

Issue

Context: When incoming calls arrive in the background and they're handled with CallKit, app crashes.

Causes: Some changes were introduced recently in this PR where we replaced pushRetry and reportNewIncomingCall completionHandler versions of Apple's API with their async versions which appear to be broken as they're not called properly when waking up the app from the background.

It ends up crashing as since iOS 13:

if you fail to report a call to CallKit, the system will terminate your app.

..which is what we experienced when looking at the console.

Solution: As mentioned in the latest comments in this SO post and after testing with both versions (async vs. completionHandler), the issue was reproducible with the async version and appeared to work properly with the completionHandler one.
Solution is to revert these changes to make sure we use the completionHandler API versions as before, thus properly report the call and avoid crashing.

Testing

Tested internally on both async / completionHandler versions, issue was reproducible on the async version, not the completionHandler one.

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

@caldrian caldrian changed the base branch from develop to release/cycle-3.125 May 23, 2025 08:05
@caldrian caldrian force-pushed the fix/crash-incoming-calls-when-in-background-cherry-pick branch from 4ae1be7 to a17bf38 Compare May 23, 2025 08:06
Copy link
Contributor Author

Test Results

3 142 tests   3 116 ✅  4m 3s ⏱️
  441 suites     26 💤
    2 files        0 ❌

Results for commit a17bf38.

@datadog-wireapp
Copy link

Datadog Report

Branch report: fix/crash-incoming-calls-when-in-background-cherry-pick
Commit report: eb38e59
Test service: wire-ios-mono

✅ 0 Failed, 3116 Passed, 26 Skipped, 2m 3.85s Total Time

@jullianm jullianm merged commit e06527e into release/cycle-3.125 May 23, 2025
9 checks passed
@jullianm jullianm deleted the fix/crash-incoming-calls-when-in-background-cherry-pick branch May 23, 2025 08:26
zenkins pushed a commit that referenced this pull request May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants