3

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.

Lauren
  • 743
  • 3
  • 12
  • 24

3 Answers3

5

Was getting the same error and in my case, it turned out that the problem was caused because I had my device plugged to the computer during the Cordova build.

I just unplugged it and works.

Cesar
  • 682
  • 3
  • 15
2

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.

Lauren
  • 743
  • 3
  • 12
  • 24
  • 2
    I didn't try this, but this is not an option for people who are working for several clients and need the profiles. I solved this by opening the project in Xcode, selected the proper provisioning profile and compiled it there. – dirkk0 Feb 13 '19 at 09:55
1

I was getting the same error and in my case, it turned out that the problem was caused because I had my device plugged to the computer during the Cordova build. I just unplugged it and works.

FedeH
  • 1,343
  • 18
  • 24