I have a issue in webview not being able to set cookies on iOS.
Am implementing third party payment gateway in a webview And when the user got redirected to the result page, i got a message saying that "cookies are not enabled in the browser "
So how to enable cookies in webview on iOS?
In react native webview cookies are default enable please check following link https://facebook.github.io/react-native/docs/webview.html
thirdPartyCookiesEnabled?: bool
Boolean value to enable third party cookies in the WebView.
Used on Android Lollipop and above only as third party cookies are enabled by
default on Android Kitkat and below and on iOS. The default value is true.
<WebView
source={{uri: 'https://github.com/facebook/react-native'}}
style={{marginTop: 20}}
thirdPartyCookiesEnabled : true
/>
Use property sharedCookiesEnabled={true} in webView.
Its working in myCase
Related
I'm building a google chrome extension using react js . Withing my app i'm using firebase authentification service. I created a button so that the user can authentificate with twitter .
This is the button code.
onClick={() => {
firebase
.auth()
.signInWithPopup(new firebase.auth.TwitterAuthProvider())
So when the user click on the button , a popup appears and firebase authentificate the user.
When i load the extension to chrome and run it , it runs correctly but when i click on the button i get this error :
content.js:37916 Uncaught xh {code: "auth/unauthorized-domain", message: "This domain (meet.google.com) is not authorized to…se console -> Auth section -> Sign in method tab.", a: null}
It seems that i should whitelist every singe web page(url), in firebase console ,that the the user is launching the extension from .
Is there a solution?
I am developing mobile app using React Native Expo. I am using react-native-google-places-autocomplete for text auto completetion of location/places. It is Google API. I have made account, enabled the google service and also added my billing info. But the code is not working .
See the code below:
<View style={{height: 500}}>
<GooglePlacesAutocomplete
fetchDetails={true}
placeholder='Search'
onPress={(data, details = null) => {
console.log(data, details);
}}
query={{
key: 'my-api-key-here',
language: 'en',
}}
/>
</View>
I am able to SUCCESSFULLY see the Search placeholder where I can type, but I am not able to see the suggestions/autocompletion text by google. I am able to type the location successfully in the box, but there is no location suggestions coming by google.
I have installed and imported relevant libraries too.
You need to add prop listViewDisplayed={boolean or "auto"}. See this link https://snack.expo.io/#tobzy/react-native-google-places-autocomplete-example
Had this happen to me too. Just had to add flex: 1 to my View as I didn't provide any height styling like OP.
I am building an app where user will be able to play facebook videos from urls that I will provide.
Is there a way to embade facebook videos in react-native from url?
I have tried using react-native-video, react-facebook-player
React-facebook-player only works in react app. In react-native it gives an error that can not resolve div.
Can I wrap react-facebook-player component within Webview?
If so how can I do that?
Use react-native-webview
eg:
<WebView
style={{height: videoHeight}}
source={{uri: 'https://www.facebook.com/video/embed?video_id=VIDEOID HERE'}}
/>
I'm using react-native-webview which is suggested by React Native documentation. WebView shows white screen when I try to load HTTPS Url in Android. In IoS it works fine. How can I solve it?
Thanks in advance!
How can I set basic authentication on IMG tag for Ionic?
I have tried using src="http://username:password#server/Path" as suggested on link which works fine with ionic serve in browser, but when uploaded to mobile it doesn't work. I am fetching other resources with authentication header with http request which works fine also.
Any help would be appreciated