iOS 如何在应用程序使用后台定位服务时隐藏状态栏消息

How to hide status bar message when app is using background location services in iOS

当我在后台模式下使用定位服务最小化我的应用程序时,我想在 iOS 设备上以蓝色隐藏状态栏上显示的消息。

这是不可能的,因为 Apple 提醒用户各个应用程序在后台模式下使用他的位置。它涉及苹果的隐私政策。

您可以在CLLocationManager上使用requestAlwaysAuthorization代替requestWhenInUseAuthorization(并在info.plist file)中提供相关的NSLocationAlwaysUsageDescription,则不会出现要么。

See this answer