How to test ionic app on iPhone?

I’m building an app which now runs fine on an Android device and in the iOS emulator and I now want to test the app on an iOS device. So I registered with the Apple Developer Program and ran ionic run ios. This ended with the following message:

Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found.
CodeSign error: code signing is required for product type ‘Application’ in SDK ‘iOS 8.2’

So I opened XCode and went to Preferences > Accounts and added my Apple ID. I then clicked View Details... and then the refresh icon so it fetched two Signing Identities. The box below which should display the Provisioning Profiles is empty though.

I then read this article on the Apple Developer site which explains that I need to:

  1. Set a bundle ID
  2. Assign my app to a team
  3. Create the Team Provisioning Profile

The bundle ID should supposedly be set in XCode. Because I am under the assumption that the bundle ID is set in my ionic config.xml file I’m unsure of how to proceed though.

Does anybody know how I can (preferably very easily) test my app on iOS devices? All tips are welcome!

Sorry if this is a silly question. You say you registered as an Apple developer, do you mean you subscribed for the paid membership?

Also, I would try building the app from Xcode itself; rather than using the CLI.

I indeed subscribed for the paid membership.

You suggest to build the app from XCode itself. Would you have any tips or links to documentation on how to do this?

Sure, when you add ios as a platform, it creates all the files it needs for Xcode to run it.

If you look in the iOS directories of your project, there should be a .xcodeproj file which you can open with XCode. Try building it onto your phone there.