You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
将解压得到的 AMapFoundationKit.framework 和 AMapLocationKit.framework 以及 ExternalAccessory.framework 添加到 Build Phases ➜ Link Binary With Libraries。
添加权限申请
在 iOS 项目的 Info.plist 添加定位权限申请。
——————————————————————————————————————————
——————————————————————————————————————————
完成后,把原先podfile中’pod 'react-native-amap-geolocation', path: '../node_modules/react-native-amap-geolocation/lib/ios'‘去掉
运行后报错,错误为:clang: error: no such file or directory: '/Users/yindong/ReactNativeProject/wdlj/wdljApp/node_modules/react-native-amap-geolocation/lib/ios/RCTGeolocationModule.m' 这是原先类库的iOS原生交互的Module,将此文件删掉。
还有可能遇到library not found 'lreact-native-amagelocation' 或者 ld: library not found for -ljcore-ios。
The text was updated successfully, but these errors were encountered:
**为了节省大家的时间,请尽可能详细地说明问题,并最好提供截图(特别是出错信息)。**0.3.2版本升级到1.0.4后xCode编译出错,出现很多包的错误,经过一下午的折腾,终于好了,总结下来。
1:react-native link对iOS不起作用。需要手动操作,按照文档
——————————————————————————————————————————
——————————————————————————————————————————
Project navigator ➜ 右击 Libraries ➜ 选择 Add Files to "XXXX"...
选择并添加 node_modules/react-native-amap-geolocation/lib/ios/AMapGeolocation.xcodeproj (或从文件浏览器里将该文件拖拽到 Libraries)
Build Phases ➜ Link Binary With Libraries 中选择并添加 libAMapGeolocation.a
iOS 项目的额外配置
对于 iOS 项目无论如何还要手动下载 SDK 并进行一些必要的配置,也可以参考官方文档: 手动部署。
下载 iOS SDK
从官方网站下载 基础 SDK(含 IDFA) 和 定位 SDK 并解压到 ios/ (注意 *.framework 文件必须放到 ios/ 目录,一定要放到其他目录请自行设置 AMapGeolocation.xcodeproj 的 Search Path)。
将解压得到的 AMapFoundationKit.framework 和 AMapLocationKit.framework 以及 ExternalAccessory.framework 添加到 Build Phases ➜ Link Binary With Libraries。
添加权限申请
![image](https://user-images.githubusercontent.com/16173466/64157279-01499c00-ce69-11e9-9618-b34602aac926.png)
![image](https://user-images.githubusercontent.com/16173466/64157390-38b84880-ce69-11e9-8bb4-9acf7417550e.png)
在 iOS 项目的 Info.plist 添加定位权限申请。
——————————————————————————————————————————
——————————————————————————————————————————
完成后,把原先podfile中’pod 'react-native-amap-geolocation', path: '../node_modules/react-native-amap-geolocation/lib/ios'‘去掉
运行后报错,错误为:clang: error: no such file or directory: '/Users/yindong/ReactNativeProject/wdlj/wdljApp/node_modules/react-native-amap-geolocation/lib/ios/RCTGeolocationModule.m' 这是原先类库的iOS原生交互的Module,将此文件删掉。
还有可能遇到library not found 'lreact-native-amagelocation' 或者 ld: library not found for -ljcore-ios。
The text was updated successfully, but these errors were encountered: