error: exportArchive: No profiles for 'io.ionic.starter' were found

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 01:34:02
CodeChanger

To deploy and test an app on an iOS device you need to create a developer certificate and a provisioning profile.

iOS developers need to generate a provisioning profile to code sign their apps for testing. The good news is that, as of iOS 9, you can develop and test your apps on your iOS device without a paid Apple Developer account. This is particularly great for developers who want to try out mobile development with Ionic, since it saves the cost but still provides a lot of the features of having a full Apple Developer account. For a full breakdown of the features included, check out Apple’s docs.

Basic Requirements to run your iOS app :

  • MacOS (10.10 or higher)
  • Xcode 7 or higher
  • iOS 9
  • A free Apple ID or paid Apple Developer account

Need to Generate Certificate & Profile:

Open your Xcode > Go to Preferences > Account > Add account

Add Your Apple account credential:

Now Come back to ionic project and follow below steps:

  • Run a build (production or debug) of your app with below command

    $ionic cordova build ios --prod

  • Open the .xcworkspace file from path platforms/ios/ in Xcode.

For Profile Selection from XCode follow below steps:

Now Go to your App Setting (By clicking on App name in Left Menu panel)

Check "Automatically manage signin" (by checking this Xcode will create profile automatically)

After setting all this now your app is ready to test on device there are 2 ways to run your app on device.

  1. Directly run your app from XCode by hitting on play button on top left corner.

  2. run $ionic cordova run ios --device through your ionic project terminal.

Hope above steps will helps to run your app on iOS device.

Useful links :

  1. How to deploy app on device (android & iOS)
  2. Apple Certificate Sign in flow

I had the same issue before and I fixed it by actually archive and validate the ios app using xcode GUI. That creates the provisioning profile you need if you check the "automatic managing signing". (P.s. If that fails to validate, then it is because of some other reason which you need to google) After all the necessary provisioning profiles are automatically created by xcode. Then, try run the command again. It should work this time! I hope that can solve your problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!