[TIMOB-5494] iOS: userDefaults not remembering the properties that were set
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-23T15:51:06.000+0000 |
Affected Version/s | Release 1.7.4, Release 1.8.0 |
Fix Version/s | Release 1.7.5, Release 1.8.0 |
Components | iOS |
Labels | module_app_properties, qe-testadded |
Reporter | Sabil Rahim |
Assignee | Sabil Rahim |
Created | 2011-10-11T11:58:59.000+0000 |
Updated | 2014-06-19T12:44:01.000+0000 |
Description
Caused due to the feature implemented by timob-4696
Run the following code in simulator. Comment out the setstring line and re run again ...
//app.js
var win = Titanium.UI.createWindow({
title:'TEST',
backgroundColor:'#fff'
});
//Comment out the setString for the second run of the app,
//hasProperty will return false for that execution
Titanium.App.Properties.setString('my_prop', 'dadfcool'); // <--- comment this line after the first run.
Ti.API.info('has property: ' + Ti.App.Properties.hasProperty('my_prop'));
var a = Titanium.UI.createAlertDialog({
title:'Test Result',
message:'has property: ' + Ti.App.Properties.hasProperty('my_prop'),
});
a.show();
//For debugging, list all properties & values
var props = Titanium.App.Properties.listProperties();
for (var c = 0; c < props.length; c++) {
var value = Titanium.App.Properties.getString(props[c]);
Titanium.API.info(props[c] + " = " + value);
}
win.open();
Result : returns value false
Expected :return value true
comment pull pending #548
Should have been labeled merge-1.7.4
pull pending #608
regressed against 1.7.5 Nov 1 2011 11:46 rbd9a4c74, 10.6.8, and lion. xcode 4.2 and 4.0, ios5 and ios 4.3. Keeping open till its regressed against master.
Tested with 1.8.0.1.v20111114102656 on iPad 2 (4.3.5) iPod Touch (4.0.2) iPhone 4s (5.0) Xoom 3.2.1
Reopening issue Tested this issue with Ti Studio build 1.0.8.201201210622 Ti Mob SDK 1.8.1.v20120123130147 OSX Lion 10.7.2 iPhone 3GS OS 4.3 Using the steps provided the second run returns false and not true like expected
Closing issue Tested with updated test steps and issue does not occur with same environment as I listed when I reopened this issue.
Reopening this bug to fix "Fix Version" field.