xcode 您的应用包含非公开 API 使用 - 提交应用

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

Your app contains non-public API usage - submit app

iosxcodesubmitapp-store-connect

提问by Katerina

I am trying to submit an application to Itunes connect with XCode. I get this:

我正在尝试向使用 XCode 连接的 Itunes 提交应用程序。我明白了:

Your app contains non public API usage. Please review the errors, correct them and resubmit your application. The app references non-public selectors in Payload/myapp.app/setSoundsEnabled:

您的应用包含非公开 API 使用。请检查错误,纠正它们并重新提交您的申请。该应用程序引用 Payload/myapp.app/setSoundsEnabled 中的非公共选择器:

What should I do?

我该怎么办?

回答by Rumin

I got the similar issue once. These errors take place because of the old SDK of some third party frameworks that implements "setSoundsEnabled" method. In order to remove these errors, you need to follow the following steps:

我曾经遇到过类似的问题。这些错误的发生是由于某些第三方框架的旧 SDK 实现了“setSoundsEnabled”方法。为了消除这些错误,您需要按照以下步骤操作:

  1. Open the terminal window. Run the following command:

    cd (drag and drop your project folder here) Your_Project_Path
    

    Now, the current working directory will be your project folder.

  2. Find all the SDK that uses "setSoundsEnabled" method using following commands:

    $ find . | grep -v .svn | grep "\.a" | grep -v "\.app" | xargs grep setSoundsEnabled
    

    and

    grep -lr "setSoundsEnabled" * | grep -v .svn | grep -v .md
    
  3. After getting the list of frameworks, search for the frameworks that MATCHESthe query. Upgrade those frameworks.

  4. Re-validate the app.

  1. 打开终端窗口。运行以下命令:

    cd (drag and drop your project folder here) Your_Project_Path
    

    现在,当前工作目录将是您的项目文件夹。

  2. 使用以下命令查找所有使用“setSoundsEnabled”方法的 SDK:

    $ find . | grep -v .svn | grep "\.a" | grep -v "\.app" | xargs grep setSoundsEnabled
    

    grep -lr "setSoundsEnabled" * | grep -v .svn | grep -v .md
    
  3. 获取框架列表后,搜索与查询匹配的框架。升级这些框架。

  4. 重新验证应用程序。

回答by iMemon

Double check any third-party libraries you are using in your project

仔细检查您在项目中使用的任何第三方库

I was facing the issue and after checking my pods file, I found that Look Back - Framworkwhich is available for debug builds only as for as I know. So removing that fixed the issue. Successfully submitted app through Xcode 6.1 for Apple Testflight beta testing :)

我遇到了这个问题,在检查了我的 pods 文件后,我发现Look Back - Framwork仅就我所知可用于调试版本。所以删除它解决了这个问题。已通过 Xcode 6.1 成功提交应用程序进行 Apple Testflight beta 测试 :)