|
1 | 1 | # Firebase Zip File Builder
|
2 | 2 |
|
3 | 3 | This project builds the Firebase iOS Zip file for distribution.
|
4 |
| -More instructions to come. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +This is a small Swift Package Manager project that allows users to package a Firebase iOS Zip file. With no launch |
| 8 | +arguments, it will use the most recent public versions of all SDKs included in the zip file. |
| 9 | + |
| 10 | +It was designed to fail fast with an explanation of what went wrong, so you can fix issues or dig in without having to dig |
| 11 | +too deep into the code. |
| 12 | + |
| 13 | +## Requirements |
| 14 | + |
| 15 | +In order to build the Zip file, you will need: |
| 16 | + |
| 17 | +- Xcode 10.1 |
| 18 | +- CocoaPods |
| 19 | +- An internet connection to fetch CocoaPods |
| 20 | + |
| 21 | +## Running the Tool |
| 22 | + |
| 23 | +You can run the tool with `swift run ZipBuilder [ARGS]` or generate an Xcode project with |
| 24 | +`swift package generate-xcodeproj` and run within Xcode. |
| 25 | + |
| 26 | +In the near future, releases will be built via a builder server instead of on the release engineer's machine, making these |
| 27 | +instructions more of a reference to understand what's going on instead of how to build it yourself. |
| 28 | + |
| 29 | +## Launch Arguments |
| 30 | + |
| 31 | +See `main.swift` and the `LaunchArgs` struct for information on specific launch arguments. |
| 32 | + |
| 33 | +You can pass in launch arguments with Xcode by clicking "ZipBuilder" beside the Run/Stop buttons, clicking "Edit |
| 34 | +Scheme" and adding them in the "Arguments Passed On Launch" section. |
| 35 | + |
| 36 | +### Common Arguments |
| 37 | + |
| 38 | +These arguments assume you're running the command from the `ZipBuilder` directory. |
| 39 | + |
| 40 | +**Required** arguments: |
| 41 | +- `-templateDir $(pwd)/Template` |
| 42 | + - This should always be the same. |
| 43 | +- `-coreDiagnosticsDir <PATH_TO_FirebaseCoreDiagnostics.framework>` |
| 44 | + - Needed to overwrite the existing Core Diagnostics framework. |
| 45 | + |
| 46 | +Optional comon arguments: |
| 47 | +- `-updatePodRepo false` |
| 48 | + - This is for speedups when `pod repo update` has already been run recently. |
| 49 | + |
| 50 | +For release engineers (Googlers packaging an upcoming Firebase release) these commands should also be used: |
| 51 | +- `-customSpecRepos sso://cpdc-internal/firebase` |
| 52 | + - This pulls the latest podspecs from the CocoaPods staging area. |
| 53 | +- `-releasingSDKs <PATH_TO_current.textproto>` and |
| 54 | +- `-existingVersions <PATH_TO_all_firebase_ios_sdks.textproto>` |
| 55 | + - Validates the version numbers fetched from CocoaPods staging against the expected released versions from these |
| 56 | + textprotos. |
| 57 | + |
| 58 | +Putting them all together, here's a common command to build a releaseable Zip file: |
| 59 | + |
| 60 | +``` |
| 61 | +swift run ZipBuilder -templateDir $(pwd)/Template -updatePodRepo false \ |
| 62 | +-coreDiagnosticsDir /private/tmp/tmpUqBxKN/FirebaseCoreDiagnostics.framework \ |
| 63 | +-releasingSDKs <PATH_TO_current.textproto> \ |
| 64 | +-existingVersions <PATH_TO_all_firebase_ios_sdks.textproto> \ |
| 65 | +-customSpecRepos sso://cpdc-internal/firebase |
| 66 | +``` |
| 67 | + |
| 68 | +## Debugging |
| 69 | + |
| 70 | +You can generate an Xcode project for the tool by running `swift package generate-xcodeproj` in this directory. |
| 71 | +See the above instructions for adding Launch Arguments to the Xcode build. |
5 | 72 |
|
6 | 73 | ## Priorities
|
7 | 74 |
|
|
0 commit comments