简体   繁体   English

尝试临时分发iOS应用时出现OSStatus错误100021

[英]Getting OSStatus error 100021 when trying to ad hoc distribute ios app

OSStatus错误100021

Im getting this awful and weird error when having selected an ad hoc distribution certificiate in Xcode in the Distribute for Ad Hoc section. 在“为Ad Hoc分发”部分中的Xcode中选择了一个Ad hoc分发证书时,我收到了这个可怕的怪异错误。 Anyone know how to fix this error? 有人知道如何解决此错误吗? :-) :-)

Thanks! 谢谢!

I just fixed the same error in my project. 我只是在项目中修复了相同的错误。 I'll explain the fix, and I'd love to know if it helps. 我将解释此修复程序,我很想知道它是否有帮助。

I had just added the YAJL library to my iOS project. 我刚刚将YAJL库添加到了我的iOS项目中。 The problem was that I had followed the Mac OS X instructions, rather than the iOS. 问题是我遵循的是Mac OS X的说明,而不是iOS。 The Mac OS X instructions include the creation of a Copy Files Build Phase, that copies the YAJL.framework/ folder to the .app bundle. Mac OS X的说明包括创建“复制文件”构建阶段,该阶段将YAJL.framework /文件夹复制到.app捆绑包中。

This is a huge mistake. 这是一个巨大的错误。 在此输入图像描述

Now, what does a framework folder look like inside? 现在,框架文件夹在内部看起来像什么? It looks like this: 它看起来像这样:

在此输入图像描述

See those symbolic links? 看到那些符号链接了吗? (The files with the curvy arrows) They are the culprits. (带有弯曲箭头的文件)是罪魁祸首。 Delete all of those out of the .app folder, and I was able to save the .ipa file with no trouble at all. 从.app文件夹中删除所有这些文件,这样我就可以毫无问题地保存.ipa文件。 Actually, you don't need the .framework/ folder in the app bundle at all. 实际上,您完全不需要应用程序捆绑包中的.framework /文件夹。 That should be compiled into the binary. 那应该编译成二进制文件。

So, check your .app file. 因此,请检查您的.app文件。 Are there any weird folders that don't need to be there? 是否有不需要的怪异文件夹? Are there any symbolic links hanging around? 是否存在任何符号链接?

I had the same issue, but in the Mac world. 我遇到了同样的问题,但是在Mac世界中。 It turns out that removing the symbolic links is only tricking the archive tool, and it doesn't really produce a valid result. 事实证明,删除符号链接只是在欺骗存档工具,实际上并不会产生有效的结果。 This error usually happens if one of your embedded frameworks has a bad Info.plist file. 如果您的一个嵌入式框架的Info.plist文件错误,通常会发生此错误。

But yes, in an iOS app you can't have embedded frameworks so you should be linking against a static library. 但是,是的,在iOS应用中,您不能具有嵌入式框架,因此您应该针对静态库进行链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM