菜鸟教程小白 发表于 2022-12-11 17:30:56

ios - AppStore 拒绝 : use of private calls refers to my own methods


                                            <p><p>我收到以下拒绝消息:</p>

<blockquote>
<p>Your app uses or references the following non-public APIs:</p>

<ul>
<li>removeItems:, </li>
<li>setSelectedSection:</li>
<li>setIsNew:</li>
<li>selectedSection</li>
</ul>

<p>The use of non-public APIs is not permitted on the App Store because
it can lead to a poor user experience should these APIs change.</p>
</blockquote>

<p>查看代码,我发现<code>removeItems:</code>在Xcode Core Data代码生成器实现的一段代码中(我有一个叫做items的子结构)。</p>

<p><code>selectedSection</code> 和 <code>isNew</code> 是生成的核心数据代码中的属性。 </p>

<p>代码通过了上次部署。并且代码在两三周前通过了 beta 审查。</p>

<p>Apple 是否禁止在我的私有(private)代码中使用这些函数名称?还是目前存在误报的 AppStore 问题?</p>

<p>更新:我收到了 Apple App Review 团队的以下答复:</p>

<blockquote>
<p>Thank you for your response. For each of the selectors at issue, we
found the following occurrences: </p>

<p>... 4 method uses deleted ...</p>

<p>To clarify, these are not necessarily direct uses of non-public APIs,
but as your app does not have these statically defined, they are name
collisions with possible private selectors, and as such revision is
appropriate.</p>
</blockquote>

<p>最后一部分特别有趣:这是否意味着我不能再选择任何方法的名称,而不必担心 Apple 可能会提出相同的方法名称?或者,将其简化为一个 objc 问题:什么是“静态定义”? <code>static</code> C 方法?类方法? </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>拒绝的原因实际上是我使用了 Apple 决定引入的选择器作为私有(private)选择器。</p>

<p>这可能发生在任何时间,任何版本,除了应用审查(在撰写本文时)之外没有测试设施。 </p>

<p>看来苹果在这里改变了政策,早些时候他们只是发出警告,现在应用程序被拒绝了。</p>

<p>解决方案实际上很简单,但可能需要付出很大的努力。 </p>

<ul>
<li>重命名审核报告中列出的选择器</li>
<li>重命名与报告匹配的属性,以及核心数据中的动态属性。就我而言,所有报告的字段都是核心数据属性。这需要重命名数据库字段,因此我必须添加一个新的数据库架构版本并相应地重命名字段,并在启用自动迁移的情况下初始化数据库堆栈。</li>
</ul></p>
                                   
                                                <p style="font-size: 20px;">关于ios - AppStore 拒绝 : use of private calls refers to my own methods,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/39504260/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/39504260/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - AppStore 拒绝 : use of private calls refers to my own methods