[PR #1589] [MERGED] fix for crash when terminating iOS app #2985

Closed
opened 2025-11-26 23:26:46 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1589
Author: @mpbw2
Created: 10/15/2021
Status: Merged
Merged: 10/16/2021
Merged by: @mpbw2

Base: masterHead: bugfix-crash-on-terminate


📝 Commits (1)

  • 97643e5 fix for crash when terminating app

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 src/iOS/AppDelegate.cs (+6 -0)

📄 Description

App crashes on iOS 15 when terminating because the KeyWindow is null where (to my knowledge) it shouldn't be. I added a null check before we attempt to draw the splash screen over top of the main window when backgrounding the app.

I originally thought this was fixed in 15.0.1 but it's still happening in 15.0.2. I can find no mention of this being the expected behavior, but it does look like KeyWindow was deprecated in iOS 13, and the work needed to update this (transition to scenes?) is currently over my head. For now this simple approach will stop the super annoying crash without breaking our existing behavior for normal backgrounding.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1589 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 10/15/2021 **Status:** ✅ Merged **Merged:** 10/16/2021 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `bugfix-crash-on-terminate` --- ### 📝 Commits (1) - [`97643e5`](https://github.com/bitwarden/android/commit/97643e5a3f51ceb6e06b8551ed4757680c660e9e) fix for crash when terminating app ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/iOS/AppDelegate.cs` (+6 -0) </details> ### 📄 Description App crashes on iOS 15 when terminating because the KeyWindow is null where (to my knowledge) it shouldn't be. I added a null check before we attempt to draw the splash screen over top of the main window when backgrounding the app. I originally thought this was fixed in 15.0.1 but it's still happening in 15.0.2. I can find no mention of this being the expected behavior, but it does look like KeyWindow was deprecated in iOS 13, and the work needed to update this (transition to scenes?) is currently over my head. For now this simple approach will stop the super annoying crash without breaking our existing behavior for normal backgrounding. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:26:46 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2985