Skip to content

[google_sign_in_ios] Upgrade GoogleSignIn iOS SDK to 7.1 #6404

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

Merged
merged 14 commits into from
Apr 17, 2024
4 changes: 4 additions & 0 deletions .ci/targets/ios_build_all_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart and iOS deps
script: .ci/scripts/tool_runner.sh
args: ["fetch-deps", "--ios", "--supporting-target-platforms-only"]
infra_step: true
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
infra_step: true # Note infra steps failing prevents "always" from running.
Expand Down
4 changes: 4 additions & 0 deletions .ci/targets/macos_build_all_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ tasks:
- name: prepare tool
script: .ci/scripts/prepare_tool.sh
infra_step: true # Note infra steps failing prevents "always" from running.
- name: download Dart and macOS deps
script: .ci/scripts/tool_runner.sh
args: ["fetch-deps", "--macos", "--supporting-target-platforms-only"]
infra_step: true
- name: create all_packages app
script: .ci/scripts/create_all_packages_app.sh
infra_step: true # Note infra steps failing prevents "always" from running.
Expand Down
4 changes: 4 additions & 0 deletions packages/google_sign_in/google_sign_in_ios/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.7.6

* Upgrades GoogleSignIn iOS SDK to 7.1.

## 5.7.5

* Pins GoogleSignIn to iOS SDK "7.0.0" while preparing the update to 7.1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@ Enables Google Sign-In in Flutter apps.
s.source_files = 'Classes/**/*.{h,m}'
s.public_header_files = 'Classes/**/*.h'
s.module_map = 'Classes/FLTGoogleSignInPlugin.modulemap'
s.dependency 'GoogleSignIn', '~> 7.0.0'

# AppAuth and GTMSessionFetcher are GoogleSignIn transitive dependencies.
# Depend on versions which defines modules.
s.dependency 'AppAuth', '>= 1.7.4'
s.dependency 'GTMSessionFetcher', '>= 3.4.0'
s.dependency 'GoogleSignIn', '~> 7.1'
s.static_framework = true
s.ios.dependency 'Flutter'
s.osx.dependency 'FlutterMacOS'
s.ios.deployment_target = '12.0'
s.osx.deployment_target = '10.15'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }

# google_sign_in_ios does not contain Swift files. For some reason, there
# is a "pod lib lint" warning unless swift_version is set. This seems related to
# GoogleSignIn depending a Swift pod (GTMAppAuth).
s.swift_version = '5.0'

s.resource_bundles = {'google_sign_in_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
end
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "The Flutter Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -386,11 +386,19 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/AppAuth/AppAuthCore_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/GTMAppAuth/GTMAppAuth_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher_Core_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher_Full_Privacy.bundle",
Comment on lines +389 to +392
Copy link
Member Author

Choose a reason for hiding this comment

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

Woo!

"${PODS_CONFIGURATION_BUILD_DIR}/GoogleSignIn/GoogleSignIn.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/google_sign_in_ios/google_sign_in_ios_privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AppAuthCore_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GTMAppAuth_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GTMSessionFetcher_Core_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GTMSessionFetcher_Full_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/google_sign_in_ios_privacy.bundle",
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion packages/google_sign_in/google_sign_in_ios/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_sign_in_ios
description: iOS implementation of the google_sign_in plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in_ios
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
version: 5.7.5
version: 5.7.6
Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, do you think this should be a minor bump instead @stuartmorgan?

Copy link
Contributor

Choose a reason for hiding this comment

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

Since this one should be a no-op for clients, bugfix seems fine. I don't feel strongly between the two here.


environment:
sdk: ^3.2.3
Expand Down
29 changes: 18 additions & 11 deletions script/tool/lib/src/fetch_deps_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'common/repository_package.dart';

const int _exitPrecacheFailed = 3;
const int _exitNothingRequested = 4;
const int _exitPodUpdateFailed = 5;

/// Download dependencies, both Dart and native.
///
Expand Down Expand Up @@ -79,22 +80,28 @@ class FetchDepsCommand extends PackageLoopingCommand {
// `pod install` requires having the platform artifacts precached. See
// https://github.com/flutter/flutter/blob/fb7a763c640d247d090cbb373e4b3a0459ac171b/packages/flutter_tools/bin/podhelper.rb#L47
// https://github.com/flutter/flutter/blob/fb7a763c640d247d090cbb373e4b3a0459ac171b/packages/flutter_tools/bin/podhelper.rb#L130
if (getBoolArg(platformIOS)) {
final int exitCode = await processRunner.runAndStream(
final bool precacheIOS = getBoolArg(platformIOS);
final bool precacheMacOS = getBoolArg(platformMacOS);
if (precacheIOS || precacheMacOS) {
final int precacheExitCode = await processRunner.runAndStream(
flutterCommand,
<String>['precache', '--ios'],
<String>[
'precache',
if (precacheIOS)
'--ios',
if (precacheMacOS)
'--macos',
],
);
if (exitCode != 0) {
if (precacheExitCode != 0) {
throw ToolExit(_exitPrecacheFailed);
}
}
if (getBoolArg(platformMacOS)) {
final int exitCode = await processRunner.runAndStream(
flutterCommand,
<String>['precache', '--macos'],
final int updateUpdateExitCode = await processRunner.runAndStream(
'pod',
<String>['repo', 'update'],
);
if (exitCode != 0) {
throw ToolExit(_exitPrecacheFailed);
if (updateUpdateExitCode != 0) {
throw ToolExit(_exitPodUpdateFailed);
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions script/tool/test/fetch_deps_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,11 @@ void main() {
<String>['precache', '--ios'],
null,
),
const ProcessCall(
'pod',
<String>['repo', 'update'],
null,
),
for (final Directory directory in exampleDirs)
ProcessCall(
'flutter',
Expand Down Expand Up @@ -436,6 +441,7 @@ void main() {
.mockProcessesForExecutable[getFlutterCommand(mockPlatform)] =
<FakeProcessInfo>[
FakeProcessInfo(MockProcess(), <String>['precache']),
FakeProcessInfo(MockProcess(), <String>['repo', 'update']),
FakeProcessInfo(MockProcess(exitCode: 1),
<String>['build', 'ios', '--config-only']),
];
Expand Down Expand Up @@ -516,6 +522,11 @@ void main() {
<String>['precache', '--macos'],
null,
),
const ProcessCall(
'pod',
<String>['repo', 'update'],
null,
),
for (final Directory directory in exampleDirs)
ProcessCall(
'flutter',
Expand Down Expand Up @@ -543,6 +554,7 @@ void main() {
.mockProcessesForExecutable[getFlutterCommand(mockPlatform)] =
<FakeProcessInfo>[
FakeProcessInfo(MockProcess(), <String>['precache']),
FakeProcessInfo(MockProcess(), <String>['repo', 'update']),
FakeProcessInfo(MockProcess(exitCode: 1),
<String>['build', 'macos', '--config-only']),
];
Expand Down