Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

要在iOS 11及以上版本使用后台定位服务, 需要实现amapLocationManager:doRequireLocationAuth: 代理方法 #6

Closed
stack-info opened this issue Nov 1, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@stack-info
Copy link

stack-info commented Nov 1, 2019

插件版本
0.2.5
描述bug
fluttify-objc: AMapLocationManager@105553150849024::requestLocationWithReGeocode(暂未实现参数打印)
[AMapLocationKit] 要在iOS 11及以上版本使用后台定位服务, 需要实现amapLocationManager:doRequireLocationAuth: 代理方法

@yohom yohom added the bug Something isn't working label Nov 2, 2019
@yohom
Copy link
Member

yohom commented Nov 6, 2019

@syncio 可否提供一下复现步骤?

@yohom yohom added question Further information is requested and removed question Further information is requested labels Nov 6, 2019
@yohom
Copy link
Member

yohom commented Nov 8, 2019

@syncio 0.2.7版本,已经添加requireAlwaysAuth方法,可以在需要的地方调用这个方法申请后台定位权限。

@yohom yohom closed this as completed Nov 8, 2019
@feicong666
Copy link

我的也出现了这个问题,调用requireAlwaysAuth之后 还是出现报错

调用:
try {
AmapLocation.requireAlwaysAuth().then((data){
Timer.periodic(Duration(milliseconds: 30000), (t){
getLocation();
});
});
} catch(error) {}

报错:
flutter: Overflow on channel: flutter/lifecycle. Messages on this channel are being discarded in FIFO fashion. The engine may not be running or you need to adjust the buffer size if of the channel.
flutter: fluttify-dart: AMapServices::sharedServices([])
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The method 'set_delegate' was called on null.
Receiver: null
Tried calling: set_delegate(Instance of '_IOSLocationDelegate')
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 AmapLocation.requireAlwaysAuth.
package:amap_location_fluttify/…/dart/amap_location.dart:146

#2 platform
package:foundation_fluttify/…/function/functions.dart:44

#3 AmapLocation.requireAlwaysAuth
package:amap_location_fluttify/…/dart/amap_location.dart:140
#4 _MainWebviewFWPState.initState
package:flutter_gr/main-webview-fwp.dart:64
#5 StatefulElement._firstBuild
package:flutter/…/widgets/framework.dart:4085
#6 ComponentElement.mount
package:flutter/…/widgets/framework.dart:3936
#7 Element.inflateWidget
package:flutter/…/widgets/framework.dart:3109
#8 Element.updateChild (package:<…>

@feicong666
Copy link

@yohom 麻烦作者看看呢

@mzF414
Copy link

mzF414 commented Nov 29, 2019

requireAlwaysAuth 可否把这个方法的调用也加到demo中呢? @yohom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants