Compare commits

...

1 Commits

Author SHA1 Message Date
Zeyi (Rice) Fan 5798888dd7 ios: setup fastlane 2026-06-22 17:03:08 -07:00
12 changed files with 461 additions and 0 deletions
+11
View File
@@ -9,3 +9,14 @@ package-lock.json
# Generated Apple Icon Composer bundles (machine-formatted; prettier fights the tooling)
**/*.icon/**
# iOS build/tooling artifacts. These are git-ignored via ios/.gitignore, but
# Prettier doesn't read nested .gitignore files, so they're listed here too:
# the local Bundler gem install, build output, and fastlane-generated files
# (README.md regenerates on every run; see ios/RELEASE.md for the real docs).
ios/vendor/
ios/build/
ios/fastlane/README.md
ios/fastlane/report.xml
ios/fastlane/Preview.html
ios/fastlane/test_output/
+23
View File
@@ -0,0 +1,23 @@
# Xcode per-user state (window layout, open files, scheme selection, etc.)
xcuserdata/
# Build artifacts
build/
*.ipa
*.dSYM.zip
# Bundler (local gem install)
.bundle/
vendor/
# Signing secrets — never commit
fastlane/AuthKey_*.p8
fastlane/.env
# fastlane run output
fastlane/report.xml
fastlane/Preview.html
fastlane/test_output/
# Auto-generated lane docs (regenerated on every fastlane run; see RELEASE.md)
fastlane/README.md
+3
View File
@@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "fastlane"
+231
View File
@@ -0,0 +1,231 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.9)
abbrev (0.1.2)
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.2)
aws-partitions (1.1109.0)
aws-sdk-core (3.224.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.101.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.188.0)
aws-sdk-core (~> 3, >= 3.224.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.11.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
csv (3.3.5)
declarative (0.0.20)
digest-crc (0.7.0)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.109.0)
faraday (1.10.5)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.8)
faraday (>= 0.8.0)
http-cookie (>= 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.1)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.2.0)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.4)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.4.1)
fastlane (2.230.0)
CFPropertyList (>= 2.3, < 4.0.0)
abbrev (~> 0.1.2)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
base64 (~> 0.2.0)
bundler (>= 1.12.0, < 3.0.0)
colored (~> 1.2)
commander (~> 4.6)
csv (~> 3.3)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
logger (>= 1.6, < 2.0)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
mutex_m (~> 0.3.0)
naturally (~> 2.2)
nkf (~> 0.2.0)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.1.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.3)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.29.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.45.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.29.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.8)
domain_name (~> 0.5)
httpclient (2.9.0)
mutex_m
jmespath (1.6.2)
json (2.7.6)
jwt (2.10.3)
base64
logger (1.7.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.1)
mutex_m (0.3.0)
nanaimo (0.4.0)
naturally (2.3.0)
nkf (0.2.0)
optparse (0.8.1)
os (1.1.4)
plist (3.7.2)
public_suffix (5.1.1)
rake (13.4.2)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.8.0)
rexml (3.4.4)
rouge (3.28.0)
ruby2_keywords (0.0.5)
rubyzip (2.4.1)
security (0.1.5)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.2.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.4.1)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
ruby
DEPENDENCIES
fastlane
BUNDLED WITH
1.17.2
@@ -401,6 +401,7 @@
DEVELOPMENT_TEAM = 8RMX4WU6F8;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = "Omnigent/Info-Debug.plist";
VERSIONING_SYSTEM = "apple-generic";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@@ -430,6 +431,7 @@
DEVELOPMENT_TEAM = 8RMX4WU6F8;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = "Omnigent/Info-Release.plist";
VERSIONING_SYSTEM = "apple-generic";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
+15
View File
@@ -20,6 +20,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
@@ -33,5 +35,18 @@
<true/>
<key>UILaunchScreen</key>
<dict/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
+15
View File
@@ -20,6 +20,8 @@
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMicrophoneUsageDescription</key>
@@ -28,5 +30,18 @@
<true/>
<key>UILaunchScreen</key>
<dict/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
+67
View File
@@ -0,0 +1,67 @@
# Releasing Omnigent iOS
Releases are built locally with [fastlane](https://fastlane.tools). The `beta`
lane archives a signed Release build and uploads it to TestFlight; the `release`
lane uploads to App Store Connect (binary only — review submission is a
follow-up).
## One-time setup
1. **Xcode 16+** with the command-line tools selected
(`xcode-select -p` should point at your Xcode).
2. **Install fastlane** (pinned via `Gemfile`):
```sh
cd ap-web/ios
bundle install
```
3. **Create the app record** in [App Store Connect](https://appstoreconnect.apple.com)
for bundle ID `ai.omnigent.ios` (My Apps → +), if it doesn't exist yet.
4. **Generate an App Store Connect API key**: Users and Access → Integrations →
App Store Connect API → generate a key with the **App Manager** role.
Download the `.p8` (you can only download it once) and place it in
`ios/fastlane/` — it is git-ignored.
5. **Configure env vars**:
```sh
cp fastlane/.env.example fastlane/.env
# edit fastlane/.env: set ASC_KEY_ID, ASC_ISSUER_ID, ASC_KEY_PATH
```
`.env` is git-ignored and is loaded automatically by fastlane.
## Cutting a TestFlight build
```sh
cd ap-web/ios
bundle exec fastlane beta
```
This bumps the build number to one past the latest on TestFlight, archives the
Release configuration (HTTPS-only, automatic signing under team `8RMX4WU6F8`),
and uploads the `.ipa`. The build appears in App Store Connect → TestFlight after
Apple finishes processing.
## Versioning
- **Build number** (`CFBundleVersion = $(CURRENT_PROJECT_VERSION)`) is computed
per upload as `latest_testflight_build_number + 1` and injected at archive time
via an xcodebuild `CURRENT_PROJECT_VERSION=…` override. Nothing in the repo is
modified, so every `beta`/`release` upload gets a unique, monotonic build
number with no version churn in git. Don't bump it by hand.
- **Marketing version** (`CFBundleShortVersionString`, currently `0.1.0`) is set
manually. Bump `MARKETING_VERSION` for both the Debug and Release
configurations of the **Omnigent** target in Xcode (or via `fastlane
increment_version_number`) when shipping a new user-facing version.
## App Store submission (later)
```sh
bundle exec fastlane release
```
Uploads the binary without submitting for review. App Store metadata and
screenshots are not yet wired up — add them under `fastlane/metadata` and enable
submission in the `release` lane when ready.
## Other commands
- `bundle exec fastlane tests` — run the `OmnigentTests` unit suite.
- `bundle exec fastlane lanes` — list available lanes.
+11
View File
@@ -0,0 +1,11 @@
# Copy to fastlane/.env and fill in. Never commit the real values or the .p8.
# Generate an App Store Connect API key under Users and Access > Integrations >
# App Store Connect API (role: App Manager). Download the .p8 once and place it
# in ios/fastlane/.
ASC_KEY_ID=XXXXXXXXXX
ASC_ISSUER_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ASC_KEY_PATH=./fastlane/AuthKey_XXXXXXXXXX.p8
# Only if the Apple ID belongs to more than one App Store Connect team.
# ASC_TEAM_ID=xxxxxxxx
+9
View File
@@ -0,0 +1,9 @@
app_identifier("ai.omnigent.ios") # The bundle identifier of the app
team_id("8RMX4WU6F8") # Apple Developer Portal team (Databricks, Inc.)
# App Store Connect team — only needed if the Apple ID belongs to multiple teams.
itc_team_id(ENV["ASC_TEAM_ID"]) if ENV["ASC_TEAM_ID"]
# Optional: only used for password-based auth. The App Store Connect API key
# (see .env) is the primary auth path and does not require this.
apple_dev_portal_id(ENV["APPLE_ID"]) if ENV["APPLE_ID"]
+74
View File
@@ -0,0 +1,74 @@
default_platform(:ios)
# Builds are signed with the team's distribution cert via Xcode automatic
# signing (-allowProvisioningUpdates). Upload + provisioning use an App Store
# Connect API key supplied through env vars — see fastlane/.env.example.
platform :ios do
desc "Run the OmnigentTests unit tests"
lane :tests do
run_tests(scheme: "Omnigent")
end
desc "Build a signed Release .ipa and upload it to TestFlight"
lane :beta do
load_asc_api_key
build(build_number: next_build_number)
upload_to_testflight(skip_waiting_for_build_processing: true)
end
desc "Build a signed Release .ipa and upload it to App Store Connect (no submission)"
lane :release do
# NB: this uploads a fresh, uniquely-numbered binary. The more common App
# Store flow is to *promote* an already-tested TestFlight build instead of
# uploading a new one — if you adopt that, replace the build/upload below
# with a submission of the chosen TestFlight build. App Store metadata and
# screenshots are still a follow-up; this lane uploads but does not submit.
load_asc_api_key
build(build_number: next_build_number)
upload_to_app_store(
submit_for_review: false,
skip_metadata: true,
skip_screenshots: true,
precheck_include_in_app_purchases: false
)
end
# --- helpers ---
desc "Archive the Release configuration into ./build"
private_lane :build do |options|
# Inject the build number as an xcodebuild setting override rather than
# mutating tracked files. CFBundleVersion is $(CURRENT_PROJECT_VERSION) in
# the Info.plists, so overriding CURRENT_PROJECT_VERSION here flows into the
# archived binary — and nothing in the repo changes (no agvtool, no churn).
xcargs = ["-allowProvisioningUpdates"]
xcargs << "CURRENT_PROJECT_VERSION=#{options[:build_number]}" if options[:build_number]
build_app(
scheme: "Omnigent",
configuration: "Release",
export_method: "app-store",
xcargs: xcargs.join(" "),
output_directory: "./build",
clean: true
)
end
desc "Next build number: one past the highest already on App Store Connect"
private_lane :next_build_number do
# TestFlight sees every build (App Store builds pass through it too), so the
# latest TestFlight build number is a monotonic counter for the whole app.
# Requires the ASC API key to be loaded first.
latest_testflight_build_number(initial_build_number: 0) + 1
end
desc "Load the App Store Connect API key from env vars into the session"
private_lane :load_asc_api_key do
app_store_connect_api_key(
key_id: ENV.fetch("ASC_KEY_ID"),
issuer_id: ENV.fetch("ASC_ISSUER_ID"),
key_filepath: ENV.fetch("ASC_KEY_PATH"),
in_house: false
)
end
end