react-native-cookies icon indicating copy to clipboard operation
react-native-cookies copied to clipboard

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

Open tianweicc opened this issue 8 years ago • 6 comments

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

tianweicc avatar Oct 30 '17 07:10 tianweicc

CookieManager.clearAll().then(function(res){ console.log('CookieManager.clearAll =>', res); })

yusheng-jia avatar Dec 04 '17 09:12 yusheng-jia

@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?

ollyde avatar May 20 '19 09:05 ollyde

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.

tmaly1980 avatar Jun 13 '19 02:06 tmaly1980

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.

tmaly1980 avatar Jun 13 '19 02:06 tmaly1980

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://[email protected]:joeferraro/react-native-cookies.git#48240c3 I used this specific commit.

ashtrus avatar Sep 09 '19 09:09 ashtrus

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.

safaiyeh avatar Jan 02 '20 19:01 safaiyeh