#xcodebuild 构建指令
#xcrun进行签名打包指令
#!/bin/bash
#project_path项目路径project_path=
#target_name指定targetname,跟项目里指定的targetname必须保持一致。
target_name=cd $project_path
export SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.0oqHEnalgK/Listeners
/usr/bin/xcodebuild -target $target_name clean
/usr/bin/xcodebuild -target $target_name
/usr/bin/xcrun -sdk iphoneos PackageApplication -v ./build/XXX.build/Release-iphoneos/$target_name.app -o $project_path/build/XXX.build/Release-iphoneos/$target_name.ipa —sign “iPhone Developer:XXX”