Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile/ios): add job for building ios app

AndreeaCorlacid793fbb60d94
diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml
index 1fc19b0649..76c332d8e3 100644
--- a/.github/workflows/mobile.yml
+++ b/.github/workflows/mobile.yml
@@ -55,3 +55,65 @@ jobs:
name: trilium-mobile-debug-apk
path: apps/mobile/android/app/build/outputs/apk/debug/*.apk
retention-days: 14
+
+ build_ios:
+ name: Build iOS App
+ # iOS builds require Xcode, which is only available on macOS runners.
+ runs-on: macos-latest
+ steps:
+ - name: Checkout the repository
+ uses: actions/checkout@v6
+
+ - uses: pnpm/action-setup@v6
+
+ - name: Set up Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: 24
+ cache: "pnpm"
+
+ - name: Select Xcode
+ run: sudo xcode-select -s /Applications/Xcode.app
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Update build info
+ run: pnpm run chore:update-build-info
+
+ - name: Build client-standalone (webDir for Capacitor)
+ run: pnpm --filter @triliumnext/mobile build
+
+ - name: Sync Capacitor iOS project
+ run: pnpm --filter @triliumnext/mobile exec cap sync ios
+
+ # Build an unsigned .app for the iOS Simulator. This sidesteps the need
+ # for Apple Developer signing credentials and produces a bundle that can
+ # be launched in the Simulator for smoke-testing or downloaded as an
+ # artifact. Switch to a signed archive build once we have certs + a
+ # provisioning profile in repo secrets.
+ - name: Build iOS app for Simulator (unsigned)
+ working-directory: apps/mobile/ios/App
+ run: |
+ xcodebuild \
+ -project App.xcodeproj \
+ -scheme App \
+ -configuration Debug \
+ -sdk iphonesimulator \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath build \
+ CODE_SIGNING_ALLOWED=NO \
+ CODE_SIGNING_REQUIRED=NO \
+ CODE_SIGN_IDENTITY="" \
+ build
+
+ - name: Package .app bundle
+ working-directory: apps/mobile/ios/App/build/Build/Products/Debug-iphonesimulator
+ run: zip -ry App.app.zip App.app
+
+ - name: Upload iOS Simulator app
+ uses: actions/upload-artifact@v7
+ with:
+ name: trilium-mobile-ios-simulator-app
+ path: apps/mobile/ios/App/build/Build/Products/Debug-iphonesimulator/App.app.zip
+ retention-days: 14