gpt4 book ai didi

xcode4 - Xcode 4.1 - 归档应用程序给了我 Entitlments.plist 错误

转载 作者:行者123 更新时间:2023-12-01 04:09:32 26 4
gpt4 key购买 nike

我正在使用 Xcode 4.1 和 MacOSX Lion 10.7。我正在尝试存档我的 Mac 应用程序,以便我可以将我的应用程序上传到 iTunes 连接,但它给了我这个错误:

ProcessProductPackaging/Developer/Platforms/MacOSX.platform/Entitlements.plist/Users/username/Library/Developer/Xcode/DerivedData/appname/Build/Intermediates/appname.build/Debug/appname.build/appname.xcent
cd "/Volumes/Apps/iOS/Mac 应用商店/应用名称"
builtin-productPackagingUtility/Developer/Platforms/MacOSX.platform/Entitlements.plist -entitlements -format xml -o/Users/username/Library/Developer/Xcode/DerivedData/appname/Build/Intermediates/appname.build/Debug/appname.build/appname.xcent

错误:读取属性列表时出错'/Developer/Platforms/MacOSX.platform/Entitlements.plist' - 属性列表没有对象
命令 builtin-productPackagingUtility 失败,退出代码为 1

如果我不签署代码,则不会发生此错误。在升级到 Xcode 4.1 之前,我能够正确提交我的应用程序。我似乎找不到任何关于如何在 xcode 4 中签署应用程序的文档,而且我不知道新的 Enable entitlements 和 sandbox 的作用。

当我以某种方式让它工作时,我从 iTunes 收到这封电子邮件,并出现以下错误:
无效的代码签名权利 - 您的应用程序包签名中的权利与配置文件中包含的权利不匹配:

根据配置文件,捆绑包包含一个不允许的键值:appname.app/Contents/MacOS/appname 中键“com.apple.application-identifier”的“appname”

我需要做什么才能将我的应用程序正确提交到 iTunes Connect?

最佳答案

事实证明,如果您使用的是 2010 年 6 月之后生产的新 Macbook,则打包应用程序会出现问题。要打包您的应用程序,请执行以下步骤:

1) 构建和归档

2) 打开管理器 - 文件,找到新的文件。

3)右键单击存档“在Finder中显示”

4)右键单击查找器中的存档以“显示包内容”

5) 深入到您的应用程序 (>Products/Applications/YourApp)

6)右键单击您的应用程序,“显示包内容”

7)删除_CodeSignature目录

8) 编辑 Info.plist

 a) Change BuildMachineOSBuild to "11A511"

b) Save, close

9)回到finder中的Products/Applications/YourApp目录

10) 打开钥匙串(keychain)访问.app
 a) Find your certificate "3rd Party Mac Developer Application: Your Name"

b) double click to inspect it

c) Copy the full Common Name "3rd Party Mac Developer Application: Your Name"

11) 打开终端并输入以下内容:
 codesign -s "<paste your cert common name here>" -fv <drag the archived app from the finder to the terminal window here>

12)验证输出:
 "...path to app...: replacing invalid existing signature"

"...path to app...: signed bundle with Mach-O universal (i386 x86_64)"

13) 关闭所有这些窗口。

14) 打开管理器 - XCode 中的文件

15)验证......是的。

16)提交......耶!

关于xcode4 - Xcode 4.1 - 归档应用程序给了我 Entitlments.plist 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7106186/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com