From d265179e75c1cbca727f9fa2857dfa934e605537 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Wed, 7 Oct 2026 14:43:31 -0700 Subject: [PATCH 1/8] g-orchestrated: add CocoaPods to SPM migration guide --- MIGRATING_FROM_COCOAPODS.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 MIGRATING_FROM_COCOAPODS.md diff --git a/MIGRATING_FROM_COCOAPODS.md b/MIGRATING_FROM_COCOAPODS.md new file mode 100644 index 00000000..58fbad57 --- /dev/null +++ b/MIGRATING_FROM_COCOAPODS.md @@ -0,0 +1,33 @@ +# Migrating from CocoaPods to Swift Package Manager + +CocoaPods trunk becomes read-only on December 2, 2026. Google Sign-In is the last version published to CocoaPods (both the `GoogleSignIn` and `GoogleSignInSwiftSupport` pods). Existing pod versions remain installable, but future Google Sign-In releases are distributed via Swift Package Manager only. + +## Steps + +1. In the project directory, remove the `pod 'GoogleSignIn'` and `pod 'GoogleSignInSwiftSupport'` lines from the `Podfile`. If these were the only pods, run `pod deintegrate`, delete the `Podfile`, `Podfile.lock`, and the generated `.xcworkspace`, and open the `.xcodeproj` from then on. +2. In Xcode: **File > Add Package Dependencies…**, enter `https://github.com/google/GoogleSignIn-iOS`, and choose "Up to Next Major Version" from the current version. +3. Add the product(s) matching your old pod(s) to each target (table below). +4. Imports do not change. Clean the build folder and build. + +| Podfile entry | SPM product | Swift import | Objective-C import | +| --- | --- | --- | --- | +| `pod 'GoogleSignIn'` | `GoogleSignIn` | `import GoogleSignIn` | `@import GoogleSignIn;` | +| `pod 'GoogleSignInSwiftSupport'` | `GoogleSignInSwift` | `import GoogleSignInSwift` | (Swift only) | + +Note: The `GoogleSignInSwiftSupport` pod already built a module named `GoogleSignInSwift`, so existing imports keep working unchanged. + +## Resources + +Under Swift Package Manager, the SDK's resources ship in a bundle named `GoogleSignIn_GoogleSignIn.bundle` instead of `GoogleSignIn.bundle`. The SDK locates its own bundle automatically; only apps that looked up the bundle by name themselves need to update that lookup. + +## Don't mix package managers + +Google Sign-In depends on `AppAuth`, `GTMAppAuth`, `GTMSessionFetcher`, and `AppCheckCore`. If Firebase or another pod in your `Podfile` shares any of those dependencies, migrate them to Swift Package Manager at the same time. Mixing CocoaPods and Swift Package Manager copies of the same library in one target leads to dependency cycles and build errors. See [Firebase's CocoaPods deprecation guide](https://firebase.google.com/docs/ios/cocoapods-deprecation). + +## If you can't migrate yet + +You can stay on Google Sign-In via CocoaPods. + +## Cross-platform wrappers + +Flutter's `google_sign_in_ios` plugin already ships a `Package.swift` alongside its podspec. For other wrappers (React Native, Unity, etc.), check the plugin's own documentation for its Swift Package Manager support rather than editing its `Podfile` entries directly. From 0976ac5727300a0cc784a46a4b436fe6812cb5a7 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Wed, 7 Oct 2026 14:43:40 -0700 Subject: [PATCH 2/8] g-orchestrated: note CocoaPods deprecation in CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7703fa75..752ab840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - Fix a crash when a server error response carries a non-string value under its `error` key. The EMM error handler sent `-hasPrefix:` to whatever value was present, raising an unrecognized selector exception on a number, array or object. - Fix a custom `nonce` and requested token `claims` being dropped when a sign-in is continued after a Device Policy app restart. +- Deprecate CocoaPods distribution. This is the last release published to CocoaPods; CocoaPods trunk becomes read-only on December 2, 2026. Migrate to Swift Package Manager using [MIGRATING_FROM_COCOAPODS.md](MIGRATING_FROM_COCOAPODS.md). ([#607](https://github.com/google/GoogleSignIn-iOS/issues/607)) # 10.0.0 - **BREAKING**: Update to AppAuth 3.0.0 and GTMAppAuth 6.0.0, which raises the minimum deployment targets to iOS 15.0 and macOS 12.0, widens the `GTMSessionFetcher` dependency to allow 4.x and 5.x, and renames the version-specific Swift Package Manager manifest to `Package@swift-5.7.swift`. Projects that must keep supporting earlier OS versions should stay on GoogleSignIn 9.2.0. ([#628](https://github.com/google/GoogleSignIn-iOS/pull/628)) From 84cfde49d03cc25e8fd1401f26b5814084cace9c Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Wed, 7 Oct 2026 14:44:27 -0700 Subject: [PATCH 3/8] g-orchestrated: announce CocoaPods deprecation in README --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ade720e0..362b0a83 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ [![unit_tests](https://github.com/google/GoogleSignIn-iOS/actions/workflows/unit_tests.yml/badge.svg?branch=main)](https://github.com/google/GoogleSignIn-iOS/actions/workflows/unit_tests.yml) [![integration_tests](https://github.com/google/GoogleSignIn-iOS/actions/workflows/integration_tests.yml/badge.svg?branch=main)](https://github.com/google/GoogleSignIn-iOS/actions/workflows/integration_tests.yml) +> [!IMPORTANT] +> **CocoaPods distribution is deprecated.** CocoaPods trunk becomes read-only on December 2, 2026, and future Google Sign-In releases will be distributed through Swift Package Manager only. See [Migrating from CocoaPods to Swift Package Manager](MIGRATING_FROM_COCOAPODS.md). + # Google Sign-In for iOS and macOS Get users into your apps quickly and securely, using a registration system they @@ -18,7 +21,7 @@ service. Try either the [Objective-C](Samples/ObjC) or [Swift](Samples/Swift) sample app. For example, to demo the Objective-C sample project, you have two options: -1. Using CocoaPod's `install` method: +1. Using CocoaPod's `install` method (deprecated; see [MIGRATING_FROM_COCOAPODS.md](MIGRATING_FROM_COCOAPODS.md)): ``` git clone https://github.com/google/GoogleSignIn-iOS From 8f21429edc7ee5eaf96799ce94a68ac55be6d2fe Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Wed, 7 Oct 2026 15:06:12 -0700 Subject: [PATCH 4/8] g-orchestrated: make README Swift Package Manager-first --- README.md | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 362b0a83..a6a7c4d5 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,34 @@ Visit [our developer site](https://developers.google.com/identity/sign-in/ios/) for integration instructions, documentation, support information, and terms of service. -## Getting Started +## Installation -Try either the [Objective-C](Samples/ObjC) or [Swift](Samples/Swift) sample app. -For example, to demo the Objective-C sample project, you have two options: +Google Sign-In is distributed with [Swift Package Manager](https://swift.org/package-manager/). -1. Using CocoaPod's `install` method (deprecated; see [MIGRATING_FROM_COCOAPODS.md](MIGRATING_FROM_COCOAPODS.md)): +In Xcode, choose **File > Add Package Dependencies…**, enter +`https://github.com/google/GoogleSignIn-iOS`, and add the product you need to your target: -``` -git clone https://github.com/google/GoogleSignIn-iOS -cd GoogleSignIn-iOS/Samples/ObjC/SignInSample/ -pod install -open SignInSampleForPod.xcworkspace +* `GoogleSignIn` — the core SDK (Swift and Objective-C). +* `GoogleSignInSwift` — the SwiftUI `GoogleSignInButton`. + +Or add it to your `Package.swift`: + +```swift +dependencies: [ + .package(url: "https://github.com/google/GoogleSignIn-iOS", from: "10.0.0") +] ``` -2. Using [Swift Package Manager](https://swift.org/package-manager/): +and depend on `.product(name: "GoogleSignIn", package: "GoogleSignIn-iOS")` (and, for SwiftUI, +`.product(name: "GoogleSignInSwift", package: "GoogleSignIn-iOS")`) in your target. + +If you currently use CocoaPods, see +[Migrating from CocoaPods to Swift Package Manager](MIGRATING_FROM_COCOAPODS.md). + +## Getting Started + +Try either the [Objective-C](Samples/ObjC) or [Swift](Samples/Swift) sample app. +For example, to demo the Objective-C sample project: ``` git clone https://github.com/google/GoogleSignIn-iOS From 06049ff9ce6ae4b4ce248eebcd667459d9136c3f Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Wed, 7 Oct 2026 15:09:01 -0700 Subject: [PATCH 5/8] g-orchestrated: replace CocoaPods badges in README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a6a7c4d5..7f6d075b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![Version](https://img.shields.io/cocoapods/v/GoogleSignIn.svg?style=flat)](https://cocoapods.org/pods/GoogleSignIn) -[![Platform](https://img.shields.io/cocoapods/p/GoogleSignIn.svg?style=flat)](https://cocoapods.org/pods/GoogleSignIn) -[![License](https://img.shields.io/cocoapods/l/GoogleSignIn.svg?style=flat)](https://cocoapods.org/pods/GoogleSignIn) +[![Release](https://img.shields.io/github/v/release/google/GoogleSignIn-iOS?style=flat)](https://github.com/google/GoogleSignIn-iOS/releases) +[![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-brightgreen?style=flat)](https://swift.org/package-manager/) +[![License](https://img.shields.io/github/license/google/GoogleSignIn-iOS?style=flat)](LICENSE) [![unit_tests](https://github.com/google/GoogleSignIn-iOS/actions/workflows/unit_tests.yml/badge.svg?branch=main)](https://github.com/google/GoogleSignIn-iOS/actions/workflows/unit_tests.yml) [![integration_tests](https://github.com/google/GoogleSignIn-iOS/actions/workflows/integration_tests.yml/badge.svg?branch=main)](https://github.com/google/GoogleSignIn-iOS/actions/workflows/integration_tests.yml) From dc5863e6f74b5ff9e2d0dd09cdc8871cc273ab8a Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Wed, 7 Oct 2026 16:15:15 -0700 Subject: [PATCH 6/8] g-orchestrated: name 10.1.0 as the last CocoaPods release --- MIGRATING_FROM_COCOAPODS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MIGRATING_FROM_COCOAPODS.md b/MIGRATING_FROM_COCOAPODS.md index 58fbad57..c3e9379f 100644 --- a/MIGRATING_FROM_COCOAPODS.md +++ b/MIGRATING_FROM_COCOAPODS.md @@ -1,6 +1,6 @@ # Migrating from CocoaPods to Swift Package Manager -CocoaPods trunk becomes read-only on December 2, 2026. Google Sign-In is the last version published to CocoaPods (both the `GoogleSignIn` and `GoogleSignInSwiftSupport` pods). Existing pod versions remain installable, but future Google Sign-In releases are distributed via Swift Package Manager only. +CocoaPods trunk becomes read-only on December 2, 2026. Google Sign-In 10.1.0 is the last version published to CocoaPods (both the `GoogleSignIn` and `GoogleSignInSwiftSupport` pods). Existing pod versions remain installable, but future Google Sign-In releases are distributed via Swift Package Manager only. ## Steps @@ -26,7 +26,7 @@ Google Sign-In depends on `AppAuth`, `GTMAppAuth`, `GTMSessionFetcher`, and `App ## If you can't migrate yet -You can stay on Google Sign-In via CocoaPods. +You can stay on Google Sign-In 10.1.0 via CocoaPods. ## Cross-platform wrappers From 108380bdb7dcb6bea76dae1c514976113cfd1342 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Mon, 19 Oct 2026 14:53:44 -0700 Subject: [PATCH 7/8] g-orchestrated: document the Xcode 27 Podfile post_install hook --- MIGRATING_FROM_COCOAPODS.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/MIGRATING_FROM_COCOAPODS.md b/MIGRATING_FROM_COCOAPODS.md index c3e9379f..435de5c2 100644 --- a/MIGRATING_FROM_COCOAPODS.md +++ b/MIGRATING_FROM_COCOAPODS.md @@ -28,6 +28,30 @@ Google Sign-In depends on `AppAuth`, `GTMAppAuth`, `GTMSessionFetcher`, and `App You can stay on Google Sign-In 10.1.0 via CocoaPods. +### Building with Xcode 27 + +Xcode 27 refuses to build any target whose iOS deployment target is below 15.0. Several of Google Sign-In's transitive pods (`AppCheckCore`, `GoogleUtilities`, `RecaptchaInterop`, `PromisesObjC`, and `PromisesSwift`) still declare lower floors in their podspecs, so a project that installs Google Sign-In through CocoaPods and builds under Xcode 26 fails under Xcode 27 with deployment-target errors in the generated Pods project. Those floors belong to the upstream pods, and Google Sign-In cannot raise them from its own podspec. + +Until you migrate, add a `post_install` hook to your `Podfile` that raises the generated Pods targets to your app's own minimum. The sample apps in this repository use the same hook. + +```ruby +post_install do |installer| + # Xcode 27 refuses to build a target whose deployment target is below iOS 15.0. + # Several transitive pods still declare lower floors in their own podspecs, so + # raise the generated Pods project targets to match the app's own minimum. + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + ios = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] + if ios && Gem::Version.new(ios) < Gem::Version.new('15.0') + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0' + end + end + end +end +``` + +Run `pod install` again after adding the hook. + ## Cross-platform wrappers Flutter's `google_sign_in_ios` plugin already ships a `Package.swift` alongside its podspec. For other wrappers (React Native, Unity, etc.), check the plugin's own documentation for its Swift Package Manager support rather than editing its `Podfile` entries directly. From 3f259e4339214b1e665bef2fa7413047c419e903 Mon Sep 17 00:00:00 2001 From: Worthing ~ <115107835+w-goog@users.noreply.github.com> Date: Tue, 20 Oct 2026 12:49:46 -0700 Subject: [PATCH 8/8] g-orchestrated: Accept AppCheckCore 11.x or 12.x in the podspec --- CHANGELOG.md | 4 ++-- GoogleSignIn.podspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf5d577b..e8e61738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ - Fix a crash when a server error response carries a non-string value under its `error` key. The EMM error handler sent `-hasPrefix:` to whatever value was present, raising an unrecognized selector exception on a number, array or object. - Fix a custom `nonce` and requested token `claims` being dropped when a sign-in is continued after a Device Policy app restart. - Deprecate CocoaPods distribution. This is the last release published to CocoaPods; CocoaPods trunk becomes read-only on December 2, 2026. Migrate to Swift Package Manager using [MIGRATING_FROM_COCOAPODS.md](MIGRATING_FROM_COCOAPODS.md). ([#607](https://github.com/google/GoogleSignIn-iOS/issues/607)) -- Add Swift Package Manager support for AppCheckCore 12.x, enabling compatibility with Firebase 13. CocoaPods installations remain restricted to AppCheckCore 11.x. ([#626](https://github.com/google/GoogleSignIn-iOS/pull/626)) +- Add Swift Package Manager support for AppCheckCore 12.x, enabling compatibility with Firebase 13. The CocoaPods podspec also accepts AppCheckCore 11.x or 12.x. ([#626](https://github.com/google/GoogleSignIn-iOS/pull/626)) - Fix a failed App Check preparation being recorded as successful, which made later calls to `-[GIDSignIn configureWithCompletion:]` report success without retrying. ([#626](https://github.com/google/GoogleSignIn-iOS/pull/626)) -- With AppCheckCore 11.x (including all CocoaPods installations), a custom App Check provider that returns neither a token nor an error is now treated as success instead of failing with `kGIDAppCheckUnexpectedError`. ([#626](https://github.com/google/GoogleSignIn-iOS/pull/626)) +- With AppCheckCore 11.x, a custom App Check provider that returns neither a token nor an error is now treated as success instead of failing with `kGIDAppCheckUnexpectedError`. ([#626](https://github.com/google/GoogleSignIn-iOS/pull/626)) - Fix a data race on `GIDGoogleUser`'s tokens. Concurrent token updates could write the access, refresh and ID tokens from different threads at once, and readers could observe a partially updated set. The three tokens are now published together as one snapshot. - `GIDGoogleUser`'s `accessToken`, `refreshToken` and `idToken` are now all derived from that snapshot, so key-value observers of any one of them are notified whenever any of them changes, not only when that property's own value changes. - Key-value observers of those properties are notified while `GIDGoogleUser` holds its internal lock. Calling back into the same user from the observer is fine, but an observer must not synchronously wait (for example with `dispatch_sync`) on another thread that is updating the same user. diff --git a/GoogleSignIn.podspec b/GoogleSignIn.podspec index 742534cd..52c6c0e7 100644 --- a/GoogleSignIn.podspec +++ b/GoogleSignIn.podspec @@ -33,7 +33,7 @@ The Google Sign-In SDK allows users to sign in with their Google account from th ] s.ios.framework = 'UIKit' s.osx.framework = 'AppKit' - s.dependency 'AppCheckCore', '~> 11.0' + s.dependency 'AppCheckCore', '>= 11.0', '< 13.0' s.dependency 'AppAuth', '~> 3.0' s.dependency 'GTMAppAuth', '~> 6.0' s.dependency 'GTMSessionFetcher/Core', '>= 3.3', '< 6.0'