hasen's tech life

Twitter: @hasen

Shenzhenでipa buildをするとエラーが出たので対応した.

# Shenzhenでipa buildをするとエラーが出たので対応した.

$ ipa build
> xcodebuild AnyStudio.xcworkspace
> 11-12 14:38:25.515 xcodebuild[89662:4051767] WARNING: Failed to load plugin at path: "/PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin", skipping. Error: Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz): no suitable image found. Did find:
> /PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz: code signing blocked mmap() of '/PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz'" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz, NSDebugDescription=dlopen_preflight(/PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz): no suitable image found. Did find:
> /PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz: code signing blocked mmap() of '/PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin/Contents/MacOS/Alcatraz', NSBundlePath=/PATH/TO/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin, NSLocalizedDescription=The bundle “Alcatraz” couldn’t be loaded because it is damaged or missing necessary resources.}
> xcrun PackageApplication
> xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH

# PackageApplicationがXCode8にないことが原因.(v7, v8をそれぞれXCode7, XCode8として使っている)
$ cp /Applications/Xcode7.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication /Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/

$ ipa build

参考: xcrun: error: unable to find utility “PackageApplication”, not a developer tool or in PATH - Since updating xCode