Search code examples
iosxcodereact-nativereact-native-maps

Duplicate interface definition for class 'RCTViewManager' XCode


I added AirBnb's React Native Maps to my project following their installation instructions:

https://github.com/airbnb/react-native-maps/blob/master/docs/installation.md

And now I get these compile errors when trying to build the project with Xcode. The app still runs if I use "react-native run-ios" in terminal, but I want to resolve this issue. I tried the solutions proposed in this following link but it did not fix anything:

https://github.com/airbnb/react-native-maps/issues/1017

Originally there were actually multiple of these errors for different React Native classes, but they were fixed when I replaced the relevant imports from quotation mark syntax to <> syntax.

For example, if the error is for 'RCTView', I would replace #import "RCTView.h" with #import <React/RCTView.h>

However, this did not fix this error, which is the only one left.

I've included relevant screenshots below:

This is what the error looks like.

Pod File

Link Binary Libraries

Huge thanks to anyone that can figure this out.


Solution

  • I finally solved the issue! I changed the podfile so that the commented out the used pod 'React'... line and uncommented the other one, and then followed the solution here:

    https://github.com/airbnb/react-native-maps/issues/789