真是的坑,弄这个弄了好几天都没有弄好,就要在放弃的时候终于好了
先参照这个https://github.com/best-flutter/flutter_amap_location/issues/42,结果照搬代码还是不可以,模拟器上面闪退,真机的上面在xcode日志里面报这个
然后又参照的这个https://blog.csdn.net/jia12216/article/details/90372345
查询出在哪里用到了,在查找到的第一个文件里面加入下面的代码
- (void)amapLocationManager:(AMapLocationManager *)manager doRequireLocationAuth:(CLLocationManager*)locationManager
{
[locationManager requestAlwaysAuthorization];
}
谢天谢地,经纬度终于获取到了