7

This morning, xcode got updated to version 8.3 on my osx building device.

Since then, when I try to build my iOs app with Cordova, I get the following error at the end of the building process:

 [exec] 
 [exec] ** BUILD SUCCEEDED **
 [exec]
 [exec] xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
 [exec] Error: Error code 72 for command: xcrun with args: -sdk,iphoneos,PackageApplication,-v,[source.app]-o,[destination.ipa]
 [exec] Result 1

I can't seem to get this fixed in my Cordova or Xcode setup. Wouldn't know where to start ;)

Did anyone experience the same issue? Do you have some advise for a solution.

Thank you!

(I'll be happy to buy a beer if you could help me out)

Kickar
  • 165
  • 1
  • 4
  • 9
  • Possible duplicate of [xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH - Since updating xCode](http://stackoverflow.com/questions/43068608/xcrun-error-unable-to-find-utility-packageapplication-not-a-developer-tool) – S. Roose Apr 19 '17 at 14:04

5 Answers5

5

Upgrade your ios platform in config.xml:

<engine name="ios" spec="~4.3.1" />

Then reinstall your platform:

rm -rf platforms/
cordova prepare
2

There's a cordova-ios PR (#257, now merged - https://github.com/apache/cordova-ios/pull/257) for this issue.

So, updating cordova-ios is the fix.

Brian Knoblauch
  • 20,639
  • 15
  • 57
  • 92
  • Thank you for the update. I'm searching for some documentation or logging on this, but unfortunately can't seem to find anything. Do you know where I can find this perhaps, so I can share this to our dev team? Thanks a lot! – Kickar Apr 04 '17 at 09:32
  • @Kickar - Added the PR link above. Beware, so far in testing it does indeed fix the original issue but appears to have a new issue. The Cordova clean process will wipe out the platform www directory now, which will cause builds to fail. At this moment in time I have to recommend NOT running clean. – Brian Knoblauch Apr 04 '17 at 12:00
  • Clean issue was an artifact of my environment and is unrelated to the cordova-ios update which will fix the original issue. – Brian Knoblauch Apr 10 '17 at 15:44
  • 1
    @BrianKnoblauch I have the exact same issue and I am at cordova-ios 4.3.1, which is the latest release – S. Roose Apr 19 '17 at 13:21
1

We only solution we had is:

  1. Copied from xcode Contents\Developer\Platforms\IPhoneOS.platform\DeviceSupport\10.3 folder
  2. rolled back to xcode 8.2 but put 10.3 back in Contents\Developer\Platforms\IPhoneOS.platform\DeviceSupport\
  3. Packaging start working.
Shadow
  • 33,525
  • 10
  • 51
  • 64
Oleksandr Poshtaruk
  • 2,062
  • 15
  • 18
0

After you try to build on device using

ionic run ios --device -l -c

Open the project on the xCode without terminating the code you typed

Try to run the project on xCode too and tada. It works on phone with debug on terminal.

Alpan Karaca
  • 968
  • 5
  • 12
  • 30
-1

This tool has been removed from Xcode 8.3. It was marked as deprecated for a few versions, and now it's sadly gone.

You will need to use xcodebuild and it may be a bit of a pain with Cordova

SamDR12
  • 71
  • 5