Skip to content

tns run ios not working after update #2355

Open
@anoggi

Description

@anoggi

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):

  • CLI: 8.0.1
  • Cross-platform modules: 8.0.5
  • iOS Runtime: ^8.0.0
  • Plugin(s): @angular/animations │ 9.1.1 │
    │ @angular/common │ 9.1.1 │
    │ @angular/compiler │ 9.1.1 │
    │ @angular/core │ 9.1.1 │
    │ @angular/forms │ 9.1.1 │
    │ @angular/localize │ 9.1.1 │
    │ @angular/platform-browser │ 9.1.1 │
    │ @angular/platform-browser-dynamic │ 9.1.1 │
    │ @angular/router │ 9.1.1 │
    │ @nativescript/angular │ ^11.2.0 │
    │ @nativescript/core │ ^8.0.5 │
    │ @nativescript/ios │ ^8.0.0 │
    │ @nativescript/schematics │ ^9.0.0 │
    │ @nativescript/theme │ ~2.2.1 │
    │ @ng-bootstrap/ng-bootstrap │ 6.0.2 │
    │ @nstudio/nativescript-checkbox │ ^1.0.0 │
    │ angular-in-memory-web-api │ ^0.10.0 │
    │ bootstrap │ 4.4.1 │
    │ component │ ^1.1.0 │
    │ core-js │ 3.6.5 │
    │ jquery │ ^3.5.1 │
    │ jwt-decode │ 2.2.0 │
    │ lodash │ 4.17.15 │
    │ nativescript-localstorage │ ^2.0.1 │
    │ reflect-metadata │ ~0.1.12 │
    │ rxjs │ 6.5.5 │
    │ rxjs-compat │ ^6.6.6 │
    │ tns-core-modules │ ^6.5.27 │
    │ tslib │ 1.11.1 │
    │ zone.js │ 0.10.3
    @angular-devkit/build-angular │ 0.901.1 │
    │ @angular/cli │ 9.1.1 │
    │ @angular/compiler-cli │ 9.1.1 │
    │ @angular/language-service │ 9.1.1 │
    │ @nativescript/ios │ ^8.0.0 │
    │ @nativescript/schematics │ ~2.0.0 │
    │ @nativescript/tslint-rules │ ~0.0.5 │
    │ @types/jasmine │ 3.5.10 │
    │ @types/jasminewd2 │ 2.0.8 │
    │ @types/jwt-decode │ 2.2.1 │
    │ @types/lodash │ 4.14.149 │
    │ @types/node │ 13.11.1 │
    │ codelyzer │ 5.2.2 │
    │ jasmine-core │ 3.5.0 │
    │ jasmine-spec-reporter │ 5.0.1 │
    │ karma │ 5.0.1 │
    │ karma-chrome-launcher │ 3.1.0 │
    │ karma-coverage-istanbul-reporter │ 2.1.1 │
    │ karma-jasmine │ 3.1.1 │
    │ karma-jasmine-html-reporter │ 1.5.3 │
    │ nativescript-dev-webpack │ ~1.5.0 │
    │ protractor │ ^7.0.0 │
    │ tns-android │ 6.5.3 │
    │ tns-ios │ 6.5.4 │
    │ ts-node │ 8.8.2 │
    │ tslint │ 6.1.1 │
    │ typescript │ 3.8.3
  • NativeScript-Angular: ^11.2.0
  • Angular: 9.1.1

Describe the bug
After updating to the newest nativescript and @nativescript/ios, tns run ios is not working anymore. I get the following error:

error: Unexpected duplicate tasks:
1) Target 'frontendnativescript' (project 'frontendnativescript'): CodeSign /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework
2) Target 'frontendnativescript' (project 'frontendnativescript'): CodeSign /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework
error: Multiple commands produce '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework/TNSWidgets':
1) Target 'frontendnativescript' has copy command from '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/node_modules/@nativescript/core/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework' to '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework'
2) Target 'frontendnativescript' has copy command from '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework' to '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework'

error: Multiple commands produce '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework':
1) Target 'frontendnativescript' has copy command from '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/node_modules/@nativescript/core/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework' to '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework'
2) Target 'frontendnativescript' has copy command from '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework' to '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework'

note: Using new build system
note: Building targets in parallel
note: Using codesigning identity override: 
note: Planning build
note: Constructing build description
warning: duplicate output file '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework' on task: PBXCp /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework (in target 'frontendnativescript' from project 'frontendnativescript')
warning: duplicate output file '/Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework/TNSWidgets' on task: PBXCp /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework (in target 'frontendnativescript' from project 'frontendnativescript')
warning: duplicate output file '' on task: PBXCp /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/node_modules/tns-core-modules-widgets/platforms/ios/TNSWidgets.framework /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app/Frameworks/TNSWidgets.framework (in target 'frontendnativescript' from project 'frontendnativescript')
warning: Building for iOS Simulator, but the linked and embedded framework 'TNSWidgets.framework' was built for iOS + iOS Simulator. (in target 'frontendnativescript' from project 'frontendnativescript')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'MDFInternationalization' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'BEMCheckBox' from project 'Pods')
** BUILD FAILED **

Unable to apply changes on device: 31FE16F7-4244-4521-AF2F-BFAF9020FC98. Error is: Command xcodebuild failed with exit code 65.

I tried to fix this as suggested in this post: NativeScript/nativescript-cli#4035

In the List of Frameworks, Libraries and Embedded Content I found TNSWidgets.xcframework and TNSWidgets.framework. After deleting one of them (no matter which one) and running tns run ios again, I get another error:

Unable to apply changes on device: 31FE16F7-4244-4521-AF2F-BFAF9020FC98. Error is: Command xcrun with arguments simctl install 31FE16F7-4244-4521-AF2F-BFAF9020FC98 /Users/anoki/Downloads/sepm/ss20_sepm_qse_14/frontend_nativescript/platforms/ios/build/Debug-iphonesimulator/frontendnativescript.app failed with exit code 22. Error output:
 An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.

All posts I found regarding this error suggest cleaning the project, which results in the first error again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions