【问题标题】:The app references non-public selectors in Payload/<Appname>.app/<App name>: FailWithError: , topMostAlert该应用在 Payload/<Appname>.app/<App name> 中引用了非公共选择器:FailWithError: , topMostAlert
【发布时间】:2014-04-08 19:21:48
【问题描述】:

在 Apple Application Uploader 上出现此错误:

The app references non-public selectors in Payload/&lt;Appname&gt;.app/&lt;App name&gt;: FailWithError: , topMostAlert.

我在我的代码中搜索了FailWithError:topMostAlert。 我没有在我的代码中找到这些,除了 topMostAlert 用于解雇 UIAlertView

Class UIAlertManager = NSClassFromString(@"_UIAlertManager");
UIAlertView *alertView = [UIAlertManager performSelector:@selector(topMostAlert)];
[alertView dismissWithClickedButtonIndex:0 animated:NO];

我知道此错误是因为在您自己的代码或第三方代码中使用了与标记为非公共(Apple 提供的 API)的选择器同名的选择器。

我正在添加我的代码中使用的框架的屏幕截图。

【问题讨论】:

    标签: ios objective-c


    【解决方案1】:

    您被拒绝了,因为您使用的是私有类 UIAlertManager(通过 _UIAlertManager)。更改您的代码,使其仅使用公共APIs,它将通过审核过程。

    【讨论】:

    • 我也想通了谢谢。我实际上想在显示新的 UIAlertView 之前关闭以前的 UIAlertView。这样以前的就不存在了。在 ios7 我们可以通过 UIAlertManager 做到这一点。
    • topMostAlert 问题已解决,但 Apple 仍显示警告 The app references non-public selectors in Payload/&lt;Appname&gt;.app/&lt;App name&gt;: FailWithError: 现在发出警告。
    • 忽略警告。没什么。这只是意味着您的方法之一与 Apple 的名称相同。
    • 如果我想找到那行怎么办?我想折射它。
    • 在您的项目中进行文本搜索。记得打开搜索链接的框架。
    猜你喜欢
    • 2013-11-17
    • 2014-04-17
    • 2013-10-23
    • 2013-10-10
    • 1970-01-01
    • 2013-09-22
    • 2014-10-28
    • 1970-01-01
    相关资源
    最近更新 更多