-
Notifications
You must be signed in to change notification settings - Fork 23
Setup
The Blue Alliance for iOS has a few build tool dependencies. Here's how to install those, if you need them. The commands below suggest Homebrew to install the dependencies. If you're on Windows or Linux, follow the links to find platform-specific setup instructions.
- Install Xcode
- The Blue Alliance for iOS is written in Swift 4.2, which comes with Xcode 10+
- Install Ruby (if it's not already installed on your system) and Bundler
brew install ruby
gem install bundler
- Install Node/npm
brew install node
These should be done after you've cloned the project and navigated to the project directory
- Install React Native dependencies
cd subtrees/the-blue-alliance-react && npm install && cd ../..
- Install Ruby dependencies
bundle install
- Install Cocoapods dependencies
bundle exec pod install --repo-update
The Blue Alliance's mobile apps depend on The Blue Alliance's API for providing data. You'll need an API key to develop with when testing/building.
- Navigate to The Blue Alliance's Account page (sign in if prompted)
- Scroll down to
Read API Keys
- Enter a locally namespaced description (ex:
zach-tba-ios-dev
) - Click
+ Add New Key
to generate a new API key
We'll use this key in the Setup Secrets step when setting up local secrets in the The Blue Alliance for iOS project.
The Blue Alliance for iOS stores secrets locally in a Secrets.plist
file, which is loaded dynamically at runtime as a dictionary to be used in the app. Create a Secrets.plist
file from the template mock-Secrets.plist
$ cp mock-Secrets.plist the-blue-alliance-ios/Secrets.plist
If linked properly, the Secrets.plist
file in the Xcode project navigation should go from being red to being black. Click Secrets.plist
to edit it, and fill out the secret values. tba_api_key
should be the TBA API key you generated in the Setup TBA API step.
Before building in Xcode, make sure you've setup a Firebase project, as described in the Setup Firebase section
- Be sure you have all required build tools, as described in the Install Build Tool Dependencies section
- Install project dependencies, as described in the Install Project Dependencies section
- Setup your
Secrets.plist
file, as described in the Setup Secrets section - Open the workspace file (
the-blue-alliance-ios.xcworkspace
) - Build and run The Blue Alliance for iOS!