Open tianweicc opened 7 years ago
CookieManager.clearAll().then(function(res){ console.log('CookieManager.clearAll =>', res); })
@yusheng-jia it doesn't actually clear the cookies though. Actually does nothing. I tried linking twice and clearing the project so that it was rebuilt. No luck.
Also the main reason why we pass in the boolean is to specify webKit correct?
I'm running into this same issue. Any luck? I think part of the issue is the package on npmjs.com doesn't include the useWebKit parameter. It's outdated and I've had to npm install from the git repo. However, I still have this complaint and it doesn't work. I've looked at the RNCookieManagerIOS.m file, and it does use the useWebKit BOOL. I've cleaned my project, removed node_modules, deleted the app from the simulator, etc. No idea what's wrong.
Actually I think what I needed was to pass "useWebKit" and "sharedCookiesEnabled" to my WebView, and then call CookieManager.clearAll(true) and CookieManager.clearAll(false). I tried running one or the other and it didn't work to clear the cookie, but calling both did.
I've got same error when tried to use CookieManager.clearAll(true)
. I used version 3.3.0, but changes required to pass true
as a function parameter, is implemented after version bump. To fixed that i used specific commit that has these changes and it fixed that issue for me. git+ssh://git@github.com:joeferraro/react-native-cookies.git#48240c3
I used this specific commit.
I have forked the repo here: https://github.com/safaiyeh/react-native-cookie-store We can create issues and PRs there to continue the development of the project.
RNCookieManagerIOS.clearAll was called with 1 arguments but expects 0 arguments if you hacernt this method yourself this usually means that your versions of the native code and javascript code are out of sync up