蓝色横幅“您的应用正在使用您的位置”退出我的应用后没有显示 [英] Blue banner "Your app is using your location" is not showing after exiting my app

查看:687
本文介绍了蓝色横幅“您的应用正在使用您的位置”退出我的应用后没有显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在后台模式下使用核心位置,当应用程序处于后台模式并定期发送GPS坐标时,蓝色横幅您的应用正在使用您的位置未显示(例如谷歌地图应用)。
我可能错过了什么?

My application is using core location in background mode, when app is in background mode and sending GPS coordinates periodically, the blue banner "Your app is using your location" is not showing (like google map app for example). Any idea of what I could have missed ?

推荐答案

要显示蓝条,你应该

 1: enable Background Location Updates  in target Capabilities . 

   Then set locationManager allowsBackgroundLocationUpdates to YES;

 2: Add NSLocationWhenInUseUsageDescription in plist file (8.0+ ask for locaiton)
   Then call requestWhenInUseAuthorization method not requestAlwaysAuthorization method

这篇关于蓝色横幅“您的应用正在使用您的位置”退出我的应用后没有显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆