Summary
packages/build-tools/src/steps/functions/generateGymfileFromTemplate.ts's DEFAULT_CREDENTIALS_TEMPLATE populates the Gymfile's export_options method: field from EXPORT_METHOD, which is set here:
...(credentials
? {
KEYCHAIN_PATH: credentials.keychainPath,
EXPORT_METHOD: credentials.distributionType,
}
: {}),
For an internal-distribution / ad-hoc build, credentials.distributionType stringifies to "ad-hoc". As of Xcode 15.4, Apple's own IDEDistribution tool deprecated that command-line name in favor of "release-testing" (see fastlane/fastlane#22028, which quotes the exact Xcode message: "Command line name 'ad-hoc' is deprecated. Use 'release-testing' instead."). Xcode 26+ now hard-rejects the old value at export time:
exportArchive exportOptionsPlist error for key "method" expected one {} but found ad-hoc
Reproduction
- SDK 56 project (
expo@~56.0.14), iOS build with credentialsSource: "remote", distribution: "internal".
- Confirmed via elimination across multiple builds, ruling out every other variable first:
- Verified this is not downstream of anything else: signing (
DEVELOPMENT_TEAM), entitlements/capabilities, and CFBundleShortVersionString version-matching were all independently broken and fixed first, on our own extension targets (Watch app + two extensions) — none of that affected this error.
- Verified this is not image-recency-dependent: reproduced identically on both
macos-tahoe-26.4-xcode-26.4 (the SDK-56-aliased default) and macos-tahoe-26.5-xcode-26.6 (latest), with fastlane/gym at 2.236.1 on the latter — the newest available combination at the time of testing.
- Archive itself succeeds cleanly (all targets compile, sign, and version-match); only the export step fails, and only on this one value.
Expected
EXPORT_METHOD (and therefore the generated Gymfile's method: value) should resolve to "release-testing" for an ad-hoc/internal-distribution build under Xcode 15.4+, matching Apple's own renamed value, instead of the legacy "ad-hoc" string.
Workaround in use
Supplying a custom template input to generate_gymfile_from_template (via a custom build config), byte-identical to DEFAULT_CREDENTIALS_TEMPLATE except the method: line hardcoded to "release-testing". Happy to remove this workaround once a fix ships — flagging so it can be prioritized and so others hitting the same SDK56 + Xcode 26 combination can find it.
Summary
packages/build-tools/src/steps/functions/generateGymfileFromTemplate.ts'sDEFAULT_CREDENTIALS_TEMPLATEpopulates the Gymfile'sexport_optionsmethod:field fromEXPORT_METHOD, which is set here:For an internal-distribution / ad-hoc build,
credentials.distributionTypestringifies to"ad-hoc". As of Xcode 15.4, Apple's ownIDEDistributiontool deprecated that command-line name in favor of"release-testing"(see fastlane/fastlane#22028, which quotes the exact Xcode message: "Command line name 'ad-hoc' is deprecated. Use 'release-testing' instead."). Xcode 26+ now hard-rejects the old value at export time:Reproduction
expo@~56.0.14), iOS build withcredentialsSource: "remote",distribution: "internal".DEVELOPMENT_TEAM), entitlements/capabilities, andCFBundleShortVersionStringversion-matching were all independently broken and fixed first, on our own extension targets (Watch app + two extensions) — none of that affected this error.macos-tahoe-26.4-xcode-26.4(the SDK-56-aliased default) andmacos-tahoe-26.5-xcode-26.6(latest), withfastlane/gymat2.236.1on the latter — the newest available combination at the time of testing.Expected
EXPORT_METHOD(and therefore the generated Gymfile'smethod:value) should resolve to"release-testing"for an ad-hoc/internal-distribution build under Xcode 15.4+, matching Apple's own renamed value, instead of the legacy"ad-hoc"string.Workaround in use
Supplying a custom
templateinput togenerate_gymfile_from_template(via a custom build config), byte-identical toDEFAULT_CREDENTIALS_TEMPLATEexcept themethod:line hardcoded to"release-testing". Happy to remove this workaround once a fix ships — flagging so it can be prioritized and so others hitting the same SDK56 + Xcode 26 combination can find it.