[TIMOB-13481] iOS: Default values in the Root.plist file are not available on first install.
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Glenn Murphy |
Assignee | Unknown |
Created | 2013-02-18T22:35:45.000+0000 |
Updated | 2018-02-28T20:03:28.000+0000 |
Description
Related to this issue, but titanium specific:
http://stackoverflow.com/questions/510216/can-you-make-the-settings-in-settings-bundle-default-even-if-you-dont-open-the
Community thread:
http://developer.appcelerator.com/question/147214/tiappproperties-arent-read-pproperly-on-actual-device#comment-159480
Basically, I have a string property with a default value
Type
PSTextFieldSpecifier
Title
Name
Key
name_test
DefaultValue
Foobar
in the root.plist. When the application gets built + installed the first time, the Settings App does have all the properties. However, the titanium app cannot access the default values.
If, in app.js, I call:
Ti.API.info("AppSetting Name = " + Ti.App.Properties.getString('name_test'));
the result is "null";
If I close the app, change the value in the settings app to "Now it works", and then reload the application, the output of the same call is:
"Now it works."
No comments