Ios 如何解决';AllowsBackgroundLocationUpdate';颤振误差
当我运行我的Flatter应用程序时,我遇到了一些与位置设置相关的错误 错误1: /Users/mustafazaki/Downloads/flatter/.pub cache/hosted/pub.dartlang.org/location-3.2.4/ios/Classes/LocationPlugin.m:84:43: 注:将“AllowBackgroundLocationUpdate”附在@available复选框中 让这个警告安静下来 结果(self.clLocationManager.allowsBackgroundLocationUpdates?@1: @0); 错误2: /Users/mustafazaki/Downloads/flatter/.pub cache/hosted/pub.dartlang.org/location-3.2.4/ios/Classes/LocationPlugin.m:91:36: 警告:“SetAllowsBackgroundLocationUpdate:”仅在上可用 iOS 9.0或更新版本[-Wunguarded可用性] self.clLocationManager.allowsBackgroundLocationUpdates=启用 错误3: /Users/mustafazaki/Downloads/flatter/.pub cache/hosted/pub.dartlang.org/location-3.2.4/ios/Classes/LocationPlugin.m:92:36: 注:将“setShowsBackgroundLocationIndicator:”附在@available中 检查以使此警告静音 self.clLocationManager.showsBackgroundLocationIndicator=启用Ios 如何解决';AllowsBackgroundLocationUpdate';颤振误差,ios,flutter,dart,ios9,Ios,Flutter,Dart,Ios9,当我运行我的Flatter应用程序时,我遇到了一些与位置设置相关的错误 错误1: /Users/mustafazaki/Downloads/flatter/.pub cache/hosted/pub.dartlang.org/location-3.2.4/ios/Classes/LocationPlugin.m:84:43: 注:将“AllowBackgroundLocationUpdate”附在@available复选框中 让这个警告安静下来 结果(self.clLocationManager
尝试将此代码添加到ios->Runner->info.plist的
info.plist标签中
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Location permission</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Location permission</string>
<key>NSLocationUsageDescription</key>
<string>Location permission</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location permission</string>
n位置始终和何时使用说明
位置许可
N位置始终使用说明
位置许可
NSLocationUsageDescription
位置许可
NSLocationWhenUse用途说明
位置许可
停止应用程序,然后在终端中运行:
扑通
飞舞酒吧
飞跑