-
Notifications
You must be signed in to change notification settings - Fork 23
Setup
To develop for The Blue Alliance for iOS, you will need a machine running macOS.
The commands below suggest Homebrew to install the dependencies.
All build tool dependencies can be installed automatically - this includes Xcode, from the Mac App Store.
$ brew bundle
Afterwards, you will need to manually install the Xcode Command Line Tools
$ xcode-select --install
- Install Xcode
- The Blue Alliance for iOS is written in Swift 4.2, which comes with Xcode 10+
- Install the Xcode command line tools
xcode-select --install
- Or, open Xcode, go to Preferences -> Locations -> Command Line Tools, and select your version of Xcode
- 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
$ bundle install
$ bundle exec fastlane install_deps
- Install React Native dependencies
npm install --prefix subtrees/the-blue-alliance-react
- 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. Edit Secrets.plist
(either in Xcode or in a text editor) and fill out the secret values. tba_api_key
should be the TBA API key you generated in the Setup TBA API step.
- 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!
If you have a local copy of the repo but haven't work on it in a while, updating to the latest codebase is fairly straightforward
$ git pull
$ bundle exec fastlane install_deps