|
20 | 20 |
|
21 | 21 | It does the following,
|
22 | 22 | - Build ios and tvos libraries via cmake (after downloading corresponding
|
23 |
| -cocoapods) |
| 23 | +cocoapods). |
24 | 24 | - Create a "universal" framework if all platforms and architectures were built.
|
25 |
| -- Create "xcframeworks" combining both ios and tvos frameworks under one roof. |
| 25 | +- Create "xcframeworks" combining both ios and tvos frameworks. |
26 | 26 |
|
27 | 27 | Usage examples:
|
28 | 28 | # Build all supported targets and architectures on all platforms.
|
29 | 29 | python3 scripts/gha/build_ios_tvos.py
|
30 | 30 |
|
31 |
| -
|
32 | 31 | # Build specific targets
|
33 | 32 | python3 scripts/gha/build_ios_tvos.py -t firebase_auth firebase_database
|
34 | 33 |
|
35 | 34 | # Build for specific architectures
|
36 | 35 | python3 scripts/gha/build_ios_tvos.py -p arm64 -t firebase_remote_config
|
37 |
| -
|
38 | 36 | """
|
39 | 37 |
|
40 | 38 | import argparse
|
@@ -128,7 +126,7 @@ def arrange_frameworks(archive_output_path):
|
128 | 126 | def build_universal_framework(frameworks_path):
|
129 | 127 | """Create universal frameworks if possible.
|
130 | 128 |
|
131 |
| - If all architectures (eg: arm64, armv7 etc) and platforms(device, simulator) |
| 129 | + If all architectures (eg: arm64, armv7 etc) and platforms (device, simulator) |
132 | 130 | were built, combine all of the libraries into a single universal framework.
|
133 | 131 | Args:
|
134 | 132 | frameworks_path (str): Root path containing subdirectories for each
|
@@ -447,9 +445,10 @@ def cmake_configure_and_build(build_path, toolchain,
|
447 | 445 | archive_output_path (str): Path to build and save libraries/frameworks to.
|
448 | 446 | targets (list(str)): CMake build targets. (eg: firebase_auth, etc)
|
449 | 447 | architecture (str, optional): Architecture passed onto the cmake build
|
450 |
| - system. Used when building for ios only. Defaults to None. |
| 448 | + system. Used when building for ios only. (eg:'arm64', 'x86_64') |
451 | 449 | toolchain_platform (str, optional): Platform cmake option passed for tvos
|
452 |
| - builds only. Defaults to None. |
| 450 | + builds only. Accepts all platforms supported by the tvos toolchain. |
| 451 | + (eg: 'TVOS', 'SIMULATOR_TVOS' etc) |
453 | 452 | """
|
454 | 453 | cmd = ['cmake', '-S', '.', '-B', build_path]
|
455 | 454 | cmd.append('-DCMAKE_TOOLCHAIN_FILE={0}'.format(toolchain))
|
|
0 commit comments