react-native-maps: 'GMUKMLParser.h' file not found AIRGoogleMap.m while building myProject on my Iphone with XCode

Is this a bug report?

Yes

Have you read the Installation Instructions?

Yes

Environment

"react": "^16.3.0-alpha.1",
"react-native": "0.54.0",
"react-native-maps": "github:react-community/react-native-maps"

Steps to Reproduce

$ npm install -g react-cli
$ react-cli init myProject
$ cd myProject
$ npm install
$ npm install react-native-maps --save 
$ cd ios/
$ vim Podfile // Podfile from docs/installation.md
$ pod install
$ vim App.js 
$ react-native run-ios
// App.js

import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import MapView from 'react-native-maps';

export default class App extends Component {
  constructor(props) {
    super(props);

    this.state = {
      latitude: null,
      longitude: null,
      error: null,
    };
  }

  componentDidMount() {
    navigator.geolocation.getCurrentPosition(
      (position) => {
        console.log(position);
        const { accuracy, altitude, altitudeAccuracy, heading, latitude, longitude, speed } = position.coords;
        this.setState({
          accuracy,
          altitude,
          altitudeAccuracy,
          heading,
          latitude,
          longitude,
          speed,
          error: null,
        });
      },
      (error) => this.setState({ error: error.message }),
      { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 },
    );
  }

  render() {
    const { region } = this.props;
    const { latitude, longitude } = this.state;
    console.log('region', region);
    return (
      <View style ={styles.container}>
        <MapView
          style={styles.map}
          region={{
            latitude: latitude || 37.78825,
            longitude: longitude || -122.4324,
            latitudeDelta: 0.015,
            longitudeDelta: 0.0121,
          }}
        >
        </MapView>
      </View>
    );
  }
}


const styles = StyleSheet.create({
  container: {
    ...StyleSheet.absoluteFillObject,
    flex: 1,
    width: 400,
    justifyContent: 'flex-end',
    alignItems: 'center',
  },
  map: {
    ...StyleSheet.absoluteFillObject,
  },
});

$ react-native run-ios. // The app builds correctly on the simulator

  • Using XCode to build it on my Iphone.

Expected Behavior

Expected the app to successfully build on my phone.

Actual Behavior

XCode build fails with the following error:

screenshot 2018-03-07 02 08 01

Reproducible Demo

N/A

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 22 (4 by maintainers)

Most upvoted comments

I solved this issue without downgrading by adding pod 'Google-Maps-iOS-Utils' (in addition to pod 'GoogleMaps') to my Podfile then running pod update followed by pod install

I am still facing the same issue at v0.24.2 do you guys have any idea how to fix it? I am using v0.19.0 to make it work but would like to use the latest release.

@vinicius5581 remove the BatchedBridge from Podfile and run pod install again.

Example using

"react": "^16.3.0-alpha.1",
"react-native": "0.54.0",
"react-native-maps": "github:react-community/react-native-maps"

https://github.com/rafaellincoln/test-rn-maps

@rborn BatchedBridge was removed from the version 0.54.0 of the react-native. #2072

I got this exact same issue, causing my builds to fail when I use the react-native-maps library by pulling directly from master.

If I do not pull directly from master then I get issue #2051

Not a solution, but I downgraded to react-native-maps v 0.19.0 for a temp fix so I can keep working for now

Downgrading as suggested by @EsdrasEtrenne is the only thing that fixes this for me. So the following dependencies:

"react": "^16.3.0",
"react-native": "0.54.2",
"react-native-maps": "^0.19.0"

However it’s been a rollercoaster to finally get to this issue, I’ve been through at least half-a-dozen bugs/issues prior to meeting ye 'GMUKMLParser.h' 😅