xcode 如何解决应用验证“应用在 Payload/MyApp.app/MyApp 中引用非公共选择器:_setAlwaysRunsAtForegroundPriority:”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/54373661/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:53:53  来源:igfitidea点击:

How to resolve app validation "The app references non-public selectors in Payload/MyApp.app/MyApp: _setAlwaysRunsAtForegroundPriority:"?

iosxcodeionic3app-store

提问by Adam Cox

Just days ago I successfully upload Ionic app to Apple Store, and on this day I am receiving validation warning:

就在几天前,我成功地将 Ionic 应用程序上传到 Apple Store,这一天我收到了验证警告:

The app references non-public selectors in Payload/something.app/something: _setAlwaysRunsAtForegroundPriority:

该应用程序在 Payload/something.app/something 中引用了非公共选择器:_setAlwaysRunsAtForegroundPriority:

While I was unable to resolve, I was able to upload app to App Store.

虽然我无法解决,但我能够将应用程序上传到 App Store。

Does anyone know where it is documented or have any insights on how to resolve?

有谁知道它在哪里记录或对如何解决有任何见解?

Thanks.

谢谢。

回答by Duncan

Expanding on @Véger Lóránd answer:

扩展@Véger Lóránd 的回答:

The bug was re-introduced in the 4.1.1 version. Installing the latest version will get your app rejected. The solution for now is:

该错误在 4.1.1 版本中重新引入。安装最新版本将使您的应用程序被拒绝。目前的解决方案是:

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add [email protected]

回答by Véger Lóránd

I got a similar problem:

我遇到了类似的问题:

ITMS-90338: Non-public API usage - The app references non-public selectors in MyAppName: _setAlwaysRunsAtForegroundPriority:.

ITMS-90338:非公共 API 使用 - 应用程序引用 MyAppName 中的非公共选择器:_setAlwaysRunsAtForegroundPriority:。

And the issue was caused by the following plugin: cordova-plugin-ionic-webview

该问题是由以下插件引起的:cordova-plugin-ionic-webview

To solve the issue update to the latest version with the following commands:

要解决问题,请使用以下命令更新到最新版本:

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-ionic-webview@latest

You can read more about it here: https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/209

您可以在此处阅读更多相关信息:https: //github.com/ionic-team/cordova-plugin-ionic-webview/issues/209

回答by Dynamic Methods

This worked

这有效

The problem is related to webview.

问题与webview有关。

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-ionic-webview@latest

回答by Nasenbaer

rejected on Appstore now. July 3th 2019. Message:

现在在 Appstore 上被拒绝了。2019 年 7 月 3 日。消息:

We identified one or more issues with a recent delivery for your app, "appname. Please correct the following issues, then upload again. ITMS-90338: Non-public API usage - The app references non-public selectors in Sonnenbraeu: _setAlwaysRunsAtForegroundPriority:. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above ...

We identified one or more issues with a recent delivery for your app, "appname. Please correct the following issues, then upload again. ITMS-90338: Non-public API usage - The app references non-public selectors in Sonnenbraeu: _setAlwaysRunsAtForegroundPriority:. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above ...

I removed the complete line of _setAlwaysRunsAtForegroundPriority:as described above from code. Also the references to it. And yes, the app got released. BUT I don't know exactly the consequence of removing the property which sets the browser to foreground priority mode. I don't think its a good solution, its just a provisoric workaround to get released.

_setAlwaysRunsAtForegroundPriority:从代码中删除了如上所述的完整行。还有对它的引用。是的,该应用程序已发布。但我不知道删除将浏​​览器设置为前台优先模式的属性的确切结果。我不认为它是一个好的解决方案,它只是一个临时的解决方法来发布。

回答by fthkrtl

this is only security warning caused by webview. you can ignore

这只是由 webview 引起的安全警告。你可以忽略

回答by Supriya

ITMS-90338: Non-public API usage - The app references non-public selectors in XXXXXX: _setAlwaysRunsAtForegroundPriority:. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. If you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines, send the app's Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged, to [email protected].

ITMS-90338:非公共 API 使用 - 应用程序引用 XXXXXX 中的非公共选择器:_setAlwaysRunsAtForegroundPriority:。如果您的源代码中的方法名称与上面列出的私有 Apple API 匹配,则更改您的方法名称将有助于防止此应用在以后的提交中被标记。此外,请注意上述一个或多个 API 可能位于您的应用程序附带的静态库中。如果是这样,它们必须被移除。如果您认为此消息是错误发送的,并且您仅按照指南使用了 Apple 发布的 API,请将应用程序的 Apple ID 以及有关您认为上述 API 被错误标记的原因的详细信息发送至 appreview@apple .com。

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-ionic-webview@latest

科尔多瓦插件rmcordova-plugin-ionic-webviewcordova
插件添加cordova-plugin-ionic-webview@latest