xcode 上传app到mac store时API分析过大
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21257597/
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
The resulting API analysis is too large when upload app to mac store
提问by arasa
I am going to upload my first mac app to Apple Store
我要上传我的第一个 Mac 应用程序到 Apple Store
And fixed all validation bugs of icon,category...
并修复了图标,类别的所有验证错误......
But after then I passed validation with warning :
但在那之后我通过了警告验证:
The resulting API analysis file is too large. We were unable to validate your API usage prior to delivery. This is just an informational message.
And my upload be rejected with the reason : "Invalid binary"
Is there anyone has experience of this case ?
我的上传被拒绝的原因是:“无效的二进制文件”
有没有人有这种情况的经验?
UPDATE : this warning is not the reason of rejecting, it maybe the app archiving problem. I successfully released my app to store.
更新:此警告不是拒绝的原因,可能是应用程序存档问题。我成功地发布了我的应用程序来存储。
So, we can safely ignore that.
所以,我们可以放心地忽略它。
采纳答案by lswank
Apple forbids using private or undocumented APIs in iOS apps. Any calls you make to methods that have the same name as private or undocumented API methods will be flagged as a private API use, even if the method being called is something you have defined yourself.
Apple 禁止在 iOS 应用程序中使用私有或未记录的 API。您对与私有或未记录的 API 方法同名的方法进行的任何调用都将被标记为私有 API 使用,即使被调用的方法是您自己定义的。
App Loader does an initial scan, checking for method names, instance variable access, and even @selector usage with private method names. App Loader doesn't always do a great job, and the more source files you have the more likely it is to give you the warning that the API analysis file it has generated is "too large".
App Loader 执行初始扫描,检查方法名称、实例变量访问,甚至@selector 使用私有方法名称。App Loader 并不总是做得很好,您拥有的源文件越多,就越有可能警告您它生成的 API 分析文件“太大”。
Fortunately, you can still submit your application, despite of the warning. Apple will check it internally, and if something gets kicked back because of overlapping names, you'll have to wade through the review process again.
幸运的是,尽管有警告,您仍然可以提交申请。Apple 将在内部对其进行检查,如果由于名称重叠而导致某些内容被退回,您将不得不再次通过审核流程。
Erika Sadun tried to make an app called API Kit that would do the scanning for you, but she appears to have abandoned her work and removed any trace of the application from her website.
Erika Sadun 试图制作一个名为 API Kit 的应用程序来为您进行扫描,但她似乎已经放弃了她的工作并从她的网站上删除了该应用程序的任何痕迹。
Chimp Studios created App Scannerto do the same thing, but it hasn't been updated since 2011. Unfortunately, for large projects -- and this includes projects with a lot of extra pods from CocoaPods -- there is no current (2014) good way of solving this problem other than proactively naming things such that they won't conflict with private API method and instance names.
Chimp Studios 创建了App Scanner来做同样的事情,但它自 2011 年以来一直没有更新。不幸的是,对于大型项目——这包括来自 CocoaPods 的大量额外 Pod 的项目——目前(2014 年)没有好的解决这个问题的方法,而不是主动命名事物,这样它们就不会与私有 API 方法和实例名称发生冲突。
You can proactively learn about Apple's Cocoa Naming Conventionsand try to anticipate. That will reduce future headaches. Until Apple introduces something like namespaces, however, we may continue to run into this problem from time to time.
您可以主动了解 Apple 的Cocoa 命名约定并尝试预测。这将减少未来的头痛。然而,在 Apple 引入命名空间之类的东西之前,我们可能会不时继续遇到这个问题。
The "invalid binary" error can come from a number of causes, but it is entirely unrelated to the API analysis document created by App Loader.
“无效二进制”错误可能有多种原因,但这与 App Loader 创建的 API 分析文档完全无关。
You should know that even with the scanning, there are still ways to get around the prohibition on using private/undocumented APIs. :)
您应该知道,即使进行了扫描,仍然有办法绕过禁止使用私有/未记录的 API 的限制。:)
回答by Richard
After hitting this issue for the first time on my first Swift project, it looks like the most common answer to this question is now:
在我的第一个 Swift 项目中第一次遇到这个问题后,现在这个问题的最常见答案似乎是:
If you use Swift 2.x and XCode 7, you'll get this error. Just ignore it.
如果您使用 Swift 2.x 和 XCode 7,您将收到此错误。只是忽略它。
[UPDATE: XCode 7.3 & iOS 9.3 rollout seems to have fixed this issue!]
[更新:XCode 7.3 和 iOS 9.3 的推出似乎已经解决了这个问题!]
回答by Mike Crawford
Here is an easy way to get around them... store the selector name in reverse, like "dlroWolleH", then reverse the string before you call the method.
这是绕过它们的一种简单方法……将选择器名称反向存储,例如“dlroWolleH”,然后在调用该方法之前反转字符串。
If Apple gets wise to that then you can encrypt them.
如果 Apple 对此很明智,那么您可以对它们进行加密。