我在 iOS 中安装谷歌地图时出现错误,以响应本机版本 0.71.6

问题描述 投票:0回答:0
  1. 我通过命令“npm i react-native-maps”安装谷歌地图模块。

  2. 在 AppDelegate.m(m) 中,在页面顶部添加“#import ”。

  3. Add "[GMSServices provideAPIKey:@"YOUR_API_KEY"];"在“(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {”之后

  4. 将部署目标更改为“13.0”

  5. 之后我添加

    React Native Maps 依赖项

    仅当在没有 rosetta 的 Apple silicon Mac 上构建时才需要以下行。

    pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/Simon-TechForm/google-maps-ios-utils.git', :branch => 'feat/support-apple-silicon'
    

    rn_maps_path = '../node_modules/react-native-maps' pod 'react-native-google-maps', :path => rn_maps_path

在“use_native_modules”上方的 Podfile 中 6. 然后运行“pod install”

我收到错误消息“CocoaPods 找不到 pod“react-native-google-maps”的兼容版本”

这里是一些截图

AppDelegate.m(m)

Podfile

deployment target

Issue

我正在尝试解决这个问题,但我做不到。

react-native-maps
© www.soinside.com 2019 - 2024. All rights reserved.