-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[google_sign_in_ios] Adds Swift Package Manager support #7356
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
Changes from 1 commit
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 |
|---|---|---|
| @@ -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. | ||
|
Member
Author
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.
Collaborator
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. Do we really need this? Isn't not defining modules something that would only apply to CocoaPods, not SPM?
Member
Author
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. Good question, let me fiddle with this |
||
| .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! | ||
|
Member
Author
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. The previous lines inhibited warnings but also added If the SwiftPM feature is enabled, this causes duplicate modules and the build fails. |
||
|
|
||
| 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 | ||
|
|
||
|
|
||
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 fixes some but not all AppAuth-iOS warnings