Code signing error when trying to run on iOS device


I’m following the answer given ( about how to run an app on an iOS device (can’t find any official documentation on it on NativeScript’s documentation).

But when I try to run the build fails with the following error message:

How can I run on device?


I was able to solve this only after opening the generated xCode project in the platform directory and manually setting up development provisioning.