Skip to content

cuappdev/ithaca-transit-ios

Repository files navigation

Ithaca Transit

Introducing Ithaca Transit, a new end-to-end navigation service for built for the TCAT bus service. A free and open-source app, Ithaca Transit offers a diverse range of features in a beautiful, clean interface to help get you where you need to go. Download the current release on the App Store.

System Requirements

You must have at least Xcode 14.0, iOS 15.0, and Swift 5.5 to run this app.

Dependencies

This app uses CocoaPods for dependencies.

Getting Started

  1. Clone the repository.
  2. Go to TransitSecrets/ and drag the following four files into FINDER (NOT Xcode). You must create this folder through Finder. For AppDev members, you can find these pinned in the #transit-ios Slack channel.
    • GoogleService-Info.plist
    • Keys.plist
    • uplift-codegen-config-dev.json
    • uplift-codegen-config-prod.json
  3. Install CocoaPods dependencies with pod install.
  4. Open the Workspace, select TCAT under Targets, then choose the Build Phases tab.
  • There should be a run script labeled SwiftLint. If not, create a New Run Script Phase with the following script:
"${PODS_ROOT}/SwiftLint/swiftlint"

if which swiftlint >/dev/null; then
    swiftlint --fix && swiftlint
else
    echo "WARNING: SwiftLint not installed"
fi
  • There should also be another run script labeled UpliftAPI If not, create a New Run Script Phase with the following script:
CLI_PATH="./Pods/Apollo/apollo-ios-cli"
SECRETS_PATH="${SRCROOT}/TransitSecrets"

if [ "${CONFIGURATION}" != "Release" ]; then
  CONFIG_PATH="${SECRETS_PATH}/uplift-codegen-config-dev.json"
fi

if [ "${CONFIGURATION}" = "Release" ]; then
  CONFIG_PATH="${SECRETS_PATH}/uplift-codegen-config-prod.json"
fi

"${CLI_PATH}" generate -p "${CONFIG_PATH}" -f
  1. Select the TCAT Debug schema to use our development server and TCAT Release to use our production server.
  2. Generate the Uplift API with the following command: ./Pods/Apollo/apollo-ios-cli generate -p "TransitSecrets/uplift-codegen-config-dev.json" -f
  3. Build the project and you should be good to go.

Common Issues

  • If the build script for generating the API folder doesn't work, you can manually generate the API via ./Pods/Apollo/apollo-ios-cli generate -p "TransitSecrets/uplift-codegen-config-dev.json" -f

  • If UpliftAPI is not detected or if your new written queries/mutations are not generated by Apollo, make sure that the generated UpliftAPI folder is linked to the TCAT target. You can do this by simply deleting the UpliftAPI group via the project navigator on Xcode and dragging the generated UpliftAPI folder from Finder to Xcode.

Location

  • To change the simulator's location, within the Simulator.app menu bar, go to Debug > Location and click on Custom Location. Goldwin Smith Hall's coordinates are 42.449071, -76.483759.