@@ -8,51 +8,62 @@ Firebase is an app development platform with tools to help you build, grow and
8
8
monetize your app. More information about Firebase can be found at
9
9
[ https://firebase.google.com ] ( https://firebase.google.com ) .
10
10
11
- ** Note: This page and repo is for those interested in exploring the internals of
12
- the Firebase iOS SDK. If you're interested in using the Firebase iOS SDK, start at
13
- [ https://firebase.google.com/docs/ios/setup ] ( https://firebase.google.com/docs/ios/setup ) .**
11
+ ## Installation
14
12
15
- ## Context
13
+ See the three subsections for details about three different installation methods.
14
+ 1 . [ Officially supported binary pods] ( README.md#binary-pods-ios-only )
15
+ 1 . [ Community supported source pods] ( README.md#source-pods-ios-macos-tvos )
16
+ 1 . [ Experimental Carthage] ( README.md#carthage-ios-only )
16
17
17
- This repo contains a fully functional development environment for FirebaseCore,
18
- FirebaseAuth, FirebaseDatabase, FirebaseFirestore, FirebaseFunctions,
19
- FirebaseMessaging, and FirebaseStorage. By following the usage instructions
20
- below, they can be developed and debugged with unit tests, integration tests,
21
- and reference samples.
18
+ ### Binary pods (iOS only)
22
19
23
- ## Source pod integration
20
+ Go to
21
+ [ https://firebase.google.com/docs/ios/setup ] ( https://firebase.google.com/docs/ios/setup ) .
22
+
23
+ ### Source pods (iOS, macOS, tvOS)
24
24
25
25
While the official Firebase release remains a binary framework distribution,
26
26
in the future, we plan to switch to a source CocoaPod distribution for the
27
27
Firebase open source components.
28
28
29
- It is now possible to override the default pod locations with source pod
30
- locations described via the Podfile syntax documented
31
- [ here] ( https://guides.cocoapods.org/syntax/podfile.html#pod ) .
29
+ #### Background
32
30
33
- ** CocoaPods 1.4.0** or later is required.
31
+ See
32
+ [ the Podfile Syntax Reference] ( https://guides.cocoapods.org/syntax/podfile.html#pod )
33
+ for instructions and options about overriding pod source locations.
34
34
35
- If source pods are included, ** FirebaseCore ** must also be included.
35
+ #### Step-by-step Source Pod Installation Instructions
36
36
37
- For example, to access FirebaseMessaging via a checked out version of the
38
- firebase-ios-sdk repo do:
37
+ For iOS, copy a subset of the following lines to your Podfile:
39
38
40
39
```
41
- pod 'FirebaseMessaging', :path => '/path/to/firebase-ios-sdk'
42
- pod 'FirebaseCore', :path => '/path/to/firebase-ios-sdk'
43
- ```
44
- To access via a branch:
45
- ```
46
- pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
47
- pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
40
+ pod 'Firebase' # To enable Firebase module, with `@import Firebase` support
41
+ pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
42
+ pod 'FirebaseAuth', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
43
+ pod 'FirebaseDatabase', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
44
+ pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
45
+ pod 'FirebaseFunctions', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
46
+ pod 'FirebaseMessaging', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
47
+ pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
48
48
```
49
49
50
- To access via a tag (Release tags will be available starting with Firebase 4.7.0:
50
+ For macOS and tvOS, copy a subset of the following:
51
+
51
52
```
52
- pod 'FirebaseAuth', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.7.0'
53
- pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.7.0'
53
+ pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
54
+ pod 'FirebaseAuth', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
55
+ pod 'FirebaseDatabase', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
56
+ pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :tag => '4.11.0'
54
57
```
55
58
59
+ 1 . Make sure you have at least CocoaPods version 1.4.0 - ` pod --version ` .
60
+ 1 . Delete pods for any components you don't need, except ` FirebaseCore ` must always be included.
61
+ 1 . Update the tags to the latest Firebase release. See the
62
+ [ release notes] ( https://firebase.google.com/support/release-notes/ios ) .
63
+ 1 . Run ` pod update ` .
64
+
65
+ #### Static library usage
66
+
56
67
If your Podfile does not include * use_frameworks!* , you need to workaround
57
68
a build issue with the FirebaseAnalytics umbrella header. Delete the first four lines
58
69
of ` Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h `
@@ -62,7 +73,29 @@ See the `post_install` phase of [Example/Podfile](Example/Podfile) for an exampl
62
73
of applying the workaround automatically - make sure you correct the path of
63
74
` patch/FirebaseAnalytics.h ` .
64
75
65
- ## Usage
76
+ #### Examples
77
+
78
+ To access FirebaseMessaging via a checked out version of the firebase-ios-sdk repo do:
79
+
80
+ ```
81
+ pod 'FirebaseMessaging', :path => '/path/to/firebase-ios-sdk'
82
+ pod 'FirebaseCore', :path => '/path/to/firebase-ios-sdk'
83
+ ```
84
+ To access via a branch:
85
+ ```
86
+ pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
87
+ pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
88
+ ```
89
+
90
+ ### Carthage (iOS only)
91
+
92
+ An experimental Carthage distribution is now available. See
93
+ [ Carthage] ( Carthage.md ) .
94
+
95
+ ## Development
96
+
97
+ Follow the subsequent instructions to develop, debug, unit test, run integration
98
+ tests, and try out reference samples:
66
99
67
100
```
68
101
$ git clone [email protected] :firebase/firebase-ios-sdk.git
@@ -152,10 +185,7 @@ actively developed primarily for iOS. While we can catch basic unit test issues
152
185
may be some changes where the SDK no longer works as expected on macOS or tvOS. If you encounter
153
186
this, please [ file an issue] ( https://github.com/firebase/firebase-ios-sdk/issues ) .
154
187
155
- ## Carthage
156
-
157
- An experimental Carthage distribution is now available. See
158
- [ Carthage] ( Carthage.md ) .
188
+ For installation instructions, see [ above] ( README.md#step-by-step-source-pod-installation-instructions ) .
159
189
160
190
## Roadmap
161
191
0 commit comments