Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joeferraro committed Jul 9, 2015
1 parent 9831633 commit 9d0944f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
var NativeModules = require('NativeModules');
var invariant = require('invariant');
var RNCookieManagerIOS = NativeModules.RNCookieManagerIOS;

module.exports = {
set(props, callback) {
invariant(
NativeModules.RNCookieManagerIOS,
'Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project.'
);
RNCookieManagerIOS.set(props, (err, res) => {
callback(err, res);
});
},
clearAll(callback) {
invariant(
NativeModules.RNCookieManagerIOS,
'Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project.'
);
RNCookieManagerIOS.clearAll((err, res) => {
callback(err, res);
});
},
getAll(callback) {
invariant(
NativeModules.RNCookieManagerIOS,
'Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project.'
);
RNCookieManagerIOS.getAll((err, res) => {
callback(err, res);
});
Expand Down

0 comments on commit 9d0944f

Please sign in to comment.