feat(ios): add fastlane setup

This commit is contained in:
Peter Steinberger
2025-12-14 02:10:31 +00:00
parent 64b5eb8279
commit a1d16c61ec
6 changed files with 114 additions and 0 deletions

7
.gitignore vendored
View File

@@ -15,3 +15,10 @@ Core/
apps/ios/*.xcodeproj/
apps/ios/*.xcworkspace/
apps/ios/.swiftpm/
# fastlane (iOS)
apps/ios/fastlane/report.xml
apps/ios/fastlane/Preview.html
apps/ios/fastlane/screenshots/
apps/ios/fastlane/test_output/
apps/ios/fastlane/logs/

View File

@@ -16,3 +16,13 @@ open Clawdis.xcodeproj
## Shared packages
- `../shared/ClawdisKit` — shared types/constants used by iOS (and later macOS bridge + gateway routing).
## fastlane
```bash
brew install fastlane
cd apps/ios
fastlane lanes
```
See `apps/ios/fastlane/README.md` for App Store Connect auth + upload lanes.

View File

@@ -0,0 +1,13 @@
# App Store Connect API key (pick one approach)
#
# Recommended:
# APP_STORE_CONNECT_API_KEY_PATH=/absolute/path/to/AuthKey_XXXXXX.json
#
# Or:
# ASC_KEY_ID=XXXXXXXXXX
# ASC_ISSUER_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# ASC_KEY_CONTENT=BASE64_P8_CONTENT
# Deliver toggles (off by default)
# DELIVER_METADATA=1
# DELIVER_SCREENSHOTS=1

View File

@@ -0,0 +1,7 @@
app_identifier("com.steipete.clawdis.ios")
# Auth is expected via App Store Connect API key.
# Provide either:
# - APP_STORE_CONNECT_API_KEY_PATH=/path/to/AuthKey_XXXXXX.p8.json (recommended)
# or:
# - ASC_KEY_ID, ASC_ISSUER_ID, and ASC_KEY_CONTENT (base64 or raw p8 content)

View File

@@ -0,0 +1,54 @@
default_platform(:ios)
platform :ios do
private_lane :asc_api_key do
key_path = ENV["APP_STORE_CONNECT_API_KEY_PATH"]
if key_path && !key_path.strip.empty?
return app_store_connect_api_key(path: key_path)
end
key_id = ENV["ASC_KEY_ID"]
issuer_id = ENV["ASC_ISSUER_ID"]
key_content = ENV["ASC_KEY_CONTENT"]
UI.user_error!("Missing App Store Connect API key. Set APP_STORE_CONNECT_API_KEY_PATH or ASC_KEY_ID/ASC_ISSUER_ID/ASC_KEY_CONTENT.") if [key_id, issuer_id, key_content].any? { |v| v.nil? || v.strip.empty? }
is_base64 = key_content.include?("BEGIN PRIVATE KEY") ? false : true
app_store_connect_api_key(
key_id: key_id,
issuer_id: issuer_id,
key_content: key_content,
is_key_content_base64: is_base64
)
end
desc "Build + upload to TestFlight"
lane :beta do
api_key = asc_api_key
build_app(
project: "Clawdis.xcodeproj",
scheme: "Clawdis",
export_method: "app-store",
clean: true
)
upload_to_testflight(
api_key: api_key,
skip_waiting_for_build_processing: true
)
end
desc "Upload App Store metadata (and optionally screenshots)"
lane :metadata do
api_key = asc_api_key
deliver(
api_key: api_key,
force: true,
skip_screenshots: ENV["DELIVER_SCREENSHOTS"] != "1",
skip_metadata: ENV["DELIVER_METADATA"] != "1"
)
end
end

View File

@@ -0,0 +1,23 @@
# fastlane (Clawdis iOS)
Install fastlane (recommended via Homebrew):
```bash
brew install fastlane
```
Configure App Store Connect auth:
- Recommended: set `APP_STORE_CONNECT_API_KEY_PATH` to a JSON key file path.
- Alternative: set `ASC_KEY_ID`, `ASC_ISSUER_ID`, `ASC_KEY_CONTENT` (base64 p8).
Common lanes:
```bash
cd apps/ios
fastlane beta
# Upload metadata/screenshots only when explicitly enabled:
DELIVER_METADATA=1 fastlane metadata
DELIVER_METADATA=1 DELIVER_SCREENSHOTS=1 fastlane metadata
```