Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add iOS app build (#846)

Leendert de Borst4efe20122411
diff --git a/.github/workflows/mobile-app-build.yml b/.github/workflows/mobile-app-build.yml
index 287c33edb..1afc09f72 100644
--- a/.github/workflows/mobile-app-build.yml
+++ b/.github/workflows/mobile-app-build.yml
@@ -12,6 +12,11 @@ on:
required: true
type: boolean
default: false
+ build_ios_signed:
+ description: 'Build signed iOS IPA'
+ required: true
+ type: boolean
+ default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -226,4 +231,69 @@ jobs:
path: apps/mobile-app/android/app/build/outputs/bundle/release/app-release.aab
retention-days: 14
+ build-ios-signed:
+ needs: setup
+ if: github.event_name == 'workflow_dispatch' && github.event.inputs.build_ios_signed == 'true'
+ runs-on: macos-latest
+ defaults:
+ run:
+ working-directory: apps/mobile-app
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ cache: 'npm'
+ cache-dependency-path: apps/mobile-app/package-lock.json
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Setup Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: '3.2'
+ bundler-cache: true
+
+ - name: Install Fastlane
+ run: gem install fastlane
+
+ - name: Decode Certificate
+ run: |
+ echo "${{ secrets.IOS_CERTIFICATE_BASE64 }}" | base64 --decode > certificate.p12
+ security create-keychain -p "" build.keychain
+ security default-keychain -s build.keychain
+ security unlock-keychain -p "" build.keychain
+ security import certificate.p12 -k build.keychain -P "${{ secrets.IOS_CERTIFICATE_PASSWORD }}" -T /usr/bin/codesign
+ security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
+
+ - name: Decode Provisioning Profile
+ run: |
+ echo "${{ secrets.IOS_PROVISIONING_PROFILE_BASE64 }}" | base64 --decode > AliasVault.mobileprovision
+ mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
+ cp AliasVault.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
+
+ - name: Build JS bundle (iOS - Expo)
+ run: |
+ mkdir -p build
+ npx expo export \
+ --dev \
+ --output-dir ./build \
+ --platform ios
+
+ - name: Build iOS IPA
+ run: |
+ cd ios
+ xcodebuild -workspace AliasVault.xcworkspace -scheme AliasVault -configuration Release -archivePath AliasVault.xcarchive archive
+ xcodebuild -exportArchive -archivePath AliasVault.xcarchive -exportOptionsPlist ../exportOptions.plist -exportPath ./build
+
+ - name: Upload IPA
+ uses: actions/upload-artifact@v4
+ with:
+ name: signed-ipa
+ path: apps/mobile-app/ios/build/AliasVault.ipa
+ retention-days: 14
+
diff --git a/apps/mobile-app/ios/exportOptions.plist b/apps/mobile-app/ios/exportOptions.plist
new file mode 100644
index 000000000..4dbc2aeb4
--- /dev/null
+++ b/apps/mobile-app/ios/exportOptions.plist
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>method</key>
+ <string>app-store</string>
+ <key>teamID</key>
+ <string>$(DEVELOPMENT_TEAM)</string>
+ <key>signingStyle</key>
+ <string>manual</string>
+ <key>provisioningProfiles</key>
+ <dict>
+ <key>net.aliasvault.app</key>
+ <string>$(PROVISIONING_PROFILE_SPECIFIER)</string>
+ </dict>
+ <key>signingCertificate</key>
+ <string>Apple Distribution</string>
+ <key>uploadBitcode</key>
+ <false/>
+ <key>uploadSymbols</key>
+ <true/>
+ <key>compileBitcode</key>
+ <false/>
+</dict>
+</plist>