react-native-facebook-login
react-native-facebook-login copied to clipboard
Duplicate interface definition for class 'RCTView'
Hi Installed the RN facebook-library, followed the instructions to install the FB SDK within XCode. After rebuilding the project, I saw this error.
Duplicate interface definition for class 'RCTView' within the RCTFBLogin library
Go to Libraries/RCTFBLogin.xcodeproj Open RCTFBLogin.h change import "RCTView.h" to #import <React/RCTView.h>
Open RCTFBLoginManager.h change import "RCTViewManager.h" to #import <React/RCTViewManager.h>
Open RCTFBLoginManager.m change:
#import "RCTBridge.h" #import "RCTEventDispatcher.h" #import "RCTLog.h"
to:
#import <React/RCTBridge.h> #import <React/RCTEventDispatcher.h> #import <React/RCTLog.h>
This is because of with react "native december 2016" (https://github.com/facebook/react-native/releases/tag/v0.40.0)
There was this breaking change
iOS native headers moved
This change affects all native modules and application code on iOS that refer to react native .h files
After e1577df, Native code on iOS must refer to headers out of the react namespace. Previously the following would work:
#import "RCTUtils.h"
But now all headers have been moved:
#import <React/RCTUtils.h>
meaning this plugin / all other plugins that have these issues should be updated. so if u have other plugins that are failing their imports are probaly pointing to something like
#import "Something.h" instead of #import <React/Something.h> or whatever
Hope this helps :) - sorry i don't have time to make a PR for this, but somebody can, if someone not already did it :)
It works. Thanks.