[TIMOB-5278] iOS: App properties don't immediately register a changed value
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-06T14:21:54.000+0000 |
Affected Version/s | Release 1.8.0 |
Fix Version/s | Sprint 2011-37, Release 1.8.0 |
Components | iOS |
Labels | module_app_properties, qe-testadded |
Reporter | Matthew Congrove |
Assignee | Reggie Seagraves |
Created | 2011-09-12T13:42:41.000+0000 |
Updated | 2014-06-19T12:46:26.000+0000 |
Description
When a user changes Ti.App.Properties outside of the application (e.g. the iOS 'Settings' application), the new value is not immediately available on application resume; instead, the previous value is given. After waiting a little while (anything below 2 seconds seems iffy), this value is updated appropriately. Reproduction follows...
Steps to reproduce:
Open test application, then close
Open iOS Settings application, change value of "Foo" setting
Close Settings application and quickly re-open test application
After 2 seconds, values will be alerted. Item A will hold old value, while B, which was checked 2 seconds later, holds new value.
Ti.App.addEventListener('resumed', function() {
var output = "A: " + Titanium.App.Properties.getString("foo") + "\n\n";
setTimeout(function() {
output += "B: " + Titanium.App.Properties.getString("foo") + "\n\n";
alert(output);
}, 2000);
});
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Foo</string>
<key>Key</key>
<string>foo</string>
<key>DefaultValue</key>
<true/>
</dict>
</array>
</dict>
</plist>
Verified fixed in SDK: 1.8.0.1.v20111220190134. Set value now showing up on app resume with iPad 2 (5.0.1) and iPhone 4s (5.0.1).
Reopening to edit labels