Skip to content

Instantly share code, notes, and snippets.

View wpccolorblind's full-sized avatar

JJ ROZ wpccolorblind

View GitHub Profile
@wpccolorblind
wpccolorblind / gist:8569411
Created January 22, 2014 23:14
Titanium fetch and silentpush
Ti.API.info("FETCH INTERVAL :: " + Ti.App.iOS.BACKGROUNDFETCHINTERVAL_MIN);
Ti.App.iOS.setMinimumBackgroundFetchInterval(Ti.App.iOS.BACKGROUNDFETCHINTERVAL_MIN);
Ti.App.iOS.addEventListener("backgroundfetch", function(e){
Ti.API.info("BACKGROUND FETCH :: " + JSON.stringify(e))
var fetchID = e.handlerId;
xhr = Titanium.Network.createHTTPClient({
onload: function() {