强制 iPhone 上的位置限制

发布于 2024-09-11 07:48:48 字数 170 浏览 2 评论 0原文

如果在您的应用程序中使用 CLLocationManager,第一次进行位置更新时,它会向用户弹出一个问题,请求使用位置服务的权限。

现在,我的应用程序使用位置,但不是在应用程序生命周期的开始以及用户未使用手机时使用位置。所以我想我必须从一开始就得到津贴。我认为没有办法“强迫”这个问题。你会如何建议我这样做?

If using CLLocationManager in your app, the first time a location update is made it will pop a question to the user asking for permission to use the location service.

Now my app uses location, but not in the beginning of the app life cycle and when the user is not active with the phone. So I figure I have to get the allowance right from start. I don't think there is a way to "force" the question. How would you suggest me to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光与爱终年不遇 2024-09-18 07:48:48

继续尝试通过启动和停止位置更新来访问启动时的位置信息。这相当于“强行”提问。

Go ahead and attempt to access location information on launch by starting and stopping location updates. This is equivalent to "forcing" the question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文