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

feat: bump Firebase iOS SDK 10.5.0 #10532

Merged
merged 35 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
fd2418f
feat: iOS SDK 10.5.0
russellwheatley Feb 27, 2023
0f7db9f
chore: add fake APNS token so manually run tests work as intended
russellwheatley Feb 27, 2023
2996896
test(firebase_messaging): reinstate APNS token test
russellwheatley Feb 27, 2023
85182ee
test(firebase_messaging, iOS): wrap APNS token setting in iOS simulat…
russellwheatley Feb 27, 2023
3cb893d
test(messaging, macOS): update test app. needs push service enable & …
russellwheatley Feb 28, 2023
3f1f02d
ci: possible fix to provisioning profile for macOS
russellwheatley Feb 28, 2023
1385284
ci: format yaml
russellwheatley Feb 28, 2023
a139b46
ci: permission to execute script
russellwheatley Feb 28, 2023
344125a
Update install-custom-flutter.sh
russellwheatley Feb 28, 2023
825e548
ci: install melos
russellwheatley Feb 28, 2023
d4158b4
ci: flutter
russellwheatley Feb 28, 2023
b17a104
ci: get it working before updating to custom git branch
russellwheatley Mar 1, 2023
24b30aa
ci: get it working before updating to custom git branch
russellwheatley Mar 1, 2023
41532ef
ci: permission
russellwheatley Mar 1, 2023
c3763a5
ci: update to custom branch
russellwheatley Mar 1, 2023
f553dfd
ci: update to custom branch
russellwheatley Mar 1, 2023
b66768f
ci: update to flutter repo
russellwheatley Mar 1, 2023
479fa0e
ci: update to invertase repo
russellwheatley Mar 1, 2023
4699e74
ci: update to macos-provisioning branch
russellwheatley Mar 1, 2023
46027c4
ci: update to stable branch which contains change to build commands
russellwheatley Mar 1, 2023
9a845f1
ci: update to clone at specific tag
russellwheatley Mar 1, 2023
9590fef
ci: update
russellwheatley Mar 1, 2023
342ffb2
Delete install-custom-flutter.sh
russellwheatley Mar 7, 2023
17324b0
Delete install-melos.sh
russellwheatley Mar 7, 2023
62492d0
ci: revert macos workflow
russellwheatley Mar 7, 2023
1466a89
chore(messaging): allow certain iOS simulators to use actual `deviceT…
russellwheatley Mar 7, 2023
c3a2837
Merge branch 'master' into ios-sdk-10.5.0
russellwheatley Mar 7, 2023
3bba5d8
format
russellwheatley Mar 7, 2023
ba61a5f
ci: remove test app aps entitlements for macOS
russellwheatley Mar 7, 2023
1eea3e8
ci: remove code signing team
russellwheatley Mar 7, 2023
e307ab3
test(firebase_auth): skip macOS tests failing because of keychain sha…
russellwheatley Mar 8, 2023
670d318
fix analyze issues
russellwheatley Mar 8, 2023
7037ca6
test: skip e2e test for android
russellwheatley Mar 8, 2023
597d116
test: skip e2e test for macOS. iOS only.
russellwheatley Mar 8, 2023
3051ea0
Merge branch 'master' into ios-sdk-10.5.0
russellwheatley Mar 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://firebase.google.com/support/release-notes/ios
def firebase_sdk_version!()
'10.3.0'
'10.5.0'
end
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ @implementation FLTFirebaseMessagingPlugin {
NSObject<FlutterPluginRegistrar> *_registrar;
NSData *_apnsToken;
NSDictionary *_initialNotification;
bool simulatorToken;

// Used to track if everything as been initialized before answering
// to the initialNotification request
Expand Down Expand Up @@ -52,6 +53,7 @@ - (instancetype)initWithFlutterMethodChannel:(FlutterMethodChannel *)channel
_initialNotificationGathered = NO;
_channel = channel;
_registrar = registrar;
simulatorToken = false;
// Application
// Dart -> `getInitialNotification`
// ObjC -> Initialize other delegates & observers
Expand Down Expand Up @@ -998,6 +1000,22 @@ + (NSDictionary *)remoteMessageUserInfoToDict:(NSDictionary *)userInfo {
- (void)ensureAPNSTokenSetting {
FIRMessaging *messaging = [FIRMessaging messaging];

// With iOS SDK >= 10.4, an APNS token is required for getting/deleting token. We set a dummy
// token for the simulator for test environments. Historically, a simulator will not work for
// messaging. It will work if environment: iOS 16, running on macOS 13+ & silicon chip. We check
// the `_apnsToken` is nil. If it is, then the environment does not support and we set dummy
// token.
#if TARGET_IPHONE_SIMULATOR
if (simulatorToken == false && _apnsToken == nil) {
NSString *str = @"fake-apns-token-for-simulator";
NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding];
[[FIRMessaging messaging] setAPNSToken:data type:FIRMessagingAPNSTokenTypeSandbox];
}
// We set this either way. We set dummy token once as `_apnsToken` could be nil next time
// which could possibly set dummy token unnecessarily
simulatorToken = true;
#endif

if (messaging.APNSToken == nil && _apnsToken != nil) {
#ifdef DEBUG
[[FIRMessaging messaging] setAPNSToken:_apnsToken type:FIRMessagingAPNSTokenTypeSandbox];
Expand Down
Loading