Skip to content
Zachary Orr edited this page Nov 20, 2018 · 20 revisions

Install Build Tool Dependencies

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.

  1. Install Xcode
    • The Blue Alliance for iOS is written in Swift 4.2, which comes with Xcode 10+
  2. Install Ruby (if it's not already installed on your system) and Bundler
    • brew install ruby
    • gem install bundler
  3. Install Node/npm
    • brew install node

Install Project Dependencies

These should be done after you've cloned the project and navigated to the project directory

  1. Install React Native dependencies
    • cd subtrees/the-blue-alliance-react && npm install && cd ../..
  2. Install Ruby dependencies
    • bundle install
  3. Install Cocoapods dependencies
    • bundle exec pod install --repo-update

Setup TBA API

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.

  1. Navigate to The Blue Alliance's Account page (sign in if prompted)
  2. Scroll down to Read API Keys
  3. Enter a locally namespaced description (ex: zach-tba-ios-dev)
  4. 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.

Setup Secrets

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.

Building in Xcode

Before building in Xcode, make sure you've setup a Firebase project, as described in the Setup Firebase section

  1. Be sure you have all required build tools, as described in the Install Build Tool Dependencies section
  2. Install project dependencies, as described in the Install Project Dependencies section
  3. Setup your Secrets.plist file, as described in the Setup Secrets section
  4. Open the workspace file (the-blue-alliance-ios.xcworkspace)
  5. Build and run The Blue Alliance for iOS!
Clone this wiki locally