-
Q: Is there any way to overwrite native saving method when
is set? Context: Well, when localStorage is used in combination with Capacitor to build iOS/Android app, storage is getting cleared by OS periodically, so we are forced to use 3rd side storage manager to save user preferences etc. in async storage. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@theNomik Sorry, this is not possible and there is no plan on adding such option. With that said, you could still handle this case: // get value of the the plugin's cookie from your storage manager
const ccValue = storageManager....
// if value is not empty, set it in localStorage
if (value) {
localStorage.setItem('cc_cookie', JSON.stringify(ccValue));
}
CookieConsent.run({...}); You would also need to keep the value updated in your storage manager (update on onAccept and onChange events). |
Beta Was this translation helpful? Give feedback.
@theNomik Sorry, this is not possible and there is no plan on adding such option.
With that said, you could still handle this case:
You would also need to keep the value updated in your storage manager (update on onAccept and onChange events).