titanium-cookies
titanium-cookies copied to clipboard
Me want cookies. OM NOM NOM.
Titanium Cookies
Me want cookies from Titanium Webview. Om nom nom.
Compiled Modules
Why
Get cookies from webview too hard, evalJS too buggy.
var monster = require('com.polancomedia.cookies');
myWebview.addEventListener('load', function(e) {
var url = e.url;
Ti.API.info('fetch cookie for: ' + url);
var cookies = monster.getCookie(url);
for(var key in cookies){
Ti.API.info('name: ' + key + ' value: ' + cookies[key]);
}
});
See full example in the example folder.
Read more in blog post here.
Building
Using Gradle
Use gradle both to build ios and android using gradle. Use gradle ios or gradle android for device specific builds.
Using Ant
Use ant for both or ant ios or ant android for specific builds.
Methods
getCookie(url)
- url string for cookie to get
About
- Me: Adam Paxton
- Twitter: @adampax
- Work: Polanco Media, LLC
License
MIT License Copyright (c) 2014 Polanco Media, LLC
Credits
Om Nom Nom
