Skip to content

[eas-cli] Name the managed iOS target with the project's config-plugins - #4802

Open
LizunovSergey wants to merge 2 commits into
expo:mainfrom
LizunovSergey:fix/project-sanitized-name
Open

LizunovSergey wants to merge 2 commits into
expo:mainfrom
LizunovSergey:fix/project-sanitized-name

Conversation

@LizunovSergey

@LizunovSergey LizunovSergey commented Nov 2, 2026 •

Copy link
Copy Markdown

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 name has an accented letter fails in "Configure Xcode project" with Could 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-plugins 55.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

  • New sanitizedNameForProject(projectDir, name) in src/project/ios/sanitizedName.ts. It resolves expo/config-plugins from the project, the entry point app configs import, and uses that sanitizedName. When expo is not installed, it falls back to the bundled copy, which is the current behaviour.
  • resolveXcodeBuildContextAsync (the managed scheme name) and the managed targetName assertion in getBundleIdentifierAsync both use it. They must change together: with only the scheme fixed, the assertion rejects the new target name.
  • Loading the module from the project follows importMetroConfigFromProject in metroConfig.ts. Under pnpm it still resolves, because expo is 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 in scheme-test.ts and bundleIdentifier-test.ts. With only the two call sites reverted to main, both call-site tests fail (Received: "FottoFotgrafos", and targetName cannot be set to an arbitrary value for managed projects.).
  • yarn typecheck, yarn lint, yarn fmt:check and validate-changesets pass.
  • Against the published packages: two projects whose node_modules/expo holds the real package.json and config-plugins.js of that SDK, backed by @expo/config-plugins 58.0.9 and 55.0.7. On SDK 58, expo/config-plugins resolves through the ./* entry of the exports map. The built sanitizedNameForProject, compared with what prebuild uses, for the names from the issue thread:
SDK name prebuild main this PR
58 Fotto Fotógrafos FottoFotografos FottoFotgrafos ✗ FottoFotografos
58 Assigamé Assigame Assigam ✗ Assigame
58 Démo Mise en Store DemoMiseenStore DmoMiseenStore ✗ DemoMiseenStore
58 Ámbito Dólar AmbitoDolar mbitoDlar ✗ AmbitoDolar
58 Straße Strasse Strae ✗ Strasse
58 My App MyApp MyApp MyApp
55 Fotto Fotógrafos FottoFotgrafos FottoFotgrafos FottoFotgrafos
55 Ámbito Dólar mbitoDlar mbitoDlar mbitoDlar

Not verified: a real EAS build, including one started from EAS Workflows, where the reporter hit it.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-02T20:53:02.917222Z
We couldn’t complete this review. Comment @codex review to try again.
0d865ea PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
packages/eas-cli/** @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

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.

iOS build fails with "Could not find target" for app names with accented characters on SDK 58 (bundled @expo/config-plugins sanitizes names differently)

1 participant