Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

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

Original PR description:


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.

Copy link
Collaborator

@netbe netbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no merge conflict

@netbe netbe requested a review from jullianm May 26, 2025 12:46
@jullianm jullianm enabled auto-merge May 26, 2025 12:47
Copy link
Contributor Author

Test Results

    2 files    157 suites   2m 53s ⏱️
1 332 tests 1 329 ✅ 0 💤 3 ❌
1 332 runs  1 332 ✅ 0 💤 0 ❌

For more details on these failures, see this check.

Results for commit 61b0c1e.

@jullianm jullianm added this pull request to the merge queue May 26, 2025
@datadog-wireapp
Copy link

Datadog Report

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

✅ 0 Failed, 1332 Passed, 0 Skipped, 1m 53.75s Total Time

Merged via the queue into develop with commit 16002c4 May 26, 2025
10 checks passed
@jullianm jullianm deleted the fix/crash-incoming-calls-when-in-background-cherry-pick-cherry-pick branch May 26, 2025 13:29
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