A Akwa Member Licensed User Mar 28, 2019 #1 Hello, I have a lot of problem with current Apple cookies policy, in the webview of my app. I want to apply this directive : self.webView.configuration.processPool.perform("_setCookieAcceptPolicy:", with: HTTPCookie.AcceptPolicy.always) But I don't absolutely not how to do this mess with the natives objects of B4A.... If anybody have an idea... Thank you
Hello, I have a lot of problem with current Apple cookies policy, in the webview of my app. I want to apply this directive : self.webView.configuration.processPool.perform("_setCookieAcceptPolicy:", with: HTTPCookie.AcceptPolicy.always) But I don't absolutely not how to do this mess with the natives objects of B4A.... If anybody have an idea... Thank you
Erel B4X founder Staff member Licensed User Longtime User Mar 28, 2019 #2 Try this: Code: Dim no As NativeObject no = no.Initialize("NSHTTPCookieStorage").RunMethod("sharedHTTPCookieStorage", Null) no.RunMethod("setCookieAcceptPolicy:", Array(0)) '0 = NSHTTPCookieAcceptPolicyAlways Upvote 0
Try this: Code: Dim no As NativeObject no = no.Initialize("NSHTTPCookieStorage").RunMethod("sharedHTTPCookieStorage", Null) no.RunMethod("setCookieAcceptPolicy:", Array(0)) '0 = NSHTTPCookieAcceptPolicyAlways
A Akwa Member Licensed User Mar 29, 2019 #3 Erel said: Try this: Code: Dim no As NativeObject no = no.Initialize("NSHTTPCookieStorage").RunMethod("sharedHTTPCookieStorage", Null) no.RunMethod("setCookieAcceptPolicy:", Array(0)) '0 = NSHTTPCookieAcceptPolicyAlways Click to expand... Thanks Erel, it's seems to work. Upvote 0
Erel said: Try this: Code: Dim no As NativeObject no = no.Initialize("NSHTTPCookieStorage").RunMethod("sharedHTTPCookieStorage", Null) no.RunMethod("setCookieAcceptPolicy:", Array(0)) '0 = NSHTTPCookieAcceptPolicyAlways Click to expand... Thanks Erel, it's seems to work.