New Xcode provisioning policy and Ionic Framework

2019-05-11 01:51发布

I have a problem with understanding how does the Ionic Framework works with iOS provisioning profiles. Since few months (I think) it is said that Xcode 7.1 does not require to have developer account anymore. So if I get it right, I don't need to pay to test my apps on my iPhone. And actually I was able to compile and run hello world app on my device with Xcode (it asked me to solve some signing code issues, but it ran well).

Now comes Ionic, which is new for me. I worked with cordova before, so simple CLI commands seems familiar. There are some fast-start commands shown on ionicframework.com:

$ cd myApp
$ ionic platform add ios
$ ionic build ios
$ ionic emulate ios

Rather than build and emulate, I would like to simply use

$ ionic run ios --device

But then I get

Check dependencies Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “com.ionicframework.ionic3712496” were found.

The following build commands failed: Check dependencies (1 failure) Error code 65 for command: xcodebuild with args: -xcconfig,/Applications/AMPPS/www/cordova/ionic3/platforms/ios/cordova/build-debug.xcconfig,-project,ionic3.xcodeproj,ARCHS=armv7 armv7s arm64,-target,ionic3,-configuration,Debug,-sdk,iphoneos,build,VALID_ARCHS=armv7 armv7s arm64,CONFIGURATION_BUILD_DIR=/Applications/AMPPS/www/cordova/ionic3/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Applications/AMPPS/www/cordova/ionic3/platforms/ios/build/sharedpch ERROR running one or more of the platforms: Error: /Applications/AMPPS/www/cordova/ionic3/platforms/ios/cordova/run: Command failed with exit code 2 You may not have the required environment or OS to run this project

My Xcode preferences > Accounts > ACCOUNT looks like this

enter image description here

enter image description here

And finally my questions

  1. What do I do now if I want to run the ionic app on my device?
  2. How does code signing work? How to code sign my app? Is it somehow automated within Ionic? Is it required (even on Xcode 7.1)? Do I have to do some additional action before/after every compile? (note: I'm not using Xcode to create my apps, just editing the www folder. Doing it right?)
  3. Ionic says their software makes the app more native than others hybrid softwares. That it isn't like creating a website. But I see the same file/folder structure as in standard cordova (+ jquery mobile which I was using). I don't understand how can Ionic be more "native" than my previous solution, could someone please explain it to me? Thank you

2条回答
再贱就再见
2楼-- · 2019-05-11 02:02

With your device connected, and unlocked, open and run the project in Xcode:

open path/to/name-of-ionic-app/platforms/ios/name-of-ionic-app.xcodeproj

Xcode should generate a temporary provisioning profile for your app. If this fails, try changing the name of the bundle identifier under the General tab in XCode, then build and run again.

查看更多
乱世女痞
3楼-- · 2019-05-11 02:08

First of all - check in the Keychain Access valid certificates. Looks like xCode cannot find any valid serts. If all is ok - try remove apple account from xCode settings and all related with this account files from your mac and install all stuff again.

查看更多
登录 后发表回答