ITPub博客

首页 > Linux操作系统 > Linux操作系统 > xcodebuild 使用手册

xcodebuild 使用手册

原创 Linux操作系统 作者:c00lsun 时间:2009-04-28 13:11:07 0 删除 编辑

[FROM]http://macgeeks.cn/
 
[yarshure@MacPro]%xcodebuild  -h
unknown option: -h
Usage: xcodebuild [-project ] [-activetarget] [-alltargets] [-target ]... [-parallelizeTargets] [-activeconfiguration] [-configuration ] [-sdk |] [=]... []...
       xcodebuild [-version [-sdk |]]
       xcodebuild [-showsdks]
       xcodebuild [-find ] [-sdk |]
       xcodebuild [-list]
显示xcodebuild version
[yarshure@MacPro]%xcodebuild -version
Xcode 3.1.1
Component versions: DevToolsCore-1114.0; DevToolsSupport-1102.0
BuildVersion: 9M2517
 
显示当前系统安装SDK
[yarshure@MacPro]%xcodebuild -showsdks
iPhone OS Simulator SDKs:
        Simulator - iPhone OS 2.0       -sdk iphonesimulator2.0
        Simulator - iPhone OS 2.1       -sdk iphonesimulator2.1
 
iPhone OS Device SDKs:
        Device - iPhone OS 2.0          -sdk iphoneos2.0
        Device - iPhone OS 2.1          -sdk iphoneos2.1
 
Mac OS X SDKs:
        Mac OS X 10.4                   -sdk macosx10.4
        Mac OS X 10.5                   -sdk macosx10.5
显示当前目录下project Information
[yarshure@MacPro]%xcodebuild -list
Information about project "BookOO":
    Targets:
        BookOO (Active)
 
    Build Configurations:
        Debug (Active)
        Release
 
    If no build configuration is specified "Release" is used.
使用 iphonesimulator2.1build project
[yarshure@MacPro]%xcodebuild -sdk iphonesimulator2.1
=== BUILDING NATIVE TARGET BookOO OF PROJECT BookOO WITH THE DEFAULT CONFIGURATION (Release) ===
 
Checking Dependencies...
......
......
Touch /Users/yarshure/Desktop/BookOO/build/Release-iphonesimulator/BookOO.app
    cd /Users/yarshure/Desktop/BookOO
    /usr/bin/touch -c /Users/yarshure/Desktop/BookOO/build/Release-iphonesimulator/BookOO.app
** BUILD SUCCEEDED **
clean Target
[yarshure@MacPro]%xcodebuild clean -sdk iphonesimulator2.1 -configuration=Debug
=== CLEANING NATIVE TARGET BookOO OF PROJECT BookOO WITH THE DEFAULT CONFIGURATION (Release) ===
 
Checking Dependencies...
 
Clean.Remove clean /Users/yarshure/Desktop/BookOO/build/Release-iphonesimulator/BookOO.app
    /bin/rm -rf /Users/yarshure/Desktop/BookOO/build/Release-iphonesimulator/BookOO.app
 
Clean.Remove clean /var/folders/9j/9jS16-DSHs07FniFobQ7Bk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/BookOO_Prefix-eizrpbwsixzcdogzigrqutwuvbzo/BookOO_Prefix.pch.gch
    /bin/rm -rf /var/folders/9j/9jS16-DSHs07FniFobQ7Bk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/BookOO_Prefix-eizrpbwsixzcdogzigrqutwuvbzo/BookOO_Prefix.pch.gch
 
Clean.Remove clean /Users/yarshure/Desktop/BookOO/build/Release-iphonesimulator/BookOO.app.dSYM
    /bin/rm -rf /Users/yarshure/Desktop/BookOO/build/Release-iphonesimulator/BookOO.app.dSYM
 
Clean.Remove clean /Users/yarshure/Desktop/BookOO/build/BookOO.build/Release-iphonesimulator/BookOO.build
    /bin/rm -rf /Users/yarshure/Desktop/BookOO/build/BookOO.build/Release-iphonesimulator/BookOO.build
** CLEAN SUCCEEDED **
 
 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 ** 收工

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9059159/viewspace-592071/,如需转载,请注明出处,否则将追究法律责任。

下一篇: Email 和 addressbook
请登录后发表评论 登录
全部评论

注册时间:2009-03-23

  • 博文量
    31
  • 访问量
    46956