Fix an Xcode Scheme That Works Locally but Is Missing in CI
A scheme visible in one developer's Xcode may be user-local and absent from a clean CI checkout. Share it in the project and verify its archive action.
User schemes are not repository configuration
Xcode can store schemes in a user's data directory or in the project. A locally visible scheme may therefore not exist on a clean CI runner. In Xcode's scheme manager, enable the shared setting and confirm the .xcscheme file appears under the project's shared schemes directory.
List schemes from the same workspace that CI builds:
xcodebuild -list -workspace ios/Runner.xcworkspaceIf the scheme is missing, check whether the file is ignored, untracked, or saved under a different project. Commit the scheme and inspect its build, test, launch, and Archive actions.
Verify the archive configuration
A shared scheme can still archive the wrong target or use a configuration without release signing. Inspect the scheme file and target configuration, then run the exact archive command locally or in a controlled runner. Ensure the CI workflow's workspace path, scheme name, configuration, and destination all match.
Keep environment-specific values in configuration files or CI variables rather than a developer's user defaults. If a scheme references a local script or absolute path, replace it with a repository-relative or explicitly provisioned dependency.
Test from a clean checkout so ignored local scheme data cannot mask the problem. Archive success is a useful integration test, but verify the produced app's bundle ID, entitlements, and version as separate release assertions. A scheme is part of the build interface and deserves code review like any other project configuration.
Make archive selection reproducible
A scheme can exist locally without being shared in the repository. Confirm that the archive job can discover the same workspace, scheme, configuration, and destination from a clean checkout. Use xcodebuild -list in CI and fail with the available scheme list when the expected one is absent. Do not rely on an Xcode user's personal scheme data or a GUI selection that is not encoded in the command.
Inspect the scheme's Archive action, build configuration, test action, signing settings, and environment variables. A scheme may build Debug successfully while Archive selects a release configuration with a different bundle ID or entitlements. Keep configuration values in reviewed files or secret-manager references and log only non-sensitive identifiers.
After archiving, inspect the archive's app bundle and export result. Verify bundle ID, version, entitlements, signing team, and embedded provisioning profile. A successful xcodebuild archive proves that Xcode produced an archive; it does not prove that export, upload, processing, or installation will succeed. Separate these checks in the release pipeline.
Keep the scheme shared and review its Archive action, configuration, signing, and environment settings. A local scheme can mask a missing CI configuration, while a release scheme can select a different bundle ID than Debug. Run xcodebuild -list from a clean checkout and fail with the discovered schemes when the expected one is absent. Store export options as reviewed configuration and secrets only in the secret manager.
Make the archive command explicit about workspace, scheme, configuration, destination, and derived-data path. After export, inspect the IPA before upload and compare its identity with the release record. Avoid relying on GUI-only selections or user-local scheme data. A clean runner should list and select the exact scheme without a developer's home directory.
Make the archive command explicit about workspace, scheme, configuration, destination, and derived-data path. After export, inspect the IPA before upload and compare its identity with the release record. Keep scheme files shared and reviewed, and avoid relying on GUI-only selections or user-local scheme data. A clean runner should be able to list and select the exact scheme without a developer's home directory.
Verify bundle ID, version, entitlements, signing team, and embedded profile after export. A successful archive is only one stage. Keep the scheme change in code review and run a clean-checkout archive when the project file or target configuration changes.
Make the archive command explicit about workspace, scheme, configuration, destination, and derived-data path. After export, inspect the IPA before upload and compare its identity with the release record. This separates scheme discovery, archive creation, and export validation so a later failure has a clear owner.
Keep the scheme shared and review its Archive action, configuration, signing, and environment settings. A local scheme can mask a missing CI configuration, while a release scheme can select a different bundle ID than Debug. Run xcodebuild -list from a clean checkout and fail with the discovered schemes when the expected one is absent. Store export options as reviewed configuration and secrets only in the secret manager.