Created
June 9, 2014 02:05
-
-
Save devluis/0a71fd7f4a8905eed861 to your computer and use it in GitHub Desktop.
Titanium - Ti.App.Properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The App Properties module is used for storing application-related data in property/value pairs that persist beyond application sessions and device power cycles. | |
*/ | |
// Set property | |
Ti.App.Properties.setString('myCustomProperty',JSON.stringify('This value is store')); | |
// Get property | |
Ti.App.Properties.getString('myCustomProperty'); | |
// Remove property | |
Ti.App.Properties.removeProperty('faceUserName'); | |
// List all properties | |
var props = Ti.App.Properties.listProperties(); | |
for (var i=0, ilen=props.length; i<ilen; i++){ | |
var value = Ti.App.Properties.getString(props[i]); | |
Ti.API.info('Despues: ' + props[i] + ' = ' + value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment