Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何解决';AllowsBackgroundLocationUpdate';颤振误差_Ios_Flutter_Dart_Ios9 - Fatal编程技术网

Ios 如何解决';AllowsBackgroundLocationUpdate';颤振误差

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

当我运行我的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->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用途说明
位置许可
停止应用程序,然后在终端中运行:

  • 扑通
  • 飞舞酒吧
  • 飞跑