Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我在后台模式下使用位置服务最小化我的应用程序时,我想隐藏在 iOS 设备上以蓝色显示在状态栏上的消息。
您可以使用requestAlwaysAuthorization而不是requestWhenInUseAuthorizationon CLLocationManager(并在 中提供相关NSLocationAlwaysUsageDescription,info.plist file)然后它也不会出现。
requestAlwaysAuthorization
requestWhenInUseAuthorization
CLLocationManager
NSLocationAlwaysUsageDescription
info.plist file)
看到这个答案
这是不可能的,因为 Apple 会提醒用户相应的应用程序在后台模式下使用他的位置。它与苹果的隐私政策有关。