From 0e01ab3d729979fb875139a0397648d9b2870a23 Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Mon, 28 Sep 2020 15:35:23 +0200 Subject: [PATCH 1/3] workaround for image picker crash in ios 14 - use UIModalPresentationPopover --- .../image_picker/ios/Classes/FLTImagePickerPlugin.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m b/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m index 00fdec245aaf..90485cf73b00 100644 --- a/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m +++ b/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m @@ -68,7 +68,7 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result if ([@"pickImage" isEqualToString:call.method]) { _imagePickerController = [[UIImagePickerController alloc] init]; - _imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext; + _imagePickerController.modalPresentationStyle = UIModalPresentationPopover; _imagePickerController.delegate = self; _imagePickerController.mediaTypes = @[ (NSString *)kUTTypeImage ]; From 7e38a5ee6216428eaa460958497bcaa9fcc07792 Mon Sep 17 00:00:00 2001 From: Dominik Roszkowski Date: Mon, 28 Sep 2020 19:00:41 +0200 Subject: [PATCH 2/3] workaround for image picker crash in ios 14 - use UIModalPresentationPopover for pickVideo --- .../image_picker/ios/Classes/FLTImagePickerPlugin.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m b/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m index 90485cf73b00..def690ca651e 100644 --- a/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m +++ b/packages/image_picker/image_picker/ios/Classes/FLTImagePickerPlugin.m @@ -96,7 +96,7 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result } } else if ([@"pickVideo" isEqualToString:call.method]) { _imagePickerController = [[UIImagePickerController alloc] init]; - _imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext; + _imagePickerController.modalPresentationStyle = UIModalPresentationPopover; _imagePickerController.delegate = self; _imagePickerController.mediaTypes = @[ (NSString *)kUTTypeMovie, (NSString *)kUTTypeAVIMovie, (NSString *)kUTTypeVideo, From 7d88466c40bbfdd6c71c511342dbf15e5d81195a Mon Sep 17 00:00:00 2001 From: Dominik Roszkowski Date: Thu, 1 Oct 2020 12:56:59 +0200 Subject: [PATCH 3/3] fix flutter/flutter#48602 iOS flow shows account selection, if user is signed in to Google on the device --- packages/google_sign_in/google_sign_in/CHANGELOG.md | 4 ++++ .../google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m | 6 +++++- packages/google_sign_in/google_sign_in/pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google_sign_in/google_sign_in/CHANGELOG.md b/packages/google_sign_in/google_sign_in/CHANGELOG.md index 7f4bfddfa45a..c8fc7ecea349 100644 --- a/packages/google_sign_in/google_sign_in/CHANGELOG.md +++ b/packages/google_sign_in/google_sign_in/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.5.7 + +* Fix flutter/flutter#48602 iOS flow shows account selection, if user is signed in to Google on the device. + ## 4.5.6 * Fix deprecated member warning in tests. diff --git a/packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m b/packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m index f621d1e68312..e939b9000f72 100644 --- a/packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m +++ b/packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m @@ -80,7 +80,11 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result [GIDSignIn sharedInstance].clientID = plist[kClientIdKey]; [GIDSignIn sharedInstance].serverClientID = plist[kServerClientIdKey]; [GIDSignIn sharedInstance].scopes = call.arguments[@"scopes"]; - [GIDSignIn sharedInstance].hostedDomain = call.arguments[@"hostedDomain"]; + if (call.arguments[@"hostedDomain"] == [NSNull null]) { + [GIDSignIn sharedInstance].hostedDomain = nil; + } else { + [GIDSignIn sharedInstance].hostedDomain = call.arguments[@"hostedDomain"]; + } result(nil); } else { result([FlutterError errorWithCode:@"missing-config" diff --git a/packages/google_sign_in/google_sign_in/pubspec.yaml b/packages/google_sign_in/google_sign_in/pubspec.yaml index a63091b945b2..5bc632fbda06 100644 --- a/packages/google_sign_in/google_sign_in/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in/pubspec.yaml @@ -2,7 +2,7 @@ name: google_sign_in description: Flutter plugin for Google Sign-In, a secure authentication system for signing in with a Google account on Android and iOS. homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in -version: 4.5.6 +version: 4.5.7 flutter: plugin: