react-native套壳原生场景下无法引入react-native-amap3d的问题
问题1:最新版本react-native-amap3d未就此使用方式进行适配
解决方案:指定到最近稳定可用版本 3.1.1
问题2:ios podfile 未加入use_frameworks
再 ios/Podfile 下添加如下代码
target 'enterprise' do
use_expo_modules!
config = use_native_modules!
use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
pod 'expo-dev-launcher', path: '../node_modules/expo-dev-launcher', :configurations => :debug
pod 'expo-dev-menu', path: '../node_modules/expo-dev-menu', :configurations => :debug
...
end
问题3:需要同步原生和RN的地图库版本
解决方案:升级原生ios的地图包版本,并使用同一个定向版本