iosreact-nativecocoapodsreact-native-maps

React Native iOS pod install error - Error installing GoogleMaps


I am developing ios app using react native. When I run pod install, the installation stops with the following error.

Installing GoogleMaps (8.4.0) [!] Error installing GoogleMaps [!] /usr/bin/curl -f -L -o /var/folders/_s/b2y1_v7j23j5666ynpqqczd00000gn/T/d20241019-13159-23rzjl/file.tgz https://dl.google.com/dl/cpdc/bad57bdf1f06c544/GoogleMaps-8.4.0.tar.gz --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.15.2 cocoapods-downloader/2.1' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 1449 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 curl: (56) The requested URL returned error: 404

I think installing GoogleMaps because of react-native-maps package.

My react native version is 0.67.4 react version is 17.0.2 node version is 20.17.0 xcode version is 16.0


Solution

  • Check your Google Maps Api key.

    As you were getting a 404 error code that means it is unable to get the resources.

    Setup your Google API key

    1. Go to the Google Maps Platform.

      Google Maps Platform

    2. Go to the Credentials page

    3. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close.

    4. Ensure your Api key is restricted for specific platform.

    and follow this installation steps https://github.com/react-native-maps/react-native-maps/blob/HEAD/docs/installation.md