菜鸟教程小白 发表于 2022-12-13 10:17:08

ios - 将新版本上传到 iTunes 后,我收到推送通知权利问题


                                            <p><blockquote>
<p>We have discovered one or more issues with your recent delivery for
&#34;Name of app&#34;. Your delivery was successful, but you may wish to
correct the following issues in your next delivery:</p>

<p>Missing Push Notification Entitlement - Your app appears to include
API used to register with the Apple Push Notification service, but the
app signature&#39;s entitlements do not include the &#34;aps-environment&#34;
entitlement. If your app uses the Apple Push Notification service,
make sure your App ID is enabled for Push Notification in the
Provisioning Portal, and resubmit after signing your app with a
Distribution provisioning profile that includes the &#34;aps-environment&#34;
entitlement. See &#34;Provisioning and Development&#34; in the Local and Push
Notification Programming Guide for more information. If your app does
not use the Apple Push Notification service, no action is required.
You may remove the API from future submissions to stop this warning.
If you use a third-party framework, you may need to contact the
developer for information on removing the API.</p>

<p>After you’ve corrected the issues, you can use Xcode or Application
Loader to upload a new binary to iTunes Connect.</p>

<p>Regards,</p>

<p>The App Store team</p>
</blockquote>

<p>这里的主要信息</p>

<blockquote>
<p>If your app uses the Apple Push Notification service</p>
</blockquote>

<p>但我没有添加任何推送通知 API 方法。</p>

<p>如何检查哪个库使用了推送通知方法或框架?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>这是 Apple 验证软件中的错误。你可以忽略它。</p>

<p>来自 <a href="https://forums.developer.apple.com/thread/15011" rel="noreferrer noopener nofollow">https://forums.developer.apple.com/thread/15011</a> :</p>

<blockquote>
<p>I investigated this issue in MachO View to confirm it&#39;s a
false-positive.</p>

<p>I could see that in AppDelegate.o - while there are no references to application:didRegisterForRemoteNotificationsWithDeviceToken: in the symbol table..</p>
</blockquote>

<pre><code>$ nm ./AppDelegate.o | grep    application:didRegisterForRemoteNotificationsWithDeviceToken
$
</code></pre>

<blockquote>
<p>I did find the grep output matching, as confirmed in other commenters&#39; reports.</p>
</blockquote>

<pre><code>$ grep application:didRegisterForRemoteNotificationsWithDeviceToken ./AppDelegate.o
Binary file ./AppDelegate.o matches
</code></pre>

<blockquote>
<p>I loaded the binary into MachO View (see screenshot below) and found application:didRegisterForRemoteNotificationsWithDeviceToken:, application:didFailToRegisterForRemoteNotificationWithError: and ALL OF THE OTHER UIApplicationDelegate methods - in the __TEXT segment, __objc_methname section - the list of c string literals that store objc selector names</p>

<p>MachO View Screenshot of __TEXT,__objc_methname section with list of UIApplicationDelegate methods:
<a href="http://imgur.com/JXgCjjm" rel="noreferrer noopener nofollow">http://imgur.com/JXgCjjm</a></p>

<p>I confirmed this finding with otool here:</p>
</blockquote>

<pre><code>$ otool -v -s __TEXT __objc_methname ./AppDelegate.o| grep didRegisterForRemoteNotificationsWithDeviceToken
000000000000bfbbapplication:didRegisterForRemoteNotificationsWithDeviceToken:
</code></pre>

<blockquote>
<p>iTunes&#39;s review process is strings-based, not nm-based, so their simple grep for didRegisterForRemoteNotificationsWithDeviceToken will always register a false positive.</p>
</blockquote></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 将新版本上传到 iTunes 后,我收到推送通知权利问题,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/32373584/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/32373584/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 将新版本上传到 iTunes 后,我收到推送通知权利问题