How to build ionic2 projects locally on iOS

First you need to buy a developer certificate from Apple and connect your Phone in Apple Developer Portal as well as add the Certificate Chain on your Local Mac to your Keychain. This is a rather complex task but Apple and other Soruces describes this in detail, so it shouldn't be a problem, but you will to bring time and patience.

Then when you have set up your Developer Account and interconnected your Mac and iPhone and XCode to it, you can code sign your app in XCode. Here are a few screenshots how it looks like at my computer:




Then you can either just press the play button in Xcode to debug in Xcode (which is perfectly fine honestly), or you can do :

(Please note the last step fails for me with Can't access app path '/Users/username/devel/projectname/platforms/ios/build/device/' : No such file or directory but it may work for you.

May the Debugging gods be with you!