You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use Firestack, we'll need to have a development environment that includes the same prerequisites of Firebase.
56
56
57
-
Regardless of which linking you choose to run with, it is _very_ important to "embed" the framework `libFirestack.a` in your application. Until we can find an automated way of handling this, *this needs to be done manually*.
57
+
### iOS (with cocoapods)
58
58
59
-
#### iOS will _not_be able to find `libFirestack.a` if you forget this step.
59
+
Unfortunately, due to AppStore restrictions, we currently do _not_package Firebase libraries in with Firestack. However, the good news is we've automated the process (with many thanks to the Auth0 team for inspiration) of setting up with cocoapods. This will happen automatically upon linking the package with `react-native-cli`.
60
60
61
-
Find your application tab in Xcode, click on `Build Phases`. In there, find the build phase of `Embed Frameworks` and click the `+` button and add `libFirestack.a` to the list. Make sure the `Code Sign on Copy` checkbox is ticked on and the destination is Frameworks with an empty subpath.
62
-
63
-
> If you do not see an `Embed Frameworks` build phase, do not fret! Click on the plus button on the build phases menu and select `New Copy Files Phase`. Make sure the destination is set to `Frameworks` and it'll be the same thing as the `Embed Frameworks` phase.
64
-
65
-

66
-
67
-
### iOS
61
+
**Remember to use the `ios/[YOUR APP NAME].xcworkspace` instead of the `ios/[YOUR APP NAME].xcproj` file from now on**.
68
62
69
63
We need to link the package with our development packaging. We have two options to handle linking:
70
64
@@ -76,8 +70,6 @@ React native ships with a `link` command that can be used to link the projects t
76
70
react-native link react-native-firestack
77
71
```
78
72
79
-
Firestack will automatically pull in all of the Firebase requirements and link Firebase to our own project.
80
-
81
73
#### Manually
82
74
83
75
If you prefer not to use `rnpm`, we can manually link the package together with the following steps, after `npm install`:
@@ -98,9 +90,34 @@ If you prefer not to use `rnpm`, we can manually link the package together with
98
90
99
91
1.`$(SRCROOT)/../../react-native/React`
100
92
2.`$(SRCROOT)/../node_modules/react-native/React`
93
+
3.`${PROJECT_DIR}/../../../ios/Pods`
101
94
102
95

103
96
97
+
5. Setting up cocoapods
98
+
99
+
Since we're dependent upon cocoapods (or at least the Firebase libraries being available at the root project -- i.e. your application), we have to make them available for Firestack to find them.
100
+
101
+
Using cocoapods is the easiest way to get started with this linking. Add or update a `Podfile` at `ios/Podfile` in your app with the following:
102
+
103
+
```ruby
104
+
source 'https://github.com/CocoaPods/Specs.git'
105
+
[
106
+
'Firebase/Core',
107
+
'Firebase/Auth',
108
+
'Firebase/Storage',
109
+
'Firebase/Database',
110
+
'Firebase/RemoteConfig',
111
+
'Firebase/Messaging'
112
+
].each do |lib|
113
+
pod lib
114
+
end
115
+
```
116
+
117
+
Then you can run `(cd ios && pod install)` to get the pods opened. If you do use this route, remember to use the `.xcworkspace` file.
118
+
119
+
If you don't want to use cocoapods, you don't need to use it! Just make sure you link the Firebase libraries in your project manually. For more information, check out the relevant Firebase docs at [https://firebase.google.com/docs/ios/setup#frameworks](https://firebase.google.com/docs/ios/setup#frameworks).
120
+
104
121
### Android
105
122
106
123
Full Android support is coming soon, as it currently supports a smaller feature-set than the iOS version. Just as we do with iOS, we'll need to install the library using `npm` and call `link` on the library:
0 commit comments