Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add Locker iOS release build

Manav Rathia364909ce658
diff --git a/.github/docs/apple-signing.md b/.github/docs/apple-signing.md
index 834ef46924..38e10f2182 100644
--- a/.github/docs/apple-signing.md
+++ b/.github/docs/apple-signing.md
@@ -146,6 +146,8 @@ Use the distribution channel as the profile name: `<App> App Store`.
For another iOS app, reuse the same Apple Distribution certificate and App Store Connect API key, but create a separate App Store provisioning profile for that app's bundle ID.
+If the app ships extensions, create one App ID and one App Store profile per shipped bundle ID. For example, Locker has two provisioning profiles: "Locker App Store" for `io.ente.locker` and "Locker Share Extension App Store" for `io.ente.locker.Share-Extension`.
+
### Entitlements
When adding new entitlements, the profile needs to be regenerated.
diff --git a/.github/workflows/locker-build.yml b/.github/workflows/locker-build.yml
index 38dc675d62..3133ae4708 100644
--- a/.github/workflows/locker-build.yml
+++ b/.github/workflows/locker-build.yml
@@ -101,11 +101,10 @@ jobs:
working-directory: mobile/apps/locker
steps:
- - name: Checkout code and submodules
+ - name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ needs.build-metadata.outputs.commit_sha }}
- submodules: recursive
- name: Setup JDK 17
uses: actions/setup-java@v5
@@ -199,8 +198,95 @@ jobs:
whatsNewDirectory: mobile/apps/locker/whatsnew
mappingFile: mobile/apps/locker/build/app/outputs/mapping/playstoreRelease/mapping.txt
+ build-ios:
+ needs: build-metadata
+ if: needs.build-metadata.outputs.should_build == 'true'
+ runs-on: macos-26
+ environment:
+ name: production
+ env:
+ BUILD_NUMBER: ${{ needs.build-metadata.outputs.build_number }}
+ RELEASE_VERSION: ${{ needs.build-metadata.outputs.release_version }}
+
+ defaults:
+ run:
+ working-directory: mobile/apps/locker
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+ with:
+ ref: ${{ needs.build-metadata.outputs.commit_sha }}
+
+ - name: Install Flutter ${{ env.FLUTTER_VERSION }}
+ uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
+ with:
+ channel: "stable"
+ flutter-version: ${{ env.FLUTTER_VERSION }}
+ cache: true
+
+ - name: Generate strings localizations
+ run: flutter gen-l10n
+ working-directory: mobile/packages/strings
+
+ - name: Set build version
+ run: node ../../../.github/scripts/flutter-version.mjs locker set-build "${RELEASE_VERSION}" "${BUILD_NUMBER}"
+
+ - name: Resolve dependencies with lockfile enforcement
+ run: flutter pub get --enforce-lockfile
+
+ - run: cargo codegen frb
+ working-directory: rust
+
+ - name: Install iOS pods
+ run: pod install --deployment
+ working-directory: mobile/apps/locker/ios
+
+ - name: Import Apple Distribution certificate
+ uses: Apple-Actions/import-codesign-certs@5142e029c445c10ffc7149d172e540235a065466 # v7.0.0
+ with:
+ p12-file-base64: ${{ secrets.APPLE_DISTRIBUTION_CERT_BASE64 }}
+ p12-password: ${{ secrets.APPLE_DISTRIBUTION_CERT_PASSWORD }}
+
+ - name: Archive and upload Locker to TestFlight
+ env:
+ ASC_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
+ ASC_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
+ ASC_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
+ run: |
+ key_path="${RUNNER_TEMP}/AuthKey_${ASC_KEY_ID}.p8"
+ printf '%s' "${ASC_API_KEY_BASE64}" | base64 --decode > "${key_path}"
+
+ xcodebuild archive \
+ -workspace ios/Runner.xcworkspace \
+ -scheme Runner \
+ -configuration Release \
+ -destination 'generic/platform=iOS' \
+ -archivePath build/ios/archive/Runner.xcarchive \
+ -allowProvisioningUpdates \
+ -authenticationKeyPath "${key_path}" \
+ -authenticationKeyID "${ASC_KEY_ID}" \
+ -authenticationKeyIssuerID "${ASC_ISSUER_ID}" \
+ CODE_SIGN_STYLE=Manual \
+ CODE_SIGN_IDENTITY="Apple Distribution" \
+ DEVELOPMENT_TEAM="${APPLE_TEAM_ID}" \
+ APP_STORE_PROFILE_SPECIFIER="Locker App Store" \
+ SHARE_EXTENSION_APP_STORE_PROFILE_SPECIFIER="Locker Share Extension App Store" \
+ MARKETING_VERSION="${RELEASE_VERSION}" \
+ CURRENT_PROJECT_VERSION="${BUILD_NUMBER}"
+
+ xcodebuild -exportArchive \
+ -archivePath build/ios/archive/Runner.xcarchive \
+ -exportPath build/ios/export \
+ -exportOptionsPlist scripts/ExportOptions-AppStore-CI.plist \
+ -allowProvisioningUpdates \
+ -authenticationKeyPath "${key_path}" \
+ -authenticationKeyID "${ASC_KEY_ID}" \
+ -authenticationKeyIssuerID "${ASC_ISSUER_ID}"
+
finish-build:
- needs: [build-metadata, build-android]
+ needs: [build-metadata, build-android, build-ios]
if: needs.build-metadata.outputs.should_build == 'true'
runs-on: ubuntu-latest
@@ -243,7 +329,7 @@ jobs:
RELEASE_TAG: ${{ needs.build-metadata.outputs.release_tag }}
run: |
release_url="$(gh release view "${RELEASE_TAG}" --json url --jq .url)"
- download_line="-# Download: [Play Store](https://play.google.com/store/apps/details?id=io.ente.locker) | [GitHub Release](${release_url})"
+ download_line="-# Download: [Play Store](https://play.google.com/store/apps/details?id=io.ente.locker) | [TestFlight](https://appstoreconnect.apple.com/apps/6747611956/testflight/ios) | [GitHub Release](${release_url})"
release_body_discord="$(awk '
/^Previous changes:$/ { previous = 1 }
previous && NF { print "-# " $0; next }
diff --git a/mobile/apps/locker/ios/Runner.xcodeproj/project.pbxproj b/mobile/apps/locker/ios/Runner.xcodeproj/project.pbxproj
index 9d490e59a8..72a4909597 100644
--- a/mobile/apps/locker/ios/Runner.xcodeproj/project.pbxproj
+++ b/mobile/apps/locker/ios/Runner.xcodeproj/project.pbxproj
@@ -711,6 +711,7 @@
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "io.ente.locker.Share-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "$(SHARE_EXTENSION_APP_STORE_PROFILE_SPECIFIER)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_ENABLE_EXPLICIT_MODULES = NO;
@@ -967,6 +968,7 @@
NEW_SETTING = "";
PRODUCT_BUNDLE_IDENTIFIER = io.ente.locker;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "$(APP_STORE_PROFILE_SPECIFIER)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
diff --git a/mobile/apps/locker/scripts/ExportOptions-AppStore-CI.plist b/mobile/apps/locker/scripts/ExportOptions-AppStore-CI.plist
new file mode 100644
index 0000000000..1068e5eabf
--- /dev/null
+++ b/mobile/apps/locker/scripts/ExportOptions-AppStore-CI.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-connect</string>
+ <key>signingStyle</key>
+ <string>manual</string>
+ <key>teamID</key>
+ <string>6Z68YJY9Q2</string>
+ <key>destination</key>
+ <string>upload</string>
+ <key>manageAppVersionAndBuildNumber</key>
+ <false/>
+ <key>signingCertificate</key>
+ <string>Apple Distribution</string>
+ <key>provisioningProfiles</key>
+ <dict>
+ <key>io.ente.locker</key>
+ <string>Locker App Store</string>
+ <key>io.ente.locker.Share-Extension</key>
+ <string>Locker Share Extension App Store</string>
+ </dict>
+</dict>
+</plist>