Xcode 4.3.1 - 打包操作失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9664661/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 4.3.1 - Packaging operation failed
提问by Wert1go
Packaging operation failed - this message now showing while i try to make .ipa file for Ad Hoc distribution in Organizer
打包操作失败 - 当我尝试在 Organizer 中为 Ad Hoc 分发制作 .ipa 文件时,现在显示此消息
I checked certificates, checked project directories (after reading this)
我检查了证书,检查了项目目录(阅读本文后)
Xcode dont showing any errors or something similar. Log Navigator show no errors (only old warnings).
Xcode 不显示任何错误或类似的东西。日志导航器没有显示错误(只有旧警告)。
So here is question: anyone else encountered a similar problem? And if answer is positive any suggestion to solve problem?
所以这里有一个问题:其他人遇到过类似的问题吗?如果答案是肯定的,有什么解决问题的建议吗?
P.S.: in Xcode 4.2.1 all perfectly works
PS:在 Xcode 4.2.1 中一切正常
采纳答案by Samuel
I get the same problem.
我遇到同样的问题。
PNG files starting by ._ are not visible, even if you display hidden files in Finder (defaults write com.apple.finder AppleShowAllFiles 1 in Terminal) But if I browse my SVN folder using Versions app, I can see there are PNG files starting by ._
以 ._ 开头的 PNG 文件不可见,即使您在 Finder 中显示隐藏文件(默认在终端中写入 com.apple.finder AppleShowAllFiles 1)但是如果我使用 Versions 应用程序浏览我的 SVN 文件夹,我可以看到有 PNG 文件开始经过 。_
For each of these files, I opened it with Preview app, duplicated and re-saved with the same name, then I removed all the ._ files because they are no longer needed.
对于这些文件中的每一个,我使用预览应用程序打开它,复制并使用相同的名称重新保存,然后我删除了所有 ._ 文件,因为它们不再需要。
Now I can create an archive and distribute it through an IPA file.
现在我可以创建一个存档并通过 IPA 文件分发它。
I hope this will help you!
我希望这能帮到您!
回答by Nick
Occasionally this is caused during automatic resigning during packaging with a different distribution certificate. This can occur when you start a new project and you're building both dev and release builds with your Team Provisioning profile, then you create a distribution (ad hoc or otherwise) certificate for this specific bundle ID and attempt to sign the archive with that new certificate.
有时这是在使用不同的分发证书打包期间自动辞职期间引起的。当您开始一个新项目并且您正在使用您的 Team Provisioning 配置文件构建开发和发布版本时,可能会发生这种情况,然后您为此特定包 ID 创建分发(临时或其他)证书并尝试使用该证书对存档进行签名新证书。
The fix is to dig inside your build settings for the code signing identity and set the build release identity to the same distribution certificate that you're attempting to sign your archive with, either your ad hoc or app store certificate. You can leave debug builds as your team cert.
解决方法是挖掘代码签名身份的构建设置,并将构建发布身份设置为您尝试使用的同一分发证书,即您的临时或应用商店证书。您可以将调试版本保留为您的团队证书。
In the below example, the problem has been fixed. Use the build settings search box to look for the code signing identity. "Release" is probably set to "iOS Team Provisioning Profile" when it should be set to "iPhone Developer: Your Name" which is the same certificate you're trying to sign your archive with.
在下面的示例中,问题已得到解决。使用构建设置搜索框查找代码签名标识。当“发布”应该设置为“iPhone 开发人员:您的姓名”时,它可能设置为“iOS 团队配置文件”,这与您尝试使用的证书相同。
回答by Harin
I had same problem in my project (in xcode 4.3.2)And as per all ans I checked for any pngfile starting with "._*"and also checked folder and its subfolder are different name.
我在我的项目中遇到了同样的问题(在 xcode 4.3.2 中)并且根据所有答案,我检查了以“._*”开头的任何png文件,并且还检查了文件夹及其子文件夹的名称不同。
Also checked code signing identityas per requirement. But Not Succeeded to solve this problem.
还根据要求检查了代码签名身份。但是没有成功解决这个问题。
After hole days effort finally I got reason for "Packaging operation failed"error in my project.
经过几天的努力,我终于在我的项目中找到了“打包操作失败”错误的原因。
In my case,I have classed "About_us.h"and "About_us.m"and by mistake I import header file like #import "About Us.h"(white space in middle). So when I loaded app on Device it will successfully loaded but when I try to create ipausing archive its give me error and return me Estimated App Store Size just 143 kb.
就我而言,我已将“About_us.h”和“About_us.m”归为一类,并且错误地导入了#import“About Us.h”之类的头文件 (中间的空格)。因此,当我在设备上加载应用程序时,它将成功加载,但是当我尝试使用存档创建ipa 时,它会给我错误并返回给我估计的 App Store 大小仅为 143 kb。
Finally while I change header like #import "About_Us.h"and try to make ipaI got real size in proper MB.
最后,当我更改像#import "About_Us.h"这样的标题 并尝试制作ipa 时,我得到了正确的MB大小。
Hope this will help someone.
希望这会帮助某人。
回答by Taras Kalapun
I had this issue after copying my project on a flash drive with FAT filesystem. Suddenly there appeared a lot of "._" files. One of such files was in Settings.bundle. I removed these files running
将我的项目复制到具有 FAT 文件系统的闪存驱动器后,我遇到了这个问题。突然出现了很多“._”文件。其中一个文件位于 Settings.bundle 中。我删除了这些正在运行的文件
find . -name "._*" -exec rm -rf {} \;
回答by Phil Loden
Issue for me was that release Product Name was set twice under Build Settings:
对我来说问题是发布产品名称在构建设置下设置了两次:
ProductName
ProductName
instead of just ProductName. Interestingly, the newline caused issues for packaging, but nothing else.
而不仅仅是产品名称。有趣的是,换行符引起了包装问题,但没有其他问题。
回答by frank
In case some file has space in file name which will stop the rm process. use this command instead.
如果某些文件的文件名中有空格将停止 rm 进程。请改用此命令。
find . -name \._*.* | xargs -I{} rm -v {}
回答by sviftrup
I had a file that contained ^ in the terminal that was the problem.
我在终端中有一个包含 ^ 的文件,这是问题所在。
When looked at in Finder there was no visual clue that it was not labeled correctly. However when I tried to rename it, it failed.
在 Finder 中查看时,没有任何视觉线索表明它没有正确标记。但是,当我尝试重命名它时,它失败了。
回答by Jacque
I had the same issue in conjunction with a custom directory-icon. Those are stored as a hidden file (named Icon?) inside the affected folder.
我在使用自定义目录图标时遇到了同样的问题。这些文件作为隐藏文件(名为 Icon?)存储在受影响的文件夹中。
It's probably safe to assume that there is a bunch of desktop/fs-features and conventions which can lead to packaging problems.
假设有一堆桌面/fs 功能和约定可能会导致打包问题,这可能是安全的。
回答by sridvijay
I had an issue with my icons or atleast that's what I think. I had to delete the icons and delete the references in my info.plist file. Then after that magically, a option while selecting to distribute the app in the Xcode Organizer came up saying Don't Re-Sign, and after I did that BOOM! It worked! Good Luck for Future Visitors!
我的图标有问题,或者至少我是这么认为的。我不得不删除图标并删除 info.plist 文件中的引用。然后神奇的是,在选择在 Xcode Organizer 中分发应用程序时出现了一个选项,说不要重新签名,然后我做了那个 BOOM!有效!祝未来的游客好运!
回答by malaki1974
Same issues for me. No folder within a folder, no ._ files, no warnings or errors etc. Archives fine, but when I try to package with the organizer to adhoc it fails and says it is 9kb.
对我来说同样的问题。文件夹中没有文件夹,没有 ._ 文件,没有警告或错误等。存档很好,但是当我尝试与组织者打包时,它失败并说它是 9kb。