菜鸟教程小白 发表于 2022-12-13 02:12:57

ios - 如何在设置中仅显示从不/始终位置权限并在使用应用程序时隐藏?


                                            <p><p>在<strong>设置</strong>> 我的应用> <strong>位置</strong>,用户可以选择</p>

<pre><code> - never
- While using the App
- Always
</code></pre>

<p>但我只想拥有:</p>

<pre><code> - never
- Always
</code></pre>

<p>我知道其他应用也这样做了,那么如何删除 While using the App 选项?</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>您可以通过在 Info.plist 中仅添加 <code>NSLocationAlwaysUsageDescription</code> 来实现此目的</p>

<p> <a href="/image/wZ9yL.png" rel="noreferrer noopener nofollow"><img src="/image/wZ9yL.png" alt="enter image description here"/></a> </p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何在设置中仅显示从不/始终位置权限并在使用应用程序时隐藏?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/45173000/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/45173000/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何在设置中仅显示从不/始终位置权限并在使用应用程序时隐藏?