Setting Cookies in InAppBrowser URL

Am trying to set a cookie for inappbrowser url after its opened in IONIC application using tough-cookie.But it’s not working.Can you please help me out. Below is my code:

var tough = require('tough-cookie');
var cookiejar = new tough.CookieJar();
'', function(err) {console.log("err"+err);});

No error but cookie not set

Using Cookie-Master

cordova.cookieMaster.setCookieValue('', 'cookie-agreed', 
 function() {
    console.log('A cookie has been set');
function(error) {
    console.log('Error setting cookie: '+error);

Getting error as cookieMaster of undefined.Tried cordova.plugins.cookieMaster also.Also tried window.plugins.cookieMaster.

What is the equialent ionic-native for cookie-master ?

TypeError: undefined is not an object (evaluating ‘tough_cookie__WEBPACK_IMPORTED_MODULE_6__[“cookieMaster”].getCookies’)

:zap: URL: undefined

:zap: :211:78

but the url is defined

cookieMaster.getCookies(event.url,function(err,cookies) {
console.log(cookies.join(’; '));