ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
12.26k stars 1.01k forks source link

[Bug]: Run iOS AppName is derived from scheme name #7763

Closed chen-gong-glean closed 4 days ago

chen-gong-glean commented 6 days ago

Capacitor Version

Installed Dependencies:

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

Other API Details

No response

Platforms Affected

Current Behavior

When running npx cap run ios, it was trying to build the app using the scheme name. For example I have the config:

  appId: "com.MyApp.app",
  appName: "MyApp",
  bundledWebRuntime: false,
  ios: {
    backgroundColor: "#00000000",
    contentInset: "never",
    limitsNavigationsToAppBoundDomains: true,
    scheme: "MyAppTest",
  },

I'll have error like this:

 ✖ Deploying MyAppTest.app to 78F0A6AA-ED96-4684-ACCE-ACFEE931550E - failed!
 [error] ERR_UNKNOWN: Path
        '..path/DerivedData/78F0A6AA-E.../Build/Products/Debug-iphonesimulator/MyAppTest.app'
        not found

Expected Behavior

The name should be MyApp instead of MyAppTest

https://github.com/ionic-team/capacitor/blob/main/cli/src/ios/run.ts#L59 It looks that here is using scheme as the appName

Project Reproduction

NA

Additional Information

No response

jcesarmobile commented 4 days ago

That's what scheme is for, in case you app has multiple schemes and you want to run the app in the non default one.