From c284f73c049d93f94669081a82f13283ae233d1c Mon Sep 17 00:00:00 2001 From: Michael Diarmid Date: Thu, 6 Apr 2017 13:11:43 +0100 Subject: [PATCH] Update installation.ios.md --- docs/installation.ios.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/docs/installation.ios.md b/docs/installation.ios.md index ee2fc939..2ac49b9d 100644 --- a/docs/installation.ios.md +++ b/docs/installation.ios.md @@ -1,12 +1,10 @@ -# iOS Installation +## iOS Installation -## Firebase +### 1 - Setup google-services.plist and dependencies +Setup the `google-services.plist` file and Firebase ios frameworks first; check out the relevant Firebase docs [here](https://firebase.google.com/docs/ios/setup#frameworks). -### Setup -Setup the Firebase ios frameworks first; check out the relevant Firebase docs [here](https://firebase.google.com/docs/ios/setup#frameworks). - -### Initialisation -You need to add the following to the top of `ios/[YOUR APP NAME]]/AppDelegate.m`: +#### 1.1 - Initialisation +Make sure you've added the following to the top of your `ios/[YOUR APP NAME]]/AppDelegate.m` file: `#import ` @@ -14,14 +12,14 @@ and this to the `didFinishLaunchingWithOptions:(NSDictionary *)launchOptions` me `[FIRApp configure];` -## RNFirebase -There are multiple ways to install RNFirebase dependent on how your project is currently setup: +### 2 - Link RNFirebase +There are multiple ways to install RNFirebase depending on how your project is currently setup: -### 1) Existing Cocoapods setup, including React Native as a pod +#### 2.1 - Existing Cocoapods setup, including React Native as a pod Simply add the following to your `Podfile`: ```ruby -# Required by RNFirebase +# Required by RNFirebase - you should already have some of these from step 1. pod 'Firebase/Auth' pod 'Firebase/Analytics' pod 'Firebase/AppIndexing' @@ -35,7 +33,7 @@ pod 'Firebase/Storage' pod 'RNFirebase', :path => '../node_modules/react-native-firebase' ``` -### 2) Automatically with react-native-cli +#### 2.2 - Via react-native-cli link React native ships with a `link` command that can be used to link the projects together, which can help automate the process of linking our package environments. ```bash @@ -48,12 +46,12 @@ Update the newly installed pods once the linking is done: cd ios && pod update --verbose ``` -#### cocoapods +##### cocoapods We've automated the process of setting up with cocoapods. This will happen automatically upon linking the package with `react-native-cli`. **Remember to use the `ios/[YOUR APP NAME].xcworkspace` instead of the `ios/[YOUR APP NAME].xcproj` file from now on**. -### 3) Manually +#### 2.3 - Manually If you prefer not to use `react-native link`, we can manually link the package together with the following steps, after `npm install`: