[Bug]: Dynamically resolve target name in cap run ios
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- ios, typescript
Direção de pesquisa
Comece em cli/src/ios/run.ts, na lógica vinculada ao caminho do bundle, e depois inspecione como xcodebuild -scheme -showBuildSettings expõe TARGET_NAME. Use o projeto de reprodução vinculado para verificar se o deployment resolve o caminho .app do target quando os nomes do scheme e do target são diferentes.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 7.2.0
@capacitor/core: 7.2.0
@capacitor/android: 7.2.0
@capacitor/ios: 7.2.0
Installed Dependencies:
@capacitor/cli: 7.2.0
@capacitor/core: 7.2.0
@capacitor/android: 7.2.0
@capacitor/ios: 7.2.0
Other API Details
not relevant
Platforms Affected
- iOS
- Android
- Web
Current Behavior
When running a Capacitor iOS application which has multiple schemes with cap run ios --scheme Dev --configuration Dev the deployment fails with
Deploying Dev.app to 00008101-001525992141001E - failed!
[error] ERR_UNKNOWN: Path
'<project_dir>/ios/DerivedData/<id>/Build/Products/Dev-iphoneos/Dev.app'
not found
as the runIOS function assumes that the .app name matches the scheme name (i.e., ${runScheme}.app). See: ios/run.ts#L59
However, by default this is not always correct, as the .app name is determined by the target name, not the scheme name. This can cause deployment to fail because the .app bundle is not found at the expected path, when the scheme and target names differ.
Expected Behavior
The Capacitor CLI should dynamically query the actual TARGET_NAME associated with the selected scheme using xcodebuild -showBuildSettings, ensuring the correct .app name is used during deployment. This would make runIOS more robust and compatible with a broader range of Xcode project configurations.
Project Reproduction
IsAvaible/cap-run-dynamic-target-name-reproduction
Additional Information
This can be fixed by adding a helper function that invokes:
xcodebuild -scheme <scheme> -showBuildSettings
...and extracts the TARGET_NAME from the output. This resolved name should then be used in place of ${runScheme} when determining the final app bundle path.
This enhancement would:
- Improve compatibility with multi-target/-scheme projects
- Prevent .app not found errors
- Align behavior with actual Xcode project structure
Let me know if you'd like a PR for this :).
- Linguagem predominante
- TypeScript
- Estrelas
- 17.1k
- Forks
- 1.3k
- Merge médio
- 1d 22h
- PRs com merge (30d)
- 26
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de ionic-team/capacitor
-
triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
ionic-team/capacitor#8759 ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: Plugin call after navigation can be answered before reply proxy is updatedTalvez já em andamento @MateStrysewske assumiu há 71 dias. Abertatriage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
ionic-team/capacitor#8616 ·
Mantenedores costumam responder em até 1 dia
-
help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
ionic-team/capacitor#8574 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
SystemBars: safe area CSS injection throws "Cannot read properties of null" on startup (Android 16)Talvez já em andamento @kttalley assumiu há 62 dias. Abertatriage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ionic-team/capacitor#8530 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
fix(android): remove unchecked Java compilation warningsTalvez já em andamento @Ajamuar assumiu há 15 dias. Abertatriage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ionic-team/capacitor#8529 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de ionic-team/capacitor
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
prio:low scope:world
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
OliverRomhagen/vrigstad-joyride#849 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
genfeedai/genfeed.ai#11916 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
erkamyaman/rust-anything#1153 ·
Mantenedores costumam responder em até 1 dia
-
The Phase 5 report says 0.3.0 waits for the live checkTalvez já em andamento @fzn0x assumiu hoje. Abertadocumentation
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia