Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 9fc8976

Browse files
committed
Injected GIDSignIn
1 parent fce5910 commit 9fc8976

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

packages/google_sign_in/google_sign_in/example/ios/RunnerTests/GoogleSignInTests.m

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#import "FLTGoogleSignInPlugin_Private.h"
6-
75
@import Flutter;
6+
87
@import XCTest;
98
@import google_sign_in;
109
@import GoogleSignIn;
@@ -32,15 +31,10 @@ - (void)setUp {
3231
self.mockSignIn = mockSignIn;
3332

3433
OCMStub(self.mockPluginRegistrar.messenger).andReturn(self.mockBinaryMessenger);
35-
self.plugin = [[FLTGoogleSignInPlugin alloc] initW];
34+
self.plugin = [[FLTGoogleSignInPlugin alloc] initWithSignIn:mockSignIn];
3635
[FLTGoogleSignInPlugin registerWithRegistrar:self.mockPluginRegistrar];
3736
}
3837

39-
- (void)tearDown {
40-
[self.mockSignIn stopMocking];
41-
[super tearDown];
42-
}
43-
4438
- (void)testUnimplementedMethod {
4539
FlutterMethodCall *methodCall = [FlutterMethodCall methodCallWithMethodName:@"bogus"
4640
arguments:nil];

packages/google_sign_in/google_sign_in/ios/Classes/FLTGoogleSignInPlugin.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}
3838

3939
@interface FLTGoogleSignInPlugin () <GIDSignInDelegate>
40-
@property (strong, readonly) GIDSignIn *signIn;
40+
@property(strong, readonly) GIDSignIn *signIn;
4141

4242
// Redeclared as not a designated initializer.
4343
- (instancetype)init;
@@ -173,8 +173,7 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
173173

174174
if ([self setAccountRequest:result]) {
175175
_additionalScopesRequest = missingScopes;
176-
self.signIn.scopes =
177-
[currentScopes arrayByAddingObjectsFromArray:missingScopes];
176+
self.signIn.scopes = [currentScopes arrayByAddingObjectsFromArray:missingScopes];
178177
self.signIn.presentingViewController = [self topViewController];
179178
self.signIn.loginHint = user.profile.email;
180179
@try {

packages/google_sign_in/google_sign_in/ios/google_sign_in.podspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ Enables Google Sign-In in Flutter apps.
1313
s.author = { 'Flutter Team' => '[email protected]' }
1414
s.source = { :http => 'https://github.com/flutter/plugins/tree/master/packages/google_sign_in' }
1515
s.source_files = 'Classes/**/*'
16-
s.public_header_files = 'Classes/FLTGoogleSignInPlugin.h'
17-
s.private_header_files = 'Classes/**/*_Private.h'
16+
s.public_header_files = 'Classes/**/*.h'
1817
s.dependency 'Flutter'
1918
s.dependency 'GoogleSignIn', '~> 5.0'
2019
s.static_framework = true

0 commit comments

Comments
 (0)