Skip to content

Commit 2416b0e

Browse files
committed
Add SPM support
1 parent a57f8b1 commit 2416b0e

File tree

3 files changed

+43
-17
lines changed

3 files changed

+43
-17
lines changed

.github/workflows/googleauth.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ jobs:
4040
- name: Build
4141
run: |
4242
./test.sh FirebaseGoogleAuthUI
43+
spm:
44+
name: spm
45+
runs-on: macOS-latest
46+
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@master
50+
- name: List
51+
run: |
52+
xcodebuild -list
53+
- name: Build
54+
run: |
55+
xcodebuild -scheme FirebaseGoogleAuthUI -sdk iphonesimulator
4356
pod:
4457
name: pod lib lint
4558
runs-on: macOS-latest

FirebaseGoogleAuthUI/Sources/FUIGoogleAuth.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
/** @var kBundleName
3030
@brief The name of the bundle to search for resources.
3131
*/
32+
#if SWIFT_PACKAGE
33+
static NSString *const kBundleName = @"FirebaseUI_FirebaseGoogleAuthUI";
34+
#else
3235
static NSString *const kBundleName = @"FirebaseGoogleAuthUI";
36+
#endif // SWIFT_PACKAGE
3337

3438
/** @var kSignInWithGoogle
3539
@brief The string key for localized button text.

Package.swift

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ let package = Package(
4646
name: "FirebaseFirestoreUI",
4747
targets: ["FirebaseFirestoreUI"]
4848
),
49+
.library(
50+
name: "FirebaseGoogleAuthUI",
51+
targets: ["FirebaseGoogleAuthUI"]
52+
),
4953
.library(
5054
name: "FirebaseOAuthUI",
5155
targets: ["FirebaseOAuthUI"]
@@ -70,6 +74,11 @@ let package = Package(
7074
url: "https://github.com/firebase/firebase-ios-sdk.git",
7175
from: "8.0.0"
7276
),
77+
.package(
78+
name: "GoogleSignIn",
79+
url: "https://github.com/google/GoogleSignIn-iOS",
80+
from: "6.0.0"
81+
),
7382
.package(
7483
name: "GoogleUtilities",
7584
url: "https://github.com/google/GoogleUtilities.git",
@@ -181,23 +190,23 @@ let package = Package(
181190
.headerSearchPath("../../"),
182191
]
183192
),
184-
// .target(
185-
// name: "GoogleAuthUI",
186-
// dependencies: [
187-
// "AuthUI",
188-
// // missing google auth dependency
189-
// ],
190-
// path: "GoogleAuth/FirebaseGoogleAuthUI",
191-
// exclude: ["Info.plist"],
192-
// resources: [
193-
// .process("Resources"),
194-
// .process("Strings"),
195-
// ],
196-
// publicHeadersPath: ".",
197-
// cSettings: [
198-
// .headerSearchPath("./"),
199-
// ]
200-
// ),
193+
.target(
194+
name: "FirebaseGoogleAuthUI",
195+
dependencies: [
196+
"FirebaseAuthUI",
197+
"GoogleSignIn"
198+
],
199+
path: "FirebaseGoogleAuthUI/Sources",
200+
exclude: ["Info.plist"],
201+
resources: [
202+
.process("Resources"),
203+
.process("Strings"),
204+
],
205+
publicHeadersPath: "Public",
206+
cSettings: [
207+
.headerSearchPath("../../"),
208+
]
209+
),
201210
.target(
202211
name: "FirebaseOAuthUI",
203212
dependencies: [

0 commit comments

Comments
 (0)