xmartlabs / react-native-line

Line SDK wrapper for React Native 🚀
MIT License
121 stars 86 forks source link

i can't use the every function on LineLogin() #105

Closed Pornpunnarai closed 1 year ago

Pornpunnarai commented 1 year ago

This is my code. I don't know it's a bug or my mistake

i create a button and that on press to this function --> onLineButtonPress()

import LineLogin from '@xmartlabs/react-native-line';

const onLineButtonPress = async () => { try { const {accessToken} = await LineLogin.login();

  console.log(accessToken, 'accessToken');
} catch (error) {
  console.log(error, 'error');
}

};

i can't use the method that provide on LineLogin()

it's will always show [TypeError: Cannot read property 'getCurrentAccessToken' of null] error it's happen every function.

react-native": "0.71.8" "@xmartlabs/react-native-line": "^2.1.0",

emibotti commented 1 year ago

Hey @Pornpunnarai ! We will take a look into it. Thanks for opening the issue!

emibotti commented 1 year ago

Hey @Pornpunnarai , we have released version 2.2.0. Please try installing it, do cd ios && pod install, and retry. Let us know!

emibotti commented 1 year ago

I'm closing this issue. Please feel free to re-open it if you encounter the same issue again 💪