Skip to content

Commit b32c218

Browse files
chore: bring back samples for other pods - not auth
1 parent a076f65 commit b32c218

File tree

233 files changed

+6994
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+6994
-14
lines changed

.github/workflows/sample.yml

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ on:
66
paths:
77
- '.github/workflows/sample.yml'
88
- 'FirebaseSwiftUI/**'
9-
- 'samples/swiftui/**'
9+
- 'Firebase*UI/**'
10+
- 'samples/**'
1011
- 'Package.swift'
12+
- '*.podspec'
1113
pull_request:
1214
branches: [ main ]
1315
paths:
1416
- '.github/workflows/sample.yml'
1517
- 'FirebaseSwiftUI/**'
16-
- 'samples/swiftui/**'
18+
- 'Firebase*UI/**'
19+
- 'samples/**'
1720
- 'Package.swift'
21+
- '*.podspec'
1822

1923
workflow_dispatch:
2024

@@ -36,3 +40,54 @@ jobs:
3640
-destination 'platform=iOS Simulator,OS=latest,name=iPhone 16 Pro' \
3741
clean build \
3842
ONLY_ACTIVE_ARCH=YES
43+
44+
swift:
45+
name: Swift UIKit Sample build
46+
runs-on: macos-15
47+
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@main
51+
- name: Setup
52+
run: |
53+
cd samples/swift
54+
gem install bundler
55+
bundle install
56+
gem install xcpretty
57+
bundle exec pod install --repo-update
58+
- name: Build
59+
run: |
60+
cd samples/swift
61+
xcodebuild \
62+
-workspace FirebaseUI-demo-swift.xcworkspace \
63+
-scheme FirebaseUI-demo-swift \
64+
-sdk iphonesimulator \
65+
-destination 'platform=iOS Simulator,OS=latest,name=iPhone 16 Pro' \
66+
clean build test \
67+
ONLY_ACTIVE_ARCH=YES | xcpretty
68+
69+
objc:
70+
name: ObjC Sample build
71+
runs-on: macos-15
72+
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@main
76+
- name: Setup
77+
run: |
78+
cp samples/GoogleService-Info-dummy.plist samples/objc/GoogleService-Info.plist
79+
cd samples/objc
80+
gem install bundler
81+
bundle install
82+
gem install xcpretty
83+
bundle exec pod install --repo-update
84+
- name: Build
85+
run: |
86+
cd samples/objc
87+
xcodebuild \
88+
-workspace FirebaseUI-demo-objc.xcworkspace \
89+
-scheme FirebaseUI-demo-objc \
90+
-sdk iphonesimulator \
91+
-destination 'platform=iOS Simulator,OS=latest,name=iPhone 16 Pro' \
92+
clean build \
93+
ONLY_ACTIVE_ARCH=YES | xcpretty

README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,33 @@ $ cd FirebaseDatabaseUI # or FirebaseFirestoreUI, FirebaseStorageUI
8080
$ pod install
8181
```
8282

83-
## Sample Project Configuration
83+
## Sample Projects
8484

85-
You'll have to configure your Xcode project in order to run the SwiftUI samples.
85+
FirebaseUI includes several sample projects demonstrating different features:
8686

87-
1. Your Xcode project should contain a `GoogleService-Info.plist`, downloaded from [Firebase console](https://console.firebase.google.com) when you add your app to a Firebase project.<br>
88-
Copy the `GoogleService-Info.plist` into the sample project folder.
87+
### SwiftUI Authentication Sample
8988

90-
1. Update URL Types (for OAuth providers).<br>
91-
Go to `Project Settings -> Info tab -> Url Types` and update values for:
92-
+ `REVERSED_CLIENT_ID` (get value from `GoogleService-Info.plist`) - Required for Google Sign-In
93-
+ `fb{your-app-id}` (put Facebook App Id) - Required for Facebook Login
89+
Located in `samples/swiftui/FirebaseSwiftUISample/`, this sample demonstrates the modern SwiftUI authentication components.
9490

95-
1. For Facebook Login, update `Info.plist` with Facebook configuration values:
96-
+ `FacebookAppID -> {your-app-id}` (put Facebook App Id)
97-
+ Enable Keychain Sharing: `Project Settings -> Capabilities -> KeyChain Sharing -> ON`
91+
**Configuration:**
92+
1. Download `GoogleService-Info.plist` from [Firebase Console](https://console.firebase.google.com)
93+
2. Copy it to the sample project folder
94+
3. Update URL Types (for OAuth providers) in `Project Settings -> Info tab -> Url Types`:
95+
- `REVERSED_CLIENT_ID` (from `GoogleService-Info.plist`) - Required for Google Sign-In
96+
- `fb{your-app-id}` - Required for Facebook Login
97+
4. For Facebook Login, update `Info.plist` with `FacebookAppID` and enable Keychain Sharing
9898

99-
1. Don't forget to configure your Firebase project using [Firebase console](https://console.firebase.google.com).
99+
### UIKit Database & Storage Samples
100+
101+
Located in `samples/objc/` and `samples/swift/`, these samples demonstrate FirebaseUI's data binding capabilities for Realtime Database and Storage.
102+
103+
**Configuration:**
104+
1. Download `GoogleService-Info.plist` from [Firebase Console](https://console.firebase.google.com)
105+
2. Copy it to `samples/objc/GoogleService-Info.plist` or `samples/swift/GoogleService-Info.plist`
106+
3. Run `pod install` in the sample directory
107+
4. Configure your Firebase Database and Storage in the Firebase Console
108+
5. For the Chat sample, enable anonymous authentication in Firebase Console
109+
6. For the Storage sample, configure appropriate [Storage Security Rules](https://firebase.google.com/docs/storage/security/start#sample-rules)
100110

101111
## Contributing to FirebaseUI
102112

samples/objc/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Xcode
2+
#
3+
build/
4+
*.pbxuser
5+
!default.pbxuser
6+
*.mode1v3
7+
!default.mode1v3
8+
*.mode2v3
9+
!default.mode2v3
10+
*.perspectivev3
11+
!default.perspectivev3
12+
xcuserdata
13+
*.xccheckout
14+
*.moved-aside
15+
DerivedData
16+
*.hmap
17+
*.ipa
18+
*.xcuserstate
19+
*.xcworkspace
20+
Podfile.lock
21+
Pods/

0 commit comments

Comments
 (0)