菜鸟教程小白 发表于 2022-12-11 17:31:24

ios - 如何检查第三方库是否使用推送通知


                                            <p><p>当我为 TestFlight 上传我的应用程序时,我收到关于缺少推送通知权利的警告电子邮件。我不在我的应用程序中使用推送通知,我不想添加权利只是为了删除警告而不知道是什么原因造成的。</p>

<p>我认为它必须在我正在使用的库中。我将如何检查这个?我用谷歌搜索了一下,没有找到一个很好的方法来找出答案。</p>

<p>我试过 <code>grep "registerForRemoteNotificationTypes"-R .</code> 和 <code>grep "resgisterUserNotificationSettings"-R .</code>。
没有结果。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>对 <a href="https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9" rel="noreferrer noopener nofollow">Apple&#39;s notification dev page</a> 进行了一些挖掘吗?并想出了以下 grep:</p>

<p><code>grep "application:didRegisterForRemoteNotificationsWithDeviceToken:"-R Pods/</code></p>

<p>在 Firebase Analytics 和 Firebase InstanceID 二进制文件中获得点击。因此,即使我没有使用 Firebase 消息传递,它看起来像 Firebase/Core 和 Firebase/Analytics 使用推送通知。 </p>

<p>所以回答我自己的问题:</p>

<p><strong>在您的 Pod 文件夹中搜索“通知”并从那里缩小搜索范围。</strong>但请注意不要误导您这样做。如前所述<a href="https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingLocalAndPushNotifications.html#//apple_ref/doc/uid/TP40011195-CH3-SW1" rel="noreferrer noopener nofollow">here</a> :</p>

<blockquote>
<p>Note: Push notifications have no functional connection to broadcast notifications or key-value observing notifications.</p>
</blockquote></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何检查第三方库是否使用推送通知,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/39520229/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/39520229/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何检查第三方库是否使用推送通知