-
Notifications
You must be signed in to change notification settings - Fork 4k
feat: bump Firebase iOS SDK 10.5.0
#10532
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
Conversation
10.5.0
Open issue on Flutter repo for automatic provisioning profile update flag that appears to be required for keychain entitlements: flutter/flutter#121702 |
Just wanted to mention a couple things based on my experience adopting this in react-native-firebase: 1- there are a lot of reasons an APNS token fetch may fail for an app, and developers will (for the first time ever!) be confronted by them. The APNS fetch failures are real problems, and there are a few causes, but they've been ignorable until now. Be prepared to update documentation explaining that disabling swizzling will cause failure (and show what it means...), that network timeouts may cause a failure (so, perhaps folks need to check getAPNSToken() before getToken() or subscribe to topic now, and retry a couple times...). This is a real pain point for library users 2- "(it is not possible to receive messages on a simulator)," - it is possible! If it is latest macOS + iOS, on a M1 (or newer) chip, the iOS simulator can actually do FCM, it's awesome and really useful for devs. I had to remove some compiler 3- exposing setAPNSToken as an API and calling it testing works great on Simulators that cannot do FCM/APNS (that is: current github macOS runners which are x86-64) |
Thanks for the feedback, @mikehardy! It's a little different on FlutterFire. We already check device token here and set it as the APNS token here and possibly here depending on the circumstances. You raise a good point about the latest simulator situation which I was not aware of. I have addressed here. Effectively, if the |
10.5.0
10.5.0
reason: 'Stream should only have been called 3 times', | ||
), | ||
); | ||
group( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To save reviewers time, the only changes I've made to auth tests is to skip failing tests because of keychain sharing requirement:
// macOS skipped because it needs keychain sharing entitlement. See: https://github.com/firebase/flutterfire/issues/9538
skip: defaultTargetPlatform == TargetPlatform.macOS,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was previously unformatted which is why there is a massive diff.
10.5.0
10.5.0
21a82fe
to
597d116
Compare
Description
iOS
Considering the implications for each scenario mentioned in this comment on the iOS SDK regarding Firebase Messaging, I believe we only need to set a dummy APNS token to get manually run tests to pass successfully.
Taken directly from that comment:
As far as I can tell, and after running the example app, I believe the first 3 scenarios mentioned here are taken care of as we set the APNS token here on
firebase_messaging
for iOS.This leaves just setting a dummy token for the iOS simulator when it doesn't support receiving a device token (taken from the message above, this environment supports receiving the token on a simulator: iOS 16 Simulator + macOS 13 + Apple Silicon HW.), I have simply set a dummy APNS token here and wrapped it in an iOS simulator macro and checked the device token wasn't received. This means it will only set a dummy APNS token on simulator builds that don't support receiving the device token.
macOS
firebase_auth
needs keychain sharing capability on macOS applications. The tests pass locally once keychain sharing capability is allowed and also code signing which is necessary for the keychain sharing capability to be enabled. This won't affect production apps as code signing is necessary for distribution.e2e Tests
I also removed the
requestPermission()
API request forgetToken()
&deleteToken()
as it is not needed and was timing out the tests when running manually. Presumably because requesting permission requires user response.Related Issues
I've skipped
firebase_auth
tests that will fail due to keychain sharing capability. We need the ability to allow provisioning profile updates via xcode build. I've create this issue towards that aim: flutter/flutter#121702Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process. Updating the
pubspec.yaml
and changelogs is not required.///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?