Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-wkwebview-cookies

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-wkwebview-cookies

Cordova WKWebView Cookies Plugin

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
266
decreased by-20.36%
Maintainers
3
Weekly downloads
 
Created
Source

title: WKWebView Cookies description: Plugin to manage cookies in WKWebView (iOS).

cordova-plugin-wkwebview-cookies

Plugin to manage cookies in WKWebView. This is needed in order to fix cookies not stored in iframes in WKWebView.

Please notice that this plugin requires you to use WKWebView.

Installation

You can install the plugin using the following command:

cordova plugin add cordova-plugin-wkwebview-cookies

Methods

This plugin defines global WKWebViewCookies object.

Although in the global scope, it is not available until after the deviceready event.

function onDeviceReady() {
    console.log(WKWebViewCookies);
}

document.addEventListener("deviceready", onDeviceReady, false);

WKWebViewCookies.setCookie

Stores a cookie in the WebView. If you only want to store a cookie to make cookies in iframe work then you can store any name/value, just make sure that the domain belongs to the iframe domain.

Supported Platforms

  • iOS 11+

Quick Example

WKWebViewCookies.setCookie({
    name: 'CookieName',
    value: 'CookieValue',
    domain: 'example.edu'
}).then(function() {
    // Success.
}).catch(function() {
    // Error.
});

Keywords

FAQs

Package last updated on 03 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc