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
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:
After that, I got a successful build.
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:
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.
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