2014-11-24 159 views
0

我試圖在終端中使用xcodebuild命令構建我的應用程序。它的失敗然而這樣做,並給我這個錯誤:從終端構建應用程序時,代碼簽名失敗

CodeSign build/Release-iphoneos/frameworkname.framework 
    cd /path/frameworkname 
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate 
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin" 

Signing Identity:  "my signing identity" 
Provisioning Profile: "provisioning profile" 
         (numbersandletters) 

/usr/bin/codesign --force --sign numbersandletters /path/frameworkname/build/Release-iphoneos/frameworkname.framework 
/path/frameworkname/build/Release-iphoneos/frameworkname.framework: bundle format unrecognized, invalid, or unsuitable 
Command /usr/bin/codesign failed with exit code 1 

** BUILD FAILED ** 

The following build commands failed: 
    CodeSign build/Release-iphoneos/frameworkname.framework 
(1 failure) 

我使用這個命令,而裏面的項目文件夾:

xcodebuild -target myprojectname -sdk iphoneos -configuration Release 

也嘗試添加-project myprojectname.xcodeproj但是,這並不使一個區別,我仍然是一樣的錯誤。

我嘗試了張貼的腳本here但這對我也不起作用。我認爲這是因爲我的框架中沒有版本文件夾。這可能是一個開始的地方,但我不知道該怎麼做tbh。任何幫助,將不勝感激:)

+0

無效的框架結構可能是調查一個好主意。我試着用'xctool'編譯它 - 消息更清晰。 – Opal 2014-11-24 17:45:01

回答

0

我們找到了一個可以構建我們項目的解決方案。我們使用這個命令

xcodebuild聯編 - 項目testerProject.xcodeproj -sdk的iPhoneOS -configuration釋放乾淨的構建RUN_CLANG_STATIC_ANALYZER = NO -scheme testerProject歸檔

1

嘗試建立這樣的:

security unlock-keychain -p aPassword /Users/aUser/Library/Keychains/login.keychain && \ 
xcodebuild -scheme 'aScheme' Release archive CODE_SIGN_IDENTITY="AcodeSignIdentity" PROVISIONING_PROFILE="aProvisioningProfile" 

特別要注意

1)鑰匙扣解鎖(不必要的,如果你可以從GUI解鎖)

2)方案的使用

+0

使用一個計劃似乎有伎倆 – Hafax 2014-12-01 12:36:11

相關問題