iOS Question _setCookieAcceptPolicy....

Akwa

Member
Licensed User
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
 

Akwa

Member
Licensed User
Try this:
B4X:
Dim no As NativeObject
no = no.Initialize("NSHTTPCookieStorage").RunMethod("sharedHTTPCookieStorage", Null)
no.RunMethod("setCookieAcceptPolicy:", Array(0)) '0 = NSHTTPCookieAcceptPolicyAlways
Thanks Erel, it's seems to work.
 
Upvote 0
Top