Skip to content

Commit acc5c45

Browse files
authored
Improve macOS/tvOS installation instructions (#972)
* And provide prescriptive source pod instructions
1 parent 4c3fb51 commit acc5c45

File tree

1 file changed

+62
-32
lines changed

1 file changed

+62
-32
lines changed

README.md

Lines changed: 62 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,51 +8,62 @@ Firebase is an app development platform with tools to help you build, grow and
88
monetize your app. More information about Firebase can be found at
99
[https://firebase.google.com](https://firebase.google.com).
1010

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
1412

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)
1617

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)
2219

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)
2424

2525
While the official Firebase release remains a binary framework distribution,
2626
in the future, we plan to switch to a source CocoaPod distribution for the
2727
Firebase open source components.
2828

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
3230

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.
3434

35-
If source pods are included, **FirebaseCore** must also be included.
35+
#### Step-by-step Source Pod Installation Instructions
3636

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:
3938

4039
```
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'
4848
```
4949

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+
5152
```
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'
5457
```
5558

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+
5667
If your Podfile does not include *use_frameworks!*, you need to workaround
5768
a build issue with the FirebaseAnalytics umbrella header. Delete the first four lines
5869
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
6273
of applying the workaround automatically - make sure you correct the path of
6374
`patch/FirebaseAnalytics.h`.
6475

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:
6699

67100
```
68101
$ 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
152185
may be some changes where the SDK no longer works as expected on macOS or tvOS. If you encounter
153186
this, please [file an issue](https://github.com/firebase/firebase-ios-sdk/issues).
154187

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).
159189

160190
## Roadmap
161191

0 commit comments

Comments
 (0)