xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH - Since updating Xcode
Asked Answered
W

9

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.

Wat answered 28/3, 2017 at 11:40 Comment(4)
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: developer.apple.com/library/content/documentation/IDEs/…Herculean
@Herculean Jesus, thanks for the link ill take a look shortly.Wat
Instructions at subathrathanabalan.com/2016/01/07/building-ipa-export-archiveElam
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: https://mcmap.net/q/330369/-what-39-s-the-replacement-for-xcode-39-s-packageapplicationMuscadine
N
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.

Nils answered 3/4, 2017 at 13:0 Comment(1)
Not necessarily downgrade.. just replace the missing file in new installation , see my answer https://mcmap.net/q/403039/-xcrun-error-unable-to-find-utility-quot-packageapplication-quot-not-a-developer-tool-or-in-path-since-updating-xcodeConceive
D
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.

Doge answered 20/4, 2017 at 20:38 Comment(2)
Are these changes merged into the full build?Strapped
No. That's why I've linked a snapshot. Trying to get them merged in asap.Doge
H
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/

Halting answered 29/3, 2017 at 14:6 Comment(2)
Alright thanks, ill keep an eye out. For now I can run on device via Xcode and build through command line.Wat
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.Rhodesia
M
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).

Maximilien answered 12/4, 2017 at 8:8 Comment(4)
Removing the ios was a bad idea for meHenslowe
What happened? You shouldn't have anything in the platform directory that can't be automatically reconstructed.Maximilien
Sorry I take that back. The adding script didn't work for me at the time but it works now. Don't know what happened.Henslowe
Glad to hear that everything is ok nowMaximilien
N
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

Northwestward answered 31/3, 2017 at 5:16 Comment(0)
R
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.

Refute answered 8/4, 2017 at 23:10 Comment(0)
R
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

Rhodesia answered 19/4, 2017 at 13:51 Comment(0)
Q
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.

Quantity answered 9/5, 2017 at 10:2 Comment(0)
R
-3

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

Rilke answered 20/6, 2017 at 23:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.