skip to Main Content

I have followed the complete install guide for nativescript on a Mac (Big Sur). Also when running tns doctor everything seems fine. However, when i’am running tns build ios or tns run ios i get the following error:

error: Building for iOS Simulator, but the linked and embedded framework ‘TNSWidgets.framework’ was built for iOS + iOS Simulator. (in target ‘projectapp’ from project ‘projectapp’).

Could someone please tell me how to fix this. I installed nativescript 7.0.11 and
x-code 12.3

3

Answers


  1. So I just updated Xcode to 12.3 today, using nativescript 7.0.11 in my project and I got a simular issue. What worked for me was:

    1. Open the platforms/ios folder using Xcode
    2. Select "yourprojectname.xcodeproj" from the list
    3. Select yourprojectname from the Targets
    4. Expand Build Options and find Validate Workspace
    5. Change to Yes
    6. Rebuild the project

    After that, I got a successful build.

    Login or Signup to reply.
  2. Yesterday with the Xcode update (12.3) I’ve got the same error, after seeing a lot of posts about this error the solution from Niko Dovidija IS THE CORRECT ONE.

    My environment:

    1. Xcode 12.3
    2. iOS platform 6.5.3
    3. Nativescript 6.7.8

    In order to build the application in CLI update build.xconfig in iOS platform and add this line:

    VALIDATE_WORKSPACE = YES

    Posts about "similar" errors and didn’t work for me.

    1. Building for iOS simulator
    2. Building for iOS simulator ‘AFNetworking.framework’
    Login or Signup to reply.
  3. Please note that I also needed to run ns platform clean ios command in order to make the build work after updating my Xcode to 12.3

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search