iosxcodeionic2ionic-cli

Ionic CLI Build Error


I've been able to successfully using the Ionic CLI to build my iOS packages in the past, but I have a set of errors that I can't get rid of. The archive is succeeding, but I'm still having a few issues.

1) Even if I'm using the ionic build ios command, it's creating an archive package and not the build package.

2) I'm getting some IDEDistribution errors:

** ARCHIVE SUCCEEDED **

Non-system Ruby in use. This may cause packaging to fail.
If you use RVM, please run `rvm use system`.
If you use chruby, please run `chruby system`.

2017-03-15 10:00:54.132 xcodebuild[11254:474630] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/v9/dqmqkj455rjbmq4n9gg4dc4m0000gn/T/ExampleSQLite_2017-03-15_10-00-54.131.xcdistributionlogs'.

1.2.840.113635.100.1.61

Exported ExampleSQLite.xcarchive to: /Applications/XAMPP/xamppfiles/htdocs/dev/_ionic/ExampleSQLite/platforms/ios/build/device

** EXPORT SUCCEEDED **

This error occurs even after I've run the rvm use system command.

Is the archive setting something in XCode settings? If I try ionic build android it builds properly (meaning it doesn't archive, I get a BUILD SUCCEEDED message).

For reference, here is my system info: Your system information:

Cordova CLI: 6.5.0 
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.1 
ios-sim version: 5.0.4 
OS: macOS Sierra
Node Version: v7.5.0
Xcode version: Xcode 8.2.1 Build version 8C1002

I've tried uninstalling and reinstalling XCode with no change.


Solution

  • It turned out that I had two iOS Developer Keys in my Keychain Access which was causing the error. Once I deleted that one and tried to build, the error went away.

    If you have the same issue, go to Keychain Access > Keys and look for ones that start with iOS Developer... if you have any duplicates installed just delete them and reinstall and you should be all set.