NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.04k stars 196 forks source link

iOS build fail with Xcode 11 #5138

Closed flinbu closed 4 years ago

flinbu commented 4 years ago

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

note: Using new build system note: Planning build note: Constructing build description warning: duplicate output file '/Users/flinbu/Documents/dev/monety/app/platforms/ios/build/Debug-iphonesimulator/app.app/app' on task: CreateUniversalBinary /Users/flinbu/Documents/dev/monety/app/platforms/ios/build/Debug-iphonesimulator/app.app/app normal i386 x86_64 (in target 'app' from project 'app') BUILD FAILED

Unable to apply changes on device: DC804259-4BF5-483A-BA77-64E4C80B94B9. Error is: Command xcodebuild failed with exit code 65.

Xcode is up to date (Version 11.2 (11B52)) and the environment looks good after running `tns doctor`:

No issues were detected. ✔ Your ANDROID_HOME environment variable is set and points to correct directory. ✔ Your adb from the Android SDK is correctly installed. ✔ The Android SDK is installed. ✔ A compatible Android SDK for compilation is found. ✔ Javac is installed and is configured properly. ✔ The Java Development Kit (JDK) is installed and is configured properly. ✔ Xcode is installed and is configured properly. ✔ xcodeproj is installed and is configured properly. ✔ CocoaPods are installed. ✔ CocoaPods update is not required. ✔ CocoaPods are configured properly. ✔ Your current CocoaPods version is newer than 1.0.0. ✔ Python installed and configured correctly. ✔ The Python 'six' package is found. ✔ Xcode version 11.2.0 satisfies minimum required version 10. ✔ Getting NativeScript components versions information... ✔ Component nativescript has 6.2.0 version and is up to date. ✔ Component tns-core-modules has 6.2.1 version and is up to date. ✔ Component tns-android has 6.2.0 version and is up to date. ✔ Component tns-ios has 6.2.0 version and is up to date.


I already try deleting `node_module`, `platforms` and  `package-lock.json` and reinstalling the project. Try with a new empty project and get the same issue.

**To Reproduce**
Build o debug iOS project.

**Expected behavior**
Correct build

**Sample project**
Any project, including a new one. 

**Additional context**
😞
KristianDD commented 4 years ago

Hi @flinbu , From the log you provided it seems that you have created an application that is called app. Xcode doesn't allow building applications called app. You should also get a prompt with warning message when you execute tns create app:

You cannot build applications named 'app' in Xcode. Consider creating a project with different name.
Do you want to create the project with this name? (Y/n)

Try creating application with different name tns create someAppName.