Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: cap run ios with renamed scheme does not work #7869

Open
1 of 3 tasks
Huh-David opened this issue Feb 5, 2025 · 1 comment
Open
1 of 3 tasks

[Bug]: cap run ios with renamed scheme does not work #7869

Huh-David opened this issue Feb 5, 2025 · 1 comment
Labels
needs reply needs reply from the user needs reproduction needs reproducible example to illustrate the issue

Comments

@Huh-David
Copy link

Capacitor Version

  Β» npx cap doctor                                                                 
πŸ’Š   Capacitor Doctor  πŸ’Š 

Latest Dependencies:

  @capacitor/cli: 7.0.1
  @capacitor/core: 7.0.1
  @capacitor/android: 7.0.1
  @capacitor/ios: 7.0.1

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/cli: 7.0.1
  @capacitor/ios: 7.0.1
  @capacitor/core: 7.0.1

[success] iOS looking great! πŸ‘Œ

Other API Details

Β» npm --version                
11.0.0
 Β» node --version                              
v22.11.0
 Β» pod --version                   
1.16.2

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

Running the command without --scheme "App" does not work at all.

xcodebuild: error: The workspace named "App" does not contain a scheme named "NEW_NAME". The "-list" option
be used to find the names of the schemes in the workspace.

npx cap run ios --scheme "App" --target 1BAA0137-1C11-4360-A94E-3E2A42207A1D creates an App.app in ios/DerivedData/1BAA0137-1C11-4360-A94E-3E2A42207A1D/Build/Products/Debug-iphonesimulator/App.app, but I renamed the Application Scheme to "NEW_NAME" and it generates ios/DerivedData/1BAA0137-1C11-4360-A94E-3E2A42207A1D/Build/Products/Debug-iphonesimulator/NEW_NAME.app. The logic is looking for App.app instead of the new name NEW_NAME. So this results into this error:

βœ” Running xcodebuild in 14.28s
βœ– Deploying App.app to 1BAA0137-1C11-4360-A94E-3E2A42207A1D - failed!
[error] ERR_UNKNOWN: Path
        '/<project_path>/ios/DerivedData/1BAA0137-1C11-4360-A94E-3E2A42207A1D/Build/Products/Debug-iphonesimulator/App.app'
        not found

After copying around the generated file
ios/DerivedData/1BAA0137-1C11-4360-A94E-3E2A42207A1D/Build/Products/Debug-iphonesimulator/NEW_NAME.app to
ios/DerivedData/1BAA0137-1C11-4360-A94E-3E2A42207A1D/Build/Products/Debug-iphonesimulator/App.app it is working.

This is my capacitor.config.json

{
    "appId": "com.org.new_name",
    "appName": "NEW_NAME",
    "webDir": "dist/browser",
    "server": {
        "androidScheme": "https"
    },
    "plugins": {
        "CapacitorHttp": {
            "enabled": true
        },
        "CapacitorCookies": {
            "enabled": true
        },
        "PushNotifications": {
            "presentationOptions": [
                "badge",
                "sound",
                "alert"
            ]
        }
    },
    "ios": {
        "scheme": "NEW_NAME"
    }
}

Expected Behavior

The run command should consider the scheme name for looking up the proper app directory

Project Reproduction

Additional Information

No response

@jcesarmobile jcesarmobile added the needs reproduction needs reproducible example to illustrate the issue label Feb 5, 2025
Copy link

ionitron-bot bot commented Feb 5, 2025

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed.
Please see the Contributing Guide for how to create a Sample App.
Thanks! Ionitron πŸ’™

@ionitron-bot ionitron-bot bot removed the triage label Feb 5, 2025
@Ionitron Ionitron added needs reply needs reply from the user and removed needs reply needs reply from the user labels Feb 5, 2025
@jcesarmobile jcesarmobile added the needs reply needs reply from the user label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reply needs reply from the user needs reproduction needs reproducible example to illustrate the issue
Projects
None yet
Development

No branches or pull requests

3 participants