[PR #1708] [MERGED] Fixes for iOS push notifications #89643

Closed
opened 2026-05-27 03:22:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1708
Author: @fedemkr
Created: 1/6/2022
Status: Merged
Merged: 1/18/2022
Merged by: @fedemkr

Base: masterHead: bug/fix-ios-push-notifications


📝 Commits (3)

  • c1c7650 WIP Fixes for iOS push notifications
  • c323add WIP Fixes for iOS push notifications, fix missed implementation on android
  • d905e0d Fix some issues on the push notifications, changed to Debug Console.WriteLine, and added update on entitlements on the build.yml

📊 Changes

8 files changed (+106 additions, -30 deletions)

View changed files

📝 .github/workflows/build.yml (+9 -0)
📝 src/Android/Services/AndroidPushNotificationService.cs (+3 -0)
📝 src/App/Abstractions/IPushNotificationService.cs (+1 -0)
📝 src/App/Pages/Accounts/LockPageViewModel.cs (+6 -7)
📝 src/App/Services/NoopPushNotificationService.cs (+2 -0)
📝 src/iOS/Entitlements.plist (+3 -1)
📝 src/iOS/Services/iOSPushNotificationHandler.cs (+53 -14)
📝 src/iOS/Services/iOSPushNotificationService.cs (+29 -8)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fix iOS push notifications so that they work. This also needs this PR from server to work.

Code changes

  • Entitlements.plist: Enabled Push Notifications APS environment
  • iOSPushNotificationService.cs: Updated ask for auth and registering to iOS 10+ way
  • iOSPushNotificationHandler.cs: Implemented IUNUserNotificationCenterDelegate for foreground notifications iOS 10+
  • build.yml: Added replacement in Entitlements.plist of aps-environment to set production value on release.
  • Changed Console.WriteLine to Debug.WriteLine

Testing requirements

We need to test that the push notifications are working correctly, so one way is to open a Cypher on the app and go to the Web vault of the same user and change the password of the Cypher, after saving the changes the app should sync the values.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 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/1708 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 1/6/2022 **Status:** ✅ Merged **Merged:** 1/18/2022 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `bug/fix-ios-push-notifications` --- ### 📝 Commits (3) - [`c1c7650`](https://github.com/bitwarden/android/commit/c1c765048b88b6beb2abd5ce20e60f7c516d702b) WIP Fixes for iOS push notifications - [`c323add`](https://github.com/bitwarden/android/commit/c323addda99931a209634ad164cc9911cd3488f8) WIP Fixes for iOS push notifications, fix missed implementation on android - [`d905e0d`](https://github.com/bitwarden/android/commit/d905e0d8b7cf92e8c1277228b004a51350e50481) Fix some issues on the push notifications, changed to Debug Console.WriteLine, and added update on entitlements on the build.yml ### 📊 Changes **8 files changed** (+106 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yml` (+9 -0) 📝 `src/Android/Services/AndroidPushNotificationService.cs` (+3 -0) 📝 `src/App/Abstractions/IPushNotificationService.cs` (+1 -0) 📝 `src/App/Pages/Accounts/LockPageViewModel.cs` (+6 -7) 📝 `src/App/Services/NoopPushNotificationService.cs` (+2 -0) 📝 `src/iOS/Entitlements.plist` (+3 -1) 📝 `src/iOS/Services/iOSPushNotificationHandler.cs` (+53 -14) 📝 `src/iOS/Services/iOSPushNotificationService.cs` (+29 -8) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Fix iOS push notifications so that they work. This also needs [this PR](https://github.com/bitwarden/server/pull/1808) from server to work. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **Entitlements.plist:** Enabled Push Notifications APS environment * **iOSPushNotificationService.cs:** Updated ask for auth and registering to iOS 10+ way * **iOSPushNotificationHandler.cs:** Implemented `IUNUserNotificationCenterDelegate` for foreground notifications iOS 10+ * **build.yml:** Added replacement in `Entitlements.plist` of `aps-environment` to set `production` value on release. * Changed `Console.WriteLine` to `Debug.WriteLine` ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> We need to test that the push notifications are working correctly, so one way is to open a Cypher on the app and go to the Web vault of the same user and change the password of the Cypher, after saving the changes the app should sync the values. ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [x] This change has particular **deployment requirements** (notify the DevOps team) --- <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 2026-05-27 03:22:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#89643