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一旦设置setLocatingWithReGeocode(true) getCurrentPosition就无法获取定位,按照网友的提示做如下操作也不行 #169

Closed
inkcrazy666 opened this issue Apr 21, 2023 · 3 comments

Comments

@inkcrazy666
Copy link

  • (void)amapLocationManager:(AMapLocationManager *)manager
    didFailWithError:(NSError *)error {
    // [self sendEventWithName:@"AMapGeolocation"
    // body:@{
    // @"errorCode" : @(error.code),
    // @"errorInfo" : error.localizedDescription,
    // }];
    }
@inkcrazy666
Copy link
Author

inkcrazy666 commented Apr 21, 2023

我用了隔壁的库react-native-amap-geolocation里面给了我报错信息,INVALID_USER_SCODE=3,然后发现是我后台应用配置的bundle identifier不一样导致的

@inkcrazy666
Copy link
Author

刚才把库装回来,跑一下还是不行哎😂

@inkcrazy666
Copy link
Author

inkcrazy666 commented Jun 26, 2023

react-native:0.68.5可以的,到时候再试试"react-native": "0.63.5",注意配置 iOS 的定位权限,特别是 iOS14 的:https://lbs.amap.com/api/ios-location-sdk/guide/create-project/permission-description#s4

react-native:0.63.5的项目也跑起来了。定位有问题对照着报错code很快解决了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant