18
18
19
19
# Firebase Apple Open Source Development
20
20
21
- This repository contains all Apple platform Firebase SDK source except FirebaseAnalytics.
21
+ This repository contains the source code for all Apple platform Firebase SDKs except FirebaseAnalytics.
22
22
23
- Firebase is an app development platform with tools to help you build, grow and
23
+ Firebase is an app development platform with tools to help you build, grow, and
24
24
monetize your app. More information about Firebase can be found on the
25
25
[ official Firebase website] ( https://firebase.google.com ) .
26
26
@@ -29,20 +29,21 @@ monetize your app. More information about Firebase can be found on the
29
29
See the subsections below for details about the different installation methods. Where
30
30
available, it's recommended to install any libraries with a ` Swift ` suffix to get the
31
31
best experience when writing your app in Swift.
32
+
32
33
1 . [ Standard pod install] ( #standard-pod-install )
33
- 1 . [ Swift Package Manager] ( #swift-package-manager )
34
- 1 . [ Installing from the GitHub repo] ( #installing-from-github )
35
- 1 . [ Experimental Carthage] ( #carthage-ios-only )
34
+ 2 . [ Swift Package Manager] ( #swift-package-manager )
35
+ 3 . [ Installing from the GitHub repo] ( #installing-from-github )
36
+ 4 . [ Experimental Carthage] ( #carthage-ios-only )
36
37
37
38
### Standard pod install
38
39
39
- Go to
40
+ For instructions on the standard pod install, visit:
40
41
[ https://firebase.google.com/docs/ios/setup ] ( https://firebase.google.com/docs/ios/setup ) .
41
42
42
43
### Swift Package Manager
43
44
44
45
Instructions for [ Swift Package Manager] ( https://swift.org/package-manager/ ) support can be
45
- found at [ SwiftPackageManager] ( SwiftPackageManager.md ) Markdown file.
46
+ found in the [ SwiftPackageManager.md ] ( SwiftPackageManager.md ) Markdown file.
46
47
47
48
### Installing from GitHub
48
49
@@ -51,13 +52,12 @@ tags, or commits.
51
52
52
53
#### Background
53
54
54
- See
55
- [ the Podfile Syntax Reference] ( https://guides.cocoapods.org/syntax/podfile.html#pod )
55
+ See [ the Podfile Syntax Reference] ( https://guides.cocoapods.org/syntax/podfile.html#pod )
56
56
for instructions and options about overriding pod source locations.
57
57
58
58
#### Accessing Firebase Source Snapshots
59
59
60
- All of the official releases are tagged in this repo and available via CocoaPods. To access a local
60
+ All official releases are tagged in this repo and available via CocoaPods. To access a local
61
61
source snapshot or unreleased branch, use Podfile directives like the following:
62
62
63
63
To access FirebaseFirestore via a branch:
@@ -66,37 +66,36 @@ pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git',
66
66
pod ' FirebaseFirestore' , :git => ' https://github.com/firebase/firebase-ios-sdk.git' , :branch => ' master'
67
67
```
68
68
69
- To access FirebaseMessaging via a checked out version of the firebase-ios-sdk repo do:
70
-
69
+ To access FirebaseMessaging via a checked-out version of the firebase-ios-sdk repo:
71
70
``` ruby
72
71
pod ' FirebaseCore' , :path => ' /path/to/firebase-ios-sdk'
73
72
pod ' FirebaseMessaging' , :path => ' /path/to/firebase-ios-sdk'
74
73
```
75
74
76
75
### Carthage (iOS only)
77
76
78
- Instructions for the experimental Carthage distribution are at
79
- [ Carthage] ( Carthage.md ) .
77
+ Instructions for the experimental Carthage distribution can be found at
78
+ [ Carthage.md ] ( Carthage.md ) .
80
79
81
80
### Using Firebase from a Framework or a library
82
81
83
- [ Using Firebase from a Framework or a library] ( docs/firebase_in_libraries.md )
82
+ For details on using Firebase from a Framework or a library, refer to [ firebase_in_libraries.md ] ( docs/firebase_in_libraries.md ) .
84
83
85
84
## Development
86
85
87
86
To develop Firebase software in this repository, ensure that you have at least
88
87
the following software:
89
88
90
- * Xcode 14.1 (or later)
89
+ * Xcode 14.1 (or later)
91
90
92
91
CocoaPods is still the canonical way to develop, but much of the repo now supports
93
92
development with Swift Package Manager.
94
93
95
94
### CocoaPods
96
95
97
- Install
98
- * CocoaPods 1.10.0 (or later)
99
- * [ CocoaPods generate] ( https://github.com/square/cocoapods-generate )
96
+ Install the following:
97
+ * CocoaPods 1.10.0 (or later)
98
+ * [ CocoaPods generate] ( https://github.com/square/cocoapods-generate )
100
99
101
100
For the pod that you want to develop:
102
101
@@ -111,7 +110,7 @@ Note: Set the `--platforms` option to `macos` or `tvos` to develop/test for
111
110
those platforms. Since 10.2, Xcode does not properly handle multi-platform
112
111
CocoaPods workspaces.
113
112
114
- Firestore has a self contained Xcode project. See
113
+ Firestore has a self- contained Xcode project. See
115
114
[ Firestore/README] ( Firestore/README.md ) Markdown file.
116
115
117
116
#### Development for Catalyst
@@ -123,7 +122,7 @@ Firestore has a self contained Xcode project. See
123
122
* Select the Unit-unit scheme
124
123
* Run it to build and test
125
124
126
- Alternatively disable signing in each target:
125
+ Alternatively, disable signing in each target:
127
126
* Go to Build Settings tab
128
127
* Click ` + `
129
128
* Select ` Add User-Defined Setting `
@@ -138,19 +137,19 @@ Alternatively disable signing in each target:
138
137
139
138
### Adding a New Firebase Pod
140
139
141
- See [ AddNewPod] ( AddNewPod.md ) Markdown file.
140
+ Refer to [ AddNewPod] ( AddNewPod.md ) Markdown file for details .
142
141
143
142
### Managing Headers and Imports
144
143
145
- See [ HeadersImports] ( HeadersImports.md ) Markdown file.
144
+ For information about managing headers and imports, see [ HeadersImports] ( HeadersImports.md ) Markdown file.
146
145
147
146
### Code Formatting
148
147
149
148
To ensure that the code is formatted consistently, run the script
150
149
[ ./scripts/check.sh] ( https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/check.sh )
151
- before creating a PR .
150
+ before creating a pull request (PR) .
152
151
153
- GitHub Actions will verify that any code changes are done in a style compliant
152
+ GitHub Actions will verify that any code changes are done in a style- compliant
154
153
way. Install ` clang-format ` and ` mint ` :
155
154
156
155
``` console
@@ -163,28 +162,28 @@ brew install mint
163
162
Select a scheme and press Command-u to build a component and run its unit tests.
164
163
165
164
### Running Sample Apps
166
- In order to run the sample apps and integration tests, you'll need a valid
167
- ` GoogleService-Info.plist ` file. The Firebase Xcode project contains dummy plist
168
- files without real values, but can be replaced with real plist files. To get your own
165
+ To run the sample apps and integration tests, you'll need a valid
166
+ `GoogleService-Info.plist
167
+ ` file. The Firebase Xcode project contains dummy plist
168
+ files without real values, but they can be replaced with real plist files. To get your own
169
169
` GoogleService-Info.plist ` files:
170
170
171
171
1 . Go to the [ Firebase Console] ( https://console.firebase.google.com/ )
172
172
2 . Create a new Firebase project, if you don't already have one
173
173
3 . For each sample app you want to test, create a new Firebase app with the sample app's bundle
174
- identifier (e.g. ` com.google.Database-Example ` )
174
+ identifier (e.g., ` com.google.Database-Example ` )
175
175
4 . Download the resulting ` GoogleService-Info.plist ` and add it to the Xcode project.
176
176
177
177
### Coverage Report Generation
178
178
179
- See [ scripts/code_coverage_report/README] ( scripts/code_coverage_report/README.md ) Markdown file.
179
+ For coverage report generation instructions, see [ scripts/code_coverage_report/README] ( scripts/code_coverage_report/README.md ) Markdown file.
180
180
181
181
## Specific Component Instructions
182
182
See the sections below for any special instructions for those components.
183
183
184
184
### Firebase Auth
185
185
186
- If you're doing specific Firebase Auth development, see
187
- [ the Auth Sample README] ( FirebaseAuth/Tests/Sample/README.md ) for instructions about
186
+ For specific Firebase Auth development, refer to the [ Auth Sample README] ( FirebaseAuth/Tests/Sample/README.md ) for instructions about
188
187
building and running the FirebaseAuth pod along with various samples and tests.
189
188
190
189
### Firebase Database
@@ -195,13 +194,14 @@ or against a production instance.
195
194
To run against a local emulator instance, invoke ` ./scripts/run_database_emulator.sh start ` before
196
195
running the integration test.
197
196
198
- To run against a production instance, provide a valid GoogleServices-Info.plist and copy it to
197
+ To run against a production instance, provide a valid ` GoogleServices-Info.plist ` and copy it to
199
198
` FirebaseDatabase/Tests/Resources/GoogleService-Info.plist ` . Your Security Rule must be set to
200
199
[ public] ( https://firebase.google.com/docs/database/security/quickstart ) while your tests are
201
200
running.
202
201
203
202
### Firebase Performance Monitoring
204
- If you're doing specific Firebase Performance Monitoring development, see
203
+
204
+ For specific Firebase Performance Monitoring development, see
205
205
[ the Performance README] ( FirebasePerformance/README.md ) for instructions about building the SDK
206
206
and [ the Performance TestApp README] ( FirebasePerformance/Tests/TestApp/README.md ) for instructions about
207
207
integrating Performance with the dev test App.
@@ -214,10 +214,10 @@ To run the Storage Integration tests, follow the instructions in
214
214
#### Push Notifications
215
215
216
216
Push notifications can only be delivered to specially provisioned App IDs in the developer portal.
217
- In order to actually test receiving push notifications, you will need to:
217
+ In order to test receiving push notifications, you will need to:
218
218
219
219
1 . Change the bundle identifier of the sample app to something you own in your Apple Developer
220
- account, and enable that App ID for push notifications.
220
+ account and enable that App ID for push notifications.
221
221
2 . You'll also need to
222
222
[ upload your APNs Provider Authentication Key or certificate to the
223
223
Firebase Console] ( https://firebase.google.com/docs/cloud-messaging/ios/certs )
@@ -226,9 +226,8 @@ at **Project Settings > Cloud Messaging > [Your Firebase App]**.
226
226
227
227
#### iOS Simulator
228
228
229
- The iOS Simulator cannot register for remote notifications, and will not receive push notifications.
230
- In order to receive push notifications, you'll have to follow the steps above and run the app on a
231
- physical device.
229
+ The iOS Simulator cannot register for remote notifications and will not receive push notifications.
230
+ To receive push notifications, follow the steps above and run the app on a physical device.
232
231
233
232
## Building with Firebase on Apple platforms
234
233
@@ -259,8 +258,8 @@ not recorded. (Crashes in SwiftUI are generated as mach exceptions, so will not
259
258
260
259
## Combine
261
260
Thanks to contributions from the community, _ FirebaseCombineSwift_ contains support for Apple's Combine
262
- framework. This module is currently under development, and not yet supported for use in production
263
- environments. Fore more details, please refer to the [ docs] ( FirebaseCombineSwift/README.md ) .
261
+ framework. This module is currently under development and not yet supported for use in production
262
+ environments. For more details, please refer to the [ docs] ( FirebaseCombineSwift/README.md ) .
264
263
265
264
## Roadmap
266
265
0 commit comments