diff --git a/.github/workflows/ios-build.yml b/.github/workflows/ios-build.yml new file mode 100644 index 0000000..c5eefdf --- /dev/null +++ b/.github/workflows/ios-build.yml @@ -0,0 +1,52 @@ +name: iOS Build + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + actions: write + +jobs: + build: + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Fetch Dishtracker SDK dependency + env: + SDK_TOKEN: ${{ secrets.DISHTRACKER_SDK_TOKEN || github.token }} + run: | + GIT_TERMINAL_PROMPT=0 git clone --depth 1 \ + https://x-access-token:${SDK_TOKEN}@github.com/MoonVision/ZeroQDishtrackerSDKiOS.git \ + ../ZeroQDishtrackerSDKiOS + + - name: Build iOS app (unsigned) + run: | + xcodebuild \ + -project DishtrackerCoreExample.xcodeproj \ + -scheme DishtrackerCoreExample \ + -configuration Release \ + -sdk iphoneos \ + -derivedDataPath build \ + CODE_SIGNING_ALLOWED=NO \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_IDENTITY="" + + - name: Package app artifact + run: | + mkdir -p artifacts + ditto -c -k --sequesterRsrc --keepParent \ + build/Build/Products/Release-iphoneos/DishtrackerCoreExample.app \ + artifacts/DishtrackerCoreExample.app.zip + + - name: Upload app artifact + uses: actions/upload-artifact@v4 + with: + name: DishtrackerCoreExample-iphoneos + path: artifacts/DishtrackerCoreExample.app.zip diff --git a/DishtrackerCoreExample.xcodeproj/xcshareddata/xcschemes/DishtrackerCoreExample.xcscheme b/DishtrackerCoreExample.xcodeproj/xcshareddata/xcschemes/DishtrackerCoreExample.xcscheme new file mode 100644 index 0000000..b70a301 --- /dev/null +++ b/DishtrackerCoreExample.xcodeproj/xcshareddata/xcschemes/DishtrackerCoreExample.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DishtrackerCoreExample/Extensions/Location+Test.swift b/DishtrackerCoreExample/Extensions/Location+Test.swift index 3a03edd..ca6159c 100644 --- a/DishtrackerCoreExample/Extensions/Location+Test.swift +++ b/DishtrackerCoreExample/Extensions/Location+Test.swift @@ -15,6 +15,27 @@ extension Location { name: "Demo" ) + static let hellotessDev = Location( + locationID: "hellotess-dev", + name: "HelloTess Dev" + ) + + static let hellotessDevFeature = Location( + locationID: "hellotess-dev-feature", + name: "HelloTess Dev Feature" + ) + + static let dishtrackerCloudDemo = Location( + locationID: "dishtracker-cloud-demo", + name: "Dishtracker Cloud Demo" + ) + + static let dishtrackerCloudDemoMobile = Location( + locationID: "dishtracker-cloud-demo-mobile", + name: "Dishtracker Cloud Demo Mobile" + ) +} + extension String { static let authDev = "Bearer xxx" diff --git a/README.md b/README.md index cb0af69..95870f5 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ This is the SPM example app for [DishtrackerSDK for iOS](https://github.com/Moon * Follow the steps in Xcode to clone and open the project. * Build and run. +## CI Build Artifact + +GitHub Actions produces an unsigned device build artifact (`DishtrackerCoreExample-iphoneos`) as a zipped `.app`. Download it from the workflow run artifacts and re-sign it if you plan to distribute it (for example, via Firebase App Distribution). + ## License This software is licensed under a [modified BSD license](LICENSE).