我无法从命令行构建ipa签名文件。我的环境首先几句话:从命令行到ipa的Xcode构建应用程序
1.申请 我准备从模板的“主从应用”为iPad一个简单的应用程序。在代码中没有任何改变,在设置中没有改变。只是简单的新项目。
2.构建脚本 这里是我建 “脚本”
cd /Users/admin/Desktop/signtest/signtest/
xcodebuild -target signtest -configuration Debug -sdk iphonesimulator4.3 clean build
/usr/bin/xcrun -sdk iphoneos PackageApplication -v /Users/admin/Desktop/signtest/signtest/build/Debug-iphonesimulator/signtest.app -o /Users/admin/Desktop/binaries/signtest.ipa --sign "iPhone Developer: Marcin Zyga (CLJR93MXJ6)" --embed "/Users/admin/Library/MobileDevice/Provisioning\ Profiles/94D99766-0268-4E0E-B8D1-053063BB2DA1.mobileprovision"
3.问题
应用的建造,然后我试图让从IPA文件构建。但我有这样的:
** BUILD SUCCEEDED **
Packaging application: '/Users/admin/Desktop/signtest/signtest/build/Debug-iphonesimulator/signtest.app'
Arguments: embed=/Users/admin/Library/MobileDevice/Provisioning\ Profiles/94D99766-0268-4E0E-B8D1-053063BB2DA1.mobileprovision verbose=1 output=/Users/admin/Desktop/binaries/signtest.ipa sign=iPhone Developer: Marcin Zyga (CLJR93MXJ6)
Environment variables:
HOME = /Users/admin
SUDO_GID = 20
DISPLAY = /tmp/launch-vj2zx7/org.x:0
VERSIONER_PERL_PREFER_32_BIT = no
MAIL = /var/mail/root
SSH_AUTH_SOCK = /tmp/launch-YPyQMl/Listeners
PWD = /Users/admin/Desktop/signtest/signtest
LANG = pl_PL.UTF-8
USER = root
LOGNAME = root
__CF_USER_TEXT_ENCODING = 0x0:29:42
USERNAME = root
SHLVL = 1
OLDPWD = /SMT/ci_shell_scripts
_ = /usr/bin/xcrun
PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
LSCOLORS = GxFxCxDxBxegedabagaced
SUDO_USER = admin
SHELL = /bin/bash
TERM = xterm-256color
SUDO_COMMAND = ./sign_test_ipa.sh
VERSIONER_PERL_VERSION = 5.12
SUDO_UID = 502
Output directory: '/Users/admin/Desktop/binaries/signtest.ipa'
Temporary Directory: '/tmp/eiJTk08At3' (will NOT be deleted on exit when verbose set)
+ /bin/cp -Rp /Users/admin/Desktop/signtest/signtest/build/Debug-iphonesimulator/signtest.app /tmp/eiJTk08At3/Payload
Program /bin/cp returned 0 : []
### Checking original app
+ /usr/bin/codesign --verify -vvvv /Users/admin/Desktop/signtest/signtest/build/Debug-iphonesimulator/signtest.app
Program /usr/bin/codesign returned 1 : [/Users/admin/Desktop/signtest/signtest/build/Debug-iphonesimulator/signtest.app: object file format unrecognized, invalid, or unsuitable
]
error: Codesign check fails : /Users/admin/Desktop/signtest/signtest/build/Debug-iphonesimulator/signtest.app: object file format unrecognized, invalid, or unsuitable
的重要组成部分,是在这里:
Program /usr/bin/codesign returned 1 : [/Users/admin/Desktop/signtest/signtest/build/Debug-iphonesimulator/signtest.app: object file format unrecognized, invalid, or unsuitable
]
error: Codesign check fails : /Users/admin/Desktop/signtest/signtest/build/Debug-iphonesimulator/signtest.app: object file format unrecognized, invalid, or unsuitable
我无法找到解决方案。
4.我已经做了 这是我已经尝试做的事情的列表。但是,如果你确定我已经尝试的东西是我的问题的解决方案,请一步一步写出如何做到这一点(也许我以前做错了什么)。
- That codesign returned 1 (object ifile format invalid or unsuitable) problem again - 在构建设置代码设置好的签名资源规则路径$(SDKROOT)/ResourceRules.plist
iPhone Codesign object file format invalid or unsuitable - - 加propsed行代码,在所有
- Xcode - Sharing app - PackageApplication failed with exit code 1没有影响调用命令
sudo的MV在/ usr/bin中/ codesign_allocate在/ usr/bin中/ codesign_allocate_old 须藤LN -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate在/ usr/bin中
5.我试图才达到 我试图生成与开发者证书签名,这样我就可以通过iTunes上传IPA文件来测试它的设备IPA文件。
6.从下面
我已经改变了构建命令行回应的答案:
xcodebuild联编-target signtest -configuration调试-sdk的iPhoneOS干净的构建
但现在我得到:
=== BUILD NATIVE TARGET signtest OF PROJECT signtest WITH CONFIGURATION Debug ===
Check dependencies
[BEROR]Code Sign error: Provisioning profile '94D99766-0268-4E0E-B8D1-053063BB2DA1' can't be found
** BUILD FAILED **
我已经在xcode中为此项目手动设置了配置文件。我仔细检查过,他们在那里。我在这里做错了什么?而且,当我使用连接的设备进行构建时,它一切正常,应用程序将在我的iPad上启动。
好的我已经将构建线更改为:xcodebuild -target signtest -configuration调试-sdk iphoneos clean build和现在我得到:=== BUILD NATIVE目标signtest项目signtest WITH CONFIGURATION调试=== 检查依赖关系 [BEROR] Code Sign error:配置文件'94D99766-0268-4E0E-B8D1-053063BB2DA1'找不到 ** BUILD FAILED **我检查了配置文件,它在那里。我已经在Xcode中配置了项目以使用此配置文件构建。我如何从命令行配置它? – Ertai 2011-12-16 10:41:52