[TIMOB-4696] iOS: Cannot retrieve property value set in tiapp.xml using Ti.App.Properties API
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-10-10T08:46:46.000+0000 |
Affected Version/s | Release 1.7.0 |
Fix Version/s | Sprint 2011-39, Release 1.7.4, Release 1.8.0 |
Components | iOS |
Labels | module_app_properties, qe-testadded |
Reporter | Anirudh Nagesh |
Assignee | Sabil Rahim |
Created | 2011-07-15T12:44:33.000+0000 |
Updated | 2014-06-19T12:46:28.000+0000 |
Description
We cannot retrieve the property value set in tiapp.xml using Ti.App.properties API even though it is documented in the WIKI.
http://wiki.appcelerator.org/display/guides/tiapp.xml+and+timodule.xml+Reference#tiapp.xmlandtimodule.xmlReference-Applicationproperties
Step1: Copy the following code in app.js
DEV
Step3: Run the app, and you can see the alert message is null.
Titanium.UI.setBackgroundColor('white');
var win = Titanium.UI.createWindow();
alert(Ti.App.Properties.getString("appstate"));
win.open();
Step2: Add the following line to tiapp.xml
Attachments
File | Date | Size |
---|---|---|
4696.zip | 2011-09-27T17:28:19.000+0000 | 1901147 |
Associated HD ticket
http://appc.me/c/APP-274595Associated Helpdesk ticket.
http://appc.me/c/APP-131697pull pending pull #518
iOS Fix seems to prevent retrieving existing Ti.App.Properties not found within tiapp.xml. Removing both calls to new loadUserDefaults function in TiApp.mm seems to fix that, but that leaves this ticket still an issue. See: http://developer.appcelerator.com/question/126711/ios-fix-to-timob-4696-causing-to-not-find-existing-tiapp-properties
Mike , thanks for catching that so quickly, i have already made a new pull to fix this issue pull #548 and timob-5494.
Tested with 1.7.4.v20111020142213, Titanium Studio, build: 1.0.6.201110171921 on Simulator 4.1 iPad 5.0 Properties are retrieved and returned values are correct with rebuild Leaving open to confirm with 1.8
Tested with 1.7.4.v201110021114614 and Titanium Studio, build: 1.0.6.201110202348 on iPhone 4s (5.0) iPhone 3g (3.1.2) Properties are retrieved and returned values are correct with rebuild Leaving open to confirm with 1.8
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 (Android Fails - Bug 6189)