I implemented your solution into a test project. Here my findings:
Android:
The path described here is wrong. If the path is taken as is this error will appear Error:Project :app declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :react-native-linkedin-login.
The correct path should be:
//project(':react-native-linkedin-login').projectDir = new File(rootProject.projectDir, '../../android')
project(':react-native-linkedin-login').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linkedin-login/android')
iOS:
I added a console log in the file /android/react-native-linkedin-login/src/LinkedinLogin.js.
I always got an undefined for the RNLinkedinLogin object
Then I thought I might have to compile the LinkedinLogin.m explicitly. So I dropped it into the Build Phases -> Compiled Sources and tried to build the project, which gave me view errors.
After looking into the files I discovered that the import syntax is not correct for react native 0.40 and above.
I changed the import in file RNLinkedinLogin.m
// old syntax
//#import "RCTEventDispatcher.h"
// new syntax
#import <React/RCTEventDispatcher.h>
Hi there,
I implemented your solution into a test project. Here my findings:
Android: The path described here is wrong. If the path is taken as is this error will appear Error:Project :app declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :react-native-linkedin-login.
The correct path should be:
iOS: I added a console log in the file /android/react-native-linkedin-login/src/LinkedinLogin.js.
I always got an undefined for the
RNLinkedinLogin
objectThen I thought I might have to compile the LinkedinLogin.m explicitly. So I dropped it into the Build Phases -> Compiled Sources and tried to build the project, which gave me view errors.
After looking into the files I discovered that the import syntax is not correct for react native 0.40 and above.
I changed the import in file
RNLinkedinLogin.m
and the import in file 'RNLinkedinLogin.h`
After that I got the project compiled and I got the correct object
RNLinkedinLogin
Please update the files accordingly.
Thanks