[Bug]: Dynamically resolve target name in cap run ios
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- ios, typescript
Línea de trabajo
Comienza en cli/src/ios/run.ts, en la lógica vinculada a la ruta del bundle, y después inspecciona cómo xcodebuild -scheme -showBuildSettings expone TARGET_NAME. Usa el proyecto de reproducción vinculado para verificar que el despliegue resuelve la ruta .app del target cuando los nombres del scheme y del target difieren.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 :).
- Lenguaje dominante
- TypeScript
- Estrellas
- 17.1k
- Forks
- 1.3k
- Merge medio
- 1 d 22 h
- PR fusionados (30 d)
- 26
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ionic-team/capacitor
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ionic-team/capacitor#8759 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Plugin call after navigation can be answered before reply proxy is updatedPosiblemente ocupada @MateStrysewske la tomó hace 71 días. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ionic-team/capacitor#8616 ·
Los mantenedores suelen responder en 1 día
-
help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ionic-team/capacitor#8574 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
SystemBars: safe area CSS injection throws "Cannot read properties of null" on startup (Android 16)Posiblemente ocupada @kttalley la tomó hace 62 días. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ionic-team/capacitor#8530 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
fix(android): remove unchecked Java compilation warningsPosiblemente ocupada @Ajamuar la tomó hace 15 días. Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ionic-team/capacitor#8529 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de ionic-team/capacitor
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
prio:low scope:world
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
OliverRomhagen/vrigstad-joyride#849 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
genfeedai/genfeed.ai#11916 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
erkamyaman/rust-anything#1153 ·
Los mantenedores suelen responder en 1 día
-
The Phase 5 report says 0.3.0 waits for the live checkPosiblemente ocupada @fzn0x la tomó hoy. Abiertodocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día