Make default scheme shared so generated projects ship with one#69
Merged
Conversation
Move NativeAppTemplate.xcscheme from xcuserdata/<user>/xcschemes/ to xcshareddata/xcschemes/. xcuserdata is gitignored (correctly — it holds per-developer Xcode state) which means anyone cloning fresh opens the project without a scheme until Xcode auto-creates a default one. The auto-default omits the run-time environment variable injection (NATIVEAPPTEMPLATE_API_DOMAIN etc.) the substrate relies on, so the app falls back to api.nativeapptemplate.com and dev workflows break silently. Shared schemes are conventional for any project meant to be cloned by others — no per-user state in the file, just the build/run/test configuration. Promoting the default scheme costs nothing and makes the substrate work out-of-the-box for fresh clones, including the nativeapptemplate-agent code generator's ./out/<slug>/ios/ outputs (the agent's iOS worker copies the substrate but skips xcuserdata; it does NOT skip xcshareddata, so the moved scheme rides along). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move
NativeAppTemplate.xcschemefromxcuserdata/<user>.xcuserdatad/xcschemes/toxcshareddata/xcschemes/.xcuserdata/is gitignored (correctly — it holds per-developer Xcode state), which means anyone cloning fresh opens the project without a scheme until Xcode auto-creates a default one. The auto-default omits the run-time environment-variable injection (NATIVEAPPTEMPLATE_API_DOMAIN,NATIVEAPPTEMPLATE_API_PORT,NATIVEAPPTEMPLATE_API_SCHEME) the substrate relies on, so the app silently falls back toapi.nativeapptemplate.comand any local-dev workflow breaks.Shared schemes are the conventional Xcode pattern for any project meant to be cloned by others — no per-user state in the file, just the build/run/test configuration plus the env-var injection block. Promoting the default scheme to shared makes the substrate work out-of-the-box for:
nativeapptemplate-agentcode generator's./out/<slug>/ios/outputs (the agent's iOS worker copies the substrate but skipsxcuserdata; it does not skipxcshareddata, so the moved scheme rides along)Companion PRs
NativeAppTemplate-iOS(paid) — same movenativeapptemplate-agent#64— agent-side env-bridge that mirrorsNATIVEAPPTEMPLATE_API_*to the renamed<PRODUCT>_API_*at run time, so the agent's automated validation runs work even before users open the generated project in XcodeTest plan
xcodebuild -scheme NativeAppTemplate -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.2' buildsucceeds (CI covers this)🤖 Generated with Claude Code