@@ -117,8 +117,8 @@ Android.
117
117
Note that we include the Gradle wrapper, which if used will acquire the
118
118
necessary version of Gradle for you.
119
119
120
- ### Prerequisites for iOS
121
- The following prerequisites are required when building the libraries for iOS.
120
+ ### Prerequisites for iOS/tvOS
121
+ The following prerequisites are required when building the libraries for iOS or tvOS .
122
122
- [ Cocoapods] ( https://cocoapods.org/ )
123
123
124
124
## Building
@@ -192,15 +192,40 @@ Currently, the third party libraries that can be provided this way are:
192
192
The Firebase C++ SDK comes with a CMake config file to build the library for
193
193
iOS platforms, [ cmake/toolchains/ios.cmake] ( /cmake/toolchains/ios.cmake ) . In
194
194
order to build with it, when running the CMake configuration pass it in with
195
- the CMAKE_TOOLCHAIN_FILE definition. For example, to build the Analytics
195
+ the CMAKE_TOOLCHAIN_FILE definition. For example, to build the Auth
196
196
library for iOS, you could run the following commands:
197
197
198
198
``` bash
199
199
mkdir ios_build && cd ios_build
200
200
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake ..
201
- cmake --build . --target firebase_analytics
201
+ cmake --build . --target firebase_auth
202
+ ```
203
+
204
+ #### Building with CMake for tvOS
205
+ The Firebase C++ SDK comes with a CMake config file to build the library for
206
+ tvOS platforms, [ cmake/toolchains/apple.toolchain.cmake] ( /cmake/toolchains/apple.toolchain.cmake ) . In
207
+ order to build with it, when running the CMake configuration pass it in with
208
+ the CMAKE_TOOLCHAIN_FILE definition. For example, to build the Auth
209
+ library for tvOS, you could run the following commands:
210
+
211
+ ``` bash
212
+ mkdir tvos_build && cd tvos_build
213
+ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/apple.toolchain.cmake -DPLATFORM=TVOS ..
214
+ cmake --build . --target firebase_auth
215
+ ```
216
+
217
+ #### Building XCFrameworks for both iOS and tvOS
218
+ The Firebase C++ SDK comes with a helper Python script to build XCFrameworks
219
+ that work for both iOS and tvOS. This is helpful as we can use the same
220
+ deliverable for both iOS and tvOS targets in the same XCode project.
221
+
222
+ ``` bash
223
+ # Install prereqs (like cocoapods)
224
+ ./build_scripts/tvos/install_prereqs.sh
225
+ python scripts/gha/build_ios_tvos.py -s . -b ios_tvos_build
202
226
```
203
227
228
+
204
229
### Building with Gradle for Android
205
230
When building the Firebase C++ SDK for Android, gradle is used in combination
206
231
with CMake when producing the libraries. Each Firebase feature is its own
0 commit comments