hungdev / react-native-instagram-login

a react native instagram login component (support android & ios). Pull requests are welcome!
https://www.npmjs.com/package/react-native-instagram-login
184 stars 103 forks source link

iOS Deprecated API UIWebView #43

Closed NewBieBR closed 5 years ago

NewBieBR commented 5 years ago

Hi,

I got this message from Apple

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

And the issue might come from react-native-webview you're using: https://github.com/react-native-community/react-native-webview/issues/819

There might be a fix using useWebKit={true}, it's mentioned in that issue.

hungdev commented 5 years ago

@NewBieBR thank your mentioned. i will add this props to default props, but also you can add it directly from webview props like this:

<InstagramLogin
        ref= {ref => this.instagramLogin= ref}
        clientId='xxxxxxxxxx'
        redirectUrl='yourRedirectUrl'
        scopes={['public_content', 'follower_list']}
        onLoginSuccess={(token) => this.setState({ token })}
        onLoginFailure={(data) => console.log(data)}
       useWebKit={true}
    />
Titozzz commented 5 years ago

react-native-webview maintainer here 👋 , you need to update the webview to 7.0.1+ to fix this. And the useWebkit has been removed since UIWebView doesn't exist anymore :)