How do I get ionic cordova run to work for iOS

I have tried countless times to get the cli command ionic cordova run ios to work but I am always faced with the same error

No profiles for 'my.package.name' were found: Xcode couldn't find a provisioning profile matching 'my.package.name'. Code signing is required for product type 'Application' in SDK 'iOS 10.3'

I went ahead and tried to create a build.json file (recommended on cordova website) and used the ionic cordova run ios --buildConfig=build.json but still I have no luck. Below is the build.json file for reference.

{
  "ios": {
    "debug": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "HMYYMT38R6",
      "packageType": "development"
    },
    "release": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "HMYYMT38R6",
      "packageType": "app-store"
    }
  }
}

Any help would be appreciated. Thanks in advance!

Can someone confirm if they are having the same problem or if it’s working for them?

Thanks in advance!

Look at https://ionicframework.com/docs/cli/cordova/build/#examples for alterantive examples on how to set the signing stuff. Or open the Xcode projects once and do it manually.

I have taken a look at the examples for the link posted. All examples only show ionic build which currently works fine for me.

Right now I am opening up the Xcode project after it has been built and manually assigning the signing identity (as you stated ). I really appreciate the advice but it seems that that solution is a workaround at best :frowning: .

The parameter for run and build should be identical. You can use this way to add parameters.

Hmm i’m not sure I know what you mean by that.

Essentially what i’m trying to do is get --livereload working on ios and it seems the only way to do that is by using run.

Yout haven’t mentioned that yet. Until now, it was about fixing a signing thing for which I pointed you into the direction of alternative parameters that can be used vs. the build.json that was not working for you.

If you have an issue with livereload, please open a new topic and describe your livereload problem there.

That makes sense. Sorry about the miscommunication.

I really appreciate the help!