Skip to content

DatepollSystems/WaiterRobot-iOS

Repository files navigation

WaiterRobot

Lightning fast and simple gastronomy

Download on the App Store

iOS

This Repository includes the iOS version of the WaiterRobot App. It is based on a shared Kotlin-Multiplatform (KMM) module, which can be found here (there you can also find the Android version of the app). The KMM module is integrated as a Swift-Package (shared).

Getting started

This project uses XcodeGen for generating the Xcode project.

  1. Xcodegen

Run in your terminal:

swift run xcodegen

This command must also be run after switching branches and it's advisable to also run it after a git pull

  1. Git pre-commit hook

To have unified formatting, we use SwiftFormat. The pre-commit hook can be installed if the code should be formatted automatically before every commit. Execute following command in your terminal:

bash install-git-hook.sh
  1. Add credentials for the GitHub Maven Package Registry

To be able to download the shared SPM package from the GitHub Package Registry you need to authenticate against GitHub. Therefore you need to add the following to your ~/.netrc file (create the file if it doesn't exist). The personal access token can be created on GitHub under Settings -> Developer settings -> Personal access tokens -> Fine-grained tokens -> Generate new token. The token just needs the "Public Repositories (read-only)" access. No additional permissions are needed.

machine maven.pkg.github.com
  login [github username]
  password [your new personal access token]
  1. Open the WaiterRobot.xcodeproj in Xcode and start coding :)

Dev with local KMM module version

For a guide to use a local version of the KMM module see KMMBridge local dev spm

Short version

  1. Run ./gradlew spmDevBuild in the KMM project (must be run after each change in the KMM module)
  2. Drag the whole KMM project folder (top level git folder) into the WaiterRobot project in Xcode
  3. Start programming :)
  4. When finished delete folder, make sure to select "Remove References"!!! (otherwise the whole KMM project will be deleted locally)

Releasing

Production release is triggered on push to main. The CI then builds the app and deploys it to TestFlight. After testing the app then must be released manually from there. A tag in the form of major.minor.patch (e.g. android-1.0.0) is created. (see publish.yml)

Do not forget to bump the iOS app version (project.yml, CFBundleShortVersionString & CFBundleVersion) on the dev branch after a production release was made.

On each push to develop also a lava (dev) build is triggered and published to TestFlight of the WaiterRobot Lava app. A tag in the form of major.minor.patch-lava-epochMinutes is created (e.g. android-1.0.1-lava-27935730). (see publish.yml)

Language, libraries and tools