Skip to content

Commit 9750eac

Browse files
authored
Merge pull request #584 from firebase/feature/update-tvos-documentation
updated docs for tvos
2 parents e246b63 + db90d9c commit 9750eac

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ Android.
117117
Note that we include the Gradle wrapper, which if used will acquire the
118118
necessary version of Gradle for you.
119119

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.
122122
- [Cocoapods](https://cocoapods.org/)
123123

124124
## Building
@@ -192,15 +192,40 @@ Currently, the third party libraries that can be provided this way are:
192192
The Firebase C++ SDK comes with a CMake config file to build the library for
193193
iOS platforms, [cmake/toolchains/ios.cmake](/cmake/toolchains/ios.cmake). In
194194
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
196196
library for iOS, you could run the following commands:
197197

198198
``` bash
199199
mkdir ios_build && cd ios_build
200200
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
202226
```
203227

228+
204229
### Building with Gradle for Android
205230
When building the Firebase C++ SDK for Android, gradle is used in combination
206231
with CMake when producing the libraries. Each Firebase feature is its own

0 commit comments

Comments
 (0)