2026-01-30 03:15:10 +01:00
# fastlane setup (OpenClaw iOS)
2025-12-14 02:35:35 +00:00
Install:
```bash
brew install fastlane
```
Create an App Store Connect API key:
- App Store Connect → Users and Access → Keys → App Store Connect API → Generate API Key
- Download the `.p8` , note the **Issuer ID** and **Key ID**
2026-03-07 16:39:53 +02:00
Recommended (macOS): store the private key in Keychain and write non-secret vars:
```bash
scripts/ios-asc-keychain-setup.sh \
--key-path /absolute/path/to/AuthKey_XXXXXXXXXX.p8 \
--issuer-id YOUR_ISSUER_ID \
--write-env
```
This writes these auth variables in `apps/ios/fastlane/.env` :
```bash
ASC_KEY_ID=YOUR_KEY_ID
ASC_ISSUER_ID=YOUR_ISSUER_ID
ASC_KEYCHAIN_SERVICE=openclaw-asc-key
ASC_KEYCHAIN_ACCOUNT=YOUR_MAC_USERNAME
```
Optional app targeting variables (helpful if Fastlane cannot auto-resolve app by bundle):
```bash
2026-03-11 12:32:28 +02:00
ASC_APP_IDENTIFIER=ai.openclaw.client
2026-03-07 16:39:53 +02:00
# or
2026-03-11 12:32:28 +02:00
ASC_APP_ID=YOUR_APP_STORE_CONNECT_APP_ID
2026-03-07 16:39:53 +02:00
```
File-based fallback (CI/non-macOS):
2025-12-14 02:35:35 +00:00
```bash
ASC_KEY_ID=YOUR_KEY_ID
ASC_ISSUER_ID=YOUR_ISSUER_ID
ASC_KEY_PATH=/absolute/path/to/AuthKey_XXXXXXXXXX.p8
2026-03-07 16:39:53 +02:00
```
Code signing variable (optional in `.env` ):
2025-12-14 02:35:35 +00:00
2026-03-07 16:39:53 +02:00
```bash
2025-12-14 02:35:35 +00:00
IOS_DEVELOPMENT_TEAM=YOUR_TEAM_ID
```
2026-03-07 16:39:53 +02:00
Tip: run `scripts/ios-team-id.sh` from repo root to print a Team ID for `.env` . The helper prefers the canonical OpenClaw team (`Y5PE65HELJ` ) when present locally; otherwise it prefers the first non-personal team from your Xcode account (then personal team if needed). Fastlane uses this helper automatically if `IOS_DEVELOPMENT_TEAM` is missing.
Validate auth:
```bash
cd apps/ios
fastlane ios auth_check
```
2025-12-26 18:16:13 +01:00
2026-03-11 12:32:28 +02:00
ASC auth is only required when:
- uploading to TestFlight
- auto-resolving the next build number from App Store Connect
If you pass `--build-number` to `pnpm ios:beta:archive` , the local archive path does not need ASC auth.
Archive locally without upload:
```bash
pnpm ios:beta:archive
```
Upload to TestFlight:
```bash
pnpm ios:beta
```
Direct Fastlane entry point:
2025-12-14 02:35:35 +00:00
```bash
cd apps/ios
2026-03-11 12:32:28 +02:00
fastlane ios beta
2025-12-14 02:35:35 +00:00
```
2026-03-11 12:32:28 +02:00
Versioning rules:
- Root `package.json.version` is the single source of truth for iOS
- Use `YYYY.M.D` for stable versions and `YYYY.M.D-beta.N` for beta versions
- Fastlane stamps `CFBundleShortVersionString` to `YYYY.M.D`
- Fastlane resolves `CFBundleVersion` as the next integer TestFlight build number for that short version
- The beta flow regenerates `apps/ios/OpenClaw.xcodeproj` from `apps/ios/project.yml` before archiving
- Local beta signing uses a temporary generated xcconfig and leaves local development signing overrides untouched