Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FXIOS-8314 [v124]: Removes all usages of apns in keychain #18430

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

tarikeshaq
Copy link
Contributor

📜 Tickets

Jira ticket
Github issue

💡 Description

We moved to the new push component in v116, and since then there has been no need to store the APNS token in keychain. It's also been a few releases since then and I believe it safe enough to remove the removal of the apns tokens as well, it's also inconsequential if a user upgrading from v115 to v124 keeps an old apns token in their local-only keychain.

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed I updated documentation / comments for complex code and public methods

@tarikeshaq tarikeshaq requested a review from a team as a code owner January 26, 2024 22:12
Comment on lines -74 to -82
NotificationCenter.default.addObserver(forName: .ProfileDidStartSyncing, object: nil, queue: .main) { _ in
let kc = MZKeychainWrapper.sharedClientAppContainerKeychain
if kc.string(
forKey: KeychainKey.apnsToken,
withAccessibility: MZKeychainItemAccessibility.afterFirstUnlock
) == nil {
NotificationCenter.default.post(name: .RegisterForPushNotifications, object: nil)
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this probably led to users having to update their push notification every sync because the apns token will be nil for any user who didn't migrate from the before times.

We don't need to try to re-register for push notifications every sync, there are already recovery mechanisms if a user's push subscriptions change

@mobiletest-ci-bot
Copy link

Messages
📖 Project coverage: 33.67%
📖 Edited 6 files
📖 Created 0 files

Client.app: Coverage: 32.32

File Coverage
AppDelegate+PushNotifications.swift 0.0% ⚠️
FxAPushMessageHandler.swift 0.0% ⚠️
FxAWebViewModel.swift 0.0% ⚠️

NotificationService.appex: Coverage: 25.59

File Coverage
FxAPushMessageHandler.swift 0.0% ⚠️

libAccount.a: Coverage: 32.2

File Coverage
PushNotificationSetup.swift 0.0% ⚠️
RustFirefoxAccounts.swift 17.37% ⚠️

Generated by 🚫 Danger Swift against 8d6f971

@adudenamedruby adudenamedruby merged commit f4c3744 into mozilla-mobile:main Jan 29, 2024
10 checks passed
jjSDET pushed a commit to jjSDET/firefox-ios that referenced this pull request Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants