2017-08-28 154 views
0

我在webview中有一个问题,无法在iOS上设置cookie。反应原生webview饼干问题

上午实施第三方支付网关在网页视图,并在用户得到重定向到结果页面中,我得到一个消息,说

那么如何启用的WebView曲奇“饼干并不在浏览器中启用”在iOS上?

回答

1

在反应本地的WebView饼干是默认启用请检查下面的链接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 
/> 
+0

已经尝试过这一点。不工作 – Zorox