菜鸟教程小白 发表于 2022-12-12 14:40:09

IOS后台位置info.plist键名


                                            <p><p>在 IOS 上,当请求位置权限时始终打开,一段时间后,系统会向用户提示一个对话框,说 <code>应用程序在后台使用什么位置</code> 或类似的东西。</p >

<p>如何更改此对话框的描述?
是其中之一吗?</p>

<pre><code>    &lt;key&gt;NSLocationWhenInUseUsageDescription&lt;/key&gt;
    &lt;key&gt;NSLocationAlwaysUsageDescription&lt;/key&gt;
    &lt;key&gt;NSLocationAlwaysAndWhenInUseUsageDescription&lt;/key&gt;
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><pre><code>    &lt;key&gt;NSLocationAlwaysUsageDescription&lt;/key&gt;
    &lt;string&gt;This string is required to gain permission to access location services on iOS 8+ when the app in the background and should describe how your app uses location services. Set this string in the Info.plist&lt;/string&gt;
    &lt;key&gt;NSLocationUsageDescription&lt;/key&gt;
    &lt;string&gt;This string is optional but recommended on iOS 6 &amp;amp; 7 and should describe how your app uses location services. Set this string in the Info.plist&lt;/string&gt;
    &lt;key&gt;NSLocationWhenInUseUsageDescription&lt;/key&gt;
    &lt;string&gt;This string is required to gain permission to access location services on iOS 8+ and should describe how your app uses location services. Set this string in the Info.plist&lt;/string&gt;
    &lt;key&gt;NSLocationAlwaysAndWhenInUseUsageDescription&lt;/key&gt;
    &lt;string&gt;This string is required to gain permission to access location services on iOS 11+ and should describe how your app uses location services. Set this string in the Info.plist&lt;/string&gt;
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于IOS后台位置info.plist键名,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/50839830/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/50839830/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: IOS后台位置info.plist键名