Skip to content

feat(ios): prepare for TestFlight / App Store distribution - #59

Open
tabilzad wants to merge 1 commit into
developfrom
feat/ios-testflight-distribution
Open

feat(ios): prepare for TestFlight / App Store distribution#59
tabilzad wants to merge 1 commit into
developfrom
feat/ios-testflight-distribution

Conversation

@tabilzad

@tabilzad tabilzad commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator

What

Makes the iOS app ready for TestFlight and App Store submission. All changes are code-complete and require no manual decision to merge — except the three items listed below under Your decisions.


Changes

iosApp/iosApp/Info.plistITSAppUsesNonExemptEncryption = false

Required for every App Store / TestFlight upload. Without this key Apple holds the binary and asks for clarification before it appears in TestFlight. The value is false because the app uses only standard HTTPS (Ktor + NSURLSession/Darwin engine), which qualifies as exempt encryption under U.S. Export Administration Regulations (EAR §740.17(b)(3)(i) — standard security protocols). No annual self-classification report is required.

iosApp/iosApp.xcodeproj/project.pbxproj — Release CODE_SIGN_IDENTITY"Apple Distribution"

"Apple Development" certificates are issued for development-device trust only — they cannot produce a binary accepted by App Store Connect. The Release configuration now correctly targets "Apple Distribution" (the modern umbrella identity that covers both the old "iPhone Distribution" and the newer App Store certificate type). Debug builds keep "Apple Development" unchanged for day-to-day device testing.

iosApp/ExportOptions.plist — distribution export config template

xcodebuild -exportArchive requires an options plist. This provides a ready-to-use file targeting app-store / upload. Inline comments document how to switch to ad-hoc (registered-device distribution without TestFlight) or enterprise. DEVELOPMENT_TEAM is intentionally omitted — each maintainer passes their own Team ID at build time so no personal/org ID is ever committed.

.github/workflows/ci.yml — Release compile coverage

Adds two steps to the existing ios CI job:

  1. linkReleaseFrameworkIosArm64 — ensures the Release KMP framework compiles (different Kotlin/Native optimisation tier from Debug)
  2. xcodebuild -configuration Release -sdk iphoneos CODE_SIGNING_ALLOWED=NO — compile-checks the Xcode project under the same code path that a real distribution build would use, catching Release-only errors before they surface in a submission attempt

iosApp/README.md — TestFlight / App Store Distribution section

Documents:

  • Prerequisites (Apple Developer Program membership, App Store Connect app record, Apple Distribution cert + provisioning profile)
  • Full archive + export CLI workflow
  • Version bumping strategy (the four places that must stay in sync)
  • Encryption declaration rationale (why ITSAppUsesNonExemptEncryption = false is correct and sufficient)

Decisions (required before first TestFlight upload — not needed to merge this PR)

# What Where Why
1 Create the App Store Connect app record appstoreconnect.apple.com → My Apps → + Bundle ID com.garfiec.librechat.ios must be registered before any build can be uploaded. Free with a paid Apple Developer Program membership.
2 Set DEVELOPMENT_TEAM when archiving Xcode → Signing & Capabilities, or DEVELOPMENT_TEAM=XXXXXXXXXX on the CLI Your 10-character Team ID cannot be committed — it would break every other contributor's build. Pass it at archive time as shown in the README.
3 CI signing automation (optional but recommended for scale) New PR — Fastlane Match + GitHub Actions secrets Automating signing in CI (certificate + provisioning profile stored as repo secrets via fastlane match) is a non-trivial separate PR. The current CI job verifies the build compiles clean; actual IPA export and upload require signing secrets that are outside the scope of this PR.

Testing

# Verify Debug still works (simulator)
./gradlew :shared:linkDebugFrameworkIosSimulatorArm64
xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp \
  -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' \
  -configuration Debug build CODE_SIGNING_ALLOWED=NO ARCHS=arm64

# Verify Release compiles clean (device, no signing)
./gradlew :shared:linkReleaseFrameworkIosArm64
xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp \
  -sdk iphoneos -destination 'generic/platform=iOS' \
  -configuration Release build CODE_SIGNING_ALLOWED=NO ARCHS=arm64

- Info.plist: add ITSAppUsesNonExemptEncryption = false
  Required for App Store / TestFlight submission. The app uses standard
  HTTPS (Ktor + NSURLSession) which is exempt under U.S. EAR. Without
  this key Apple holds the binary pending clarification.

- project.pbxproj: Release CODE_SIGN_IDENTITY → "Apple Distribution"
  "Apple Development" certificates cannot produce a distribution-signed
  binary. Release builds now correctly require an Apple Distribution
  certificate; Debug builds keep "Apple Development" for day-to-day
  device testing.

- iosApp/ExportOptions.plist: add distribution export config template
  Provides ready-to-use options for xcodebuild -exportArchive targeting
  app-store (TestFlight + App Store). Includes inline comments for
  ad-hoc / enterprise variants. DEVELOPMENT_TEAM is intentionally omitted
  — each maintainer supplies their own Team ID at build time.

- ci.yml: add Release framework build + Release device compile-check
  Extends the ios CI job to also compile :shared:linkReleaseFrameworkIosArm64
  and run xcodebuild in Release configuration against iphoneos SDK with
  CODE_SIGNING_ALLOWED=NO. This catches any Release-only compile errors
  (different optimisation flags, stripped symbols) before they reach an
  actual distribution attempt.

- iosApp/README.md: add TestFlight / App Store Distribution section
  Documents prerequisites, archive + export CLI workflow, version
  bumping strategy, and the encryption declaration rationale so
  maintainers and contributors have a clear path to submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Android debug APK

Artifact: librechat-android-debug-59
Download: librechat-android-debug-59.zip
Retention: 90 days
Commit: 4579f503ae80656d055af40131190cfded70cfb7

Download requires a GitHub login. Installs over previous debug builds without uninstalling (stable signing key).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant