-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[google_sign_in_ios] Adds Swift Package Manager support #7356
base: main
Are you sure you want to change the base?
Changes from all commits
a3c005b
c2c83e2
687528d
75467db
42e779a
1ebe6d7
78a1b1f
8568732
37db677
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,13 @@ Enables Google Sign-In in Flutter apps. | |
s.license = { :type => 'BSD', :file => '../LICENSE' } | ||
s.author = { 'Flutter Team' => '[email protected]' } | ||
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in_ios' } | ||
s.source_files = 'Classes/**/*.{h,m}' | ||
s.public_header_files = 'Classes/**/*.h' | ||
s.module_map = 'Classes/FLTGoogleSignInPlugin.modulemap' | ||
s.source_files = 'google_sign_in_ios/Sources/google_sign_in_ios/**/*.{h,m}' | ||
s.public_header_files = 'google_sign_in_ios/Sources/google_sign_in_ios/include/**/*.h' | ||
s.module_map = 'google_sign_in_ios/Sources/google_sign_in_ios/include/FLTGoogleSignInPlugin.modulemap' | ||
|
||
# AppAuth and GTMSessionFetcher are GoogleSignIn transitive dependencies. | ||
# Depend on versions which defines modules. | ||
s.dependency 'AppAuth', '>= 1.7.4' | ||
s.dependency 'AppAuth', '>= 1.7.6' | ||
s.dependency 'GTMSessionFetcher', '>= 3.4.0' | ||
s.dependency 'GoogleSignIn', '~> 7.1' | ||
s.static_framework = true | ||
|
@@ -33,5 +33,5 @@ Enables Google Sign-In in Flutter apps. | |
# GoogleSignIn depending a Swift pod (GTMAppAuth). | ||
s.swift_version = '5.0' | ||
|
||
s.resource_bundles = {'google_sign_in_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']} | ||
s.resource_bundles = {'google_sign_in_ios_privacy' => ['google_sign_in_ios/Sources/google_sign_in_ios/Resources/PrivacyInfo.xcprivacy']} | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// swift-tools-version: 5.9 | ||
|
||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "google_sign_in_ios", | ||
platforms: [ | ||
.iOS("12.0"), | ||
.macOS("10.15"), | ||
], | ||
products: [ | ||
.library(name: "google-sign-in-ios", targets: ["google_sign_in_ios"]) | ||
], | ||
dependencies: [ | ||
// AppAuth and GTMSessionFetcher are GoogleSignIn transitive dependencies. | ||
// Depend on versions which define modules. | ||
.package( | ||
url: "https://github.com/openid/AppAuth-iOS.git", | ||
from: "1.7.6"), | ||
.package( | ||
url: "https://github.com/google/gtm-session-fetcher.git", | ||
from: "3.4.0"), | ||
.package( | ||
url: "https://github.com/google/GoogleSignIn-iOS.git", | ||
from: "7.1.0"), | ||
], | ||
targets: [ | ||
.target( | ||
name: "google_sign_in_ios", | ||
dependencies: [ | ||
.product(name: "GoogleSignIn", package: "GoogleSignIn-iOS") | ||
], | ||
exclude: [ | ||
"include/google_sign_in_ios-umbrella.h", "include/FLTGoogleSignInPlugin.modulemap", | ||
], | ||
resources: [ | ||
.process("Resources") | ||
], | ||
cSettings: [ | ||
.headerSearchPath("include/google_sign_in_ios") | ||
] | ||
) | ||
] | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,17 +26,14 @@ end | |
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
||
# Suppress warnings from transitive dependencies that cause analysis to fail. | ||
pod 'AppAuth', :inhibit_warnings => true | ||
pod 'GTMAppAuth', :inhibit_warnings => true | ||
inhibit_all_warnings! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These lines inhibit warnings but also add
If the SwiftPM feature is enabled, this caused duplicate modules and the build would fail. This is a temporary workaround. In the future, we'll remove CocoaPod integration from these example apps. That's tracked by flutter/flutter#148021. |
||
|
||
flutter_ios_podfile_setup | ||
|
||
target 'Runner' do | ||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) | ||
target 'RunnerTests' do | ||
inherit! :search_paths | ||
|
||
pod 'OCMock','3.5' | ||
end | ||
end | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Depends on AppAuth-iOS which emits analysis warnings. | ||
- google_sign_in_ios |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# TODO(louisehsu): Remove deprecation check when StoreKit 2 is adopted. https://github.com/flutter/flutter/issues/116383 | ||
- in_app_purchase_storekit | ||
# Depends on AppAuth-iOS which uses deprecated APIs. | ||
- google_sign_in_ios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mirrors:
packages/packages/google_sign_in/google_sign_in_ios/darwin/google_sign_in_ios.podspec
Lines 20 to 24 in 275e985