Skip to content

Instantly share code, notes, and snippets.

@iskugor
Last active December 28, 2015 06:09
Show Gist options
  • Save iskugor/7455044 to your computer and use it in GitHub Desktop.
Save iskugor/7455044 to your computer and use it in GitHub Desktop.
Use parse.com JS API in Titanium mobile
module.exports = {
getItem : function(_key) {
return Ti.App.Properties.getObject(_key);
},
setItem : function(_key, _value) {
return Ti.App.Properties.setObject(_key, _value);
},
removeItem : function(_key, _value) {
return Ti.App.Properties.removeProperty(_key);
}
};
var Parse = require("parse").Parse;
Parse.initialize(app_id, javascript_key);
exports.XMLHttpRequest = function() {
return Ti.Network.createHTTPClient({
autoEncodeUrl: false,
timeout : 5000
});
};
@iskugor
Copy link
Author

iskugor commented Nov 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment