jodybrewster / react-native-linkedin-login

React Native Linkedin login
71 stars 42 forks source link

Linkedin login not working properly in ios #44

Open PriyankaAshu opened 5 years ago

PriyankaAshu commented 5 years ago

I am using the below code for integrating Linkedin login, it's working fine in android but not in ios componentWillMount() { console.log('init'); LinkedinLogin.init( [ 'r_emailaddress', 'r_basicprofile' ] );
} async handleLinkedinLogin(){ LinkedinLogin.login().then((user) => { this.setState({ user }); this.getUserProfile(); }).catch((e) => { alert('Error', e); }); return true; } getUserProfile(user) { LinkedinLogin.getProfile().then((data) => { const userdata = Object.assign({}, this.state.user, data); console.log(userdata); }).catch((e) => { alert(e); }); }

In IOS inside handleLinkedinLogin() function It's taking me inside App store linkedin app, even I have already installed app. And in app store I am clicking linkedin "open" so I am walking inside linkedin application. I can't come back to me react-native application, with user profile. above same code working fine in android. screen shot 2018-10-02 at 5 16 33 pm

In image is my developer account setting

PriyankaAshu commented 5 years ago

Any suggestion please ?

oriharellance commented 5 years ago

@PriyankaAshu you need to check your info.plist and AppDelegate.m. It looks like those are not set correctly.

mehulnahar commented 5 years ago

I am facing problem in iOS with this library. I can't come back to my application after login to Linkdin. It always ask me to download application whether I have already in my device or not. When I add following code in info.plist, getting an error that info.plist is not properly format. Give me suggestions or Should I move ahead? But it is working in android. So, I am looking for any solution to this problem. `

linkedin
<string>linkedin-sdk2</string>
<string>linkedin-sdk</string>

`