Repository navigation
[eas-cli] Name the managed iOS target with the project's config-plugins - #4802
Open
LizunovSergey wants to merge 2 commits into
Open
LizunovSergey wants to merge 2 commits into
LizunovSergey wants to merge 2 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Subscribed to pull request
Generated by CodeMention Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead. |
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.
Why
Fixes #4715 and #4832 (#4798 is the same report as #4715; #4832 is a Cyrillic name that fails on the scheme in "Run fastlane"). Since SDK 58, an iOS build of a managed project whose
namehas an accented letter fails in "Configure Xcode project" withCould not find target 'FottoFotgrafos' in project.pbxproj.eas-cli names the managed scheme and target with
IOSConfig.XcodeUtils.sanitizedName(exp.name)from its bundled@expo/config-plugins55.0.7. Prebuild names the target with the project's own copy, and expo/expo#49143 changed the sanitizer in 58.0.x: a letter now keeps its base form (ó→o) instead of being dropped. So the CLI assigns the provisioning profile to a target that prebuild never created.Bumping the bundled copy does not fix it: SDK 57 and older projects still prebuild with the old sanitizer and would break the other way.
How
sanitizedNameForProject(projectDir, name)insrc/project/ios/sanitizedName.ts. It resolvesexpo/config-pluginsfrom the project, the entry point app configs import, and uses thatsanitizedName. Whenexpois not installed, it falls back to the bundled copy, which is the current behaviour.resolveXcodeBuildContextAsync(the managed scheme name) and the managedtargetNameassertion ingetBundleIdentifierAsyncboth use it. They must change together: with only the scheme fixed, the assertion rejects the new target name.importMetroConfigFromProjectinmetroConfig.ts. Under pnpm it still resolves, becauseexpois a direct dependency of the project.Test plan
yarn jest src/project/ios: 7 suites, 37 tests pass. New:sanitizedName-test.ts, and one managed case each inscheme-test.tsandbundleIdentifier-test.ts. With only the two call sites reverted tomain, both call-site tests fail (Received: "FottoFotgrafos", andtargetName cannot be set to an arbitrary value for managed projects.).yarn typecheck,yarn lint,yarn fmt:checkandvalidate-changesetspass.node_modules/expoholds the realpackage.jsonandconfig-plugins.jsof that SDK, backed by@expo/config-plugins58.0.9 and 55.0.7. On SDK 58,expo/config-pluginsresolves through the./*entry of theexportsmap. The builtsanitizedNameForProject, compared with what prebuild uses, for the names from the issue thread:namemainFottoFotografosFottoFotgrafos✗FottoFotografosAssigameAssigam✗AssigameDemoMiseenStoreDmoMiseenStore✗DemoMiseenStoreAmbitoDolarmbitoDlar✗AmbitoDolarStrasseStrae✗StrasseMyAppMyAppMyAppFottoFotgrafosFottoFotgrafosFottoFotgrafosmbitoDlarmbitoDlarmbitoDlarNot verified: a real EAS build, including one started from EAS Workflows, where the reporter hit it.