[FROM]http://macgeeks.cn/
From SSH Connection Build Xcode iPhone Project
1 使用ssh client login Develope Machine
2 $cd iPhone App directory
3 $xcodebuild
一般CodeSign 会抱错,消息如下
CodeSign /Users/yarshure/proj/BookOO090215/build/Release-iphoneos/BookOO.app
cd /Users/yarshure/proj/BookOO090215
/usr/bin/codesign -f -s "iPhone Developer: xiangbo kong" --resource-rules=/Users/yarshure/proj/BookOO090215/build/Release-iphoneos/BookOO.app/ResourceRules.plist --entitlements /Users/yarshure/proj/BookOO090215/build/BookOO.build/Release-iphoneos/BookOO.build/BookOO.xcent /Users/yarshure/proj/BookOO090215/build/Release-iphoneos/BookOO.app
/Users/yarshure/proj/BookOO090215/build/Release-iphoneos/BookOO.app: User interaction is not allowed.
** BUILD FAILED **
4 解决办法
使用security 命令行工具
$security unlock-keychain
5 重新执行
$xcodebuild
CodeSign 输出
CodeSign /Users/yarshure/proj/BookOO090215/build/Release-iphoneos/BookOO.app
cd /Users/yarshure/proj/BookOO090215
/usr/bin/codesign -f -s "iPhone Developer: xiangbo kong" --resource-rules=/Users/yarshure/proj/BookOO090215/build/Release-iphoneos/BookOO.app/ResourceRules.plist --entitlements /Users/yarshure/proj/BookOO090215/build/BookOO.build/Release-iphoneos/BookOO.build/BookOO.xcent /Users/yarshure/proj/BookOO090215/build/Release-iphoneos/BookOO.app
** BUILD SUCCEEDED **
6 ** BUILD SUCCEEDED ** 收工