39

Updated Xcode this morning and now ionic project wont deploy to a device.

ionic run ios --device

Returns:

** BUILD SUCCEEDED **


xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH

Error: Error code 72 for command: xcrun with args: -sdk,iphoneos,PackageApplication,-v

No idea what to do to fix, Googling returns lots of options but none correct.

Lovelock
  • 7,689
  • 19
  • 86
  • 186
  • 2
    Seems like the deprecated "PackageApplication" was removed from Xcode 8.3. I managed to create an ipa using Xcode ad-hoc deployment. You can give it a try until this gets fixed: https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html – eymen Mar 28 '17 at 12:39
  • @eymen Jesus, thanks for the link ill take a look shortly. – Lovelock Mar 28 '17 at 12:49
  • Instructions at http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/ – iwasrobbed Mar 30 '17 at 23:28
  • I use a tool that doesn't use an Xcode project thus I can't `xcodebuild -exportArchive`, so I resort to replacing `PackageApplication` from an old Xcode: http://stackoverflow.com/a/43550906/1383915 – twj Apr 21 '17 at 19:56

9 Answers9

7

Cordova is trying to use "PackageApplication" tool. But it was removed since Xcode 8.3. Either downgrade Xcode or wait for Cordova to have a fix for that.

guyromb
  • 773
  • 8
  • 15
  • 2
    Not necessarily downgrade.. just replace the missing file in new installation , see my answer http://stackoverflow.com/a/43935071/1441326 –  May 12 '17 at 10:09
3

Linked in the Jenkins issue that matson kepson mentioned here there was a guy who attempted a PR to fix the issue. There was some unfinished change requests in his PR and I also found a few null ptrs in his changes. I forked his pr and fixed these things here and there is now a snapshot linked here that you can download and become unblocked until such a change is merged into the full build.

blahartinger
  • 292
  • 1
  • 8
1

Hi its official Bug from jenkins

here you have a fresh status

https://issues.jenkins-ci.org/browse/JENKINS-43163


Little bit clearer to look at this:

http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/

iwasrobbed
  • 46,496
  • 21
  • 150
  • 195
mati kepa
  • 2,543
  • 19
  • 24
  • Alright thanks, ill keep an eye out. For now I can run on device via Xcode and build through command line. – Lovelock Mar 29 '17 at 15:37
  • The question is actually about ionic and totally not related to Jenkins Although they have the same root cause (a deprecated command), the Jenkins bugfix will not help the Ionic issue. – S. Roose Apr 19 '17 at 13:39
1

I've just come across this and my solution was to remove the iOS platform from the project:

ionic platform rm ios

Then add it back in again

ionic platform add ios

I needed to run an initial build for it to fail with no signing set, so opening up the project in Xcode to just fix that. After that, building via the ionic cli worked as expected. I am guessing that re-adding the platform pulled in a new version of cordova-ios.

Update: I had only started on this project and created the base project from the blank template. I have Xcode 8.3.1 installed and using Ionic 3 (still with the --v2 switch with ionic cli).

jpmcc
  • 368
  • 5
  • 11
0

I used shenzhen this automatic procedure encountered a similar problem, and finally in accordance with the github Pull Request to solve my problem, hope for your reference! https://github.com/nomad/shenzhen/pull/347

0

I found a workaround to solve this using command line, with device connected on your mac: ionic build ios --device ios-deploy --noninteractive --debug --bundle build/device/YOURAPP.app

After this, stop debug using Ctrl C, and your app will be working on your device.

Hope work for you guys.

Fabio Godoy
  • 51
  • 1
  • 2
0

The is caused by the deprecated PackageApplication. If you're using the remotebuild tool to run from Windows, it will be solved when the remotebuild bug has been fixed: https://github.com/Microsoft/remotebuild/issues/26

S. Roose
  • 1,398
  • 1
  • 12
  • 27
0

Another solution is to downgrade XCode.

Here if the explanation on how to uninstall current XCode.

And here you can download XCode 8.2.

Lentyai
  • 968
  • 1
  • 10
  • 25
-3

An option is open a .xcodeproj file located at platforms/ios and run the project directly from Xcode.

Julianesten
  • 363
  • 4
  • 7