After Xcode is upgraded, the error of "unable to find utility "PackageApplication", not a developer tool or in PATH" appears when building ios

   This error generally occurs because the PackageApplication is lost after the Xcode upgrade. The PackageApplication file needs to be re-placed under /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/, you can download the PackageApplication Then cp the PackageApplication file to the corresponding location. If you directly use the cp command to copy the error of Permission denied, you need to use the following command    


sudo cp /Users/timon/Desktop/PackageApplication /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ (/Users/timon/Desktop/PackageApplication is the location of the PackageApplication file)


Password: ( Enter the local password to obtain root user privileges)

sudo  xcode-select -switch /Applications/Xcode.app/Contents/Developer/


chmod +x /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication (add execution permission to PackageApplication)

After executing, you can rebuild

PackageApplication download address:  https://pan.baidu.com/s/1mkhVxqxL0D2zagwyH0BkXA

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324852966&siteId=291194637