Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4696] iOS: Cannot retrieve property value set in tiapp.xml using Ti.App.Properties API

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-10-10T08:46:46.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sSprint 2011-39, Release 1.7.4, Release 1.8.0
ComponentsiOS
Labelsmodule_app_properties, qe-testadded
ReporterAnirudh Nagesh
AssigneeSabil Rahim
Created2011-07-15T12:44:33.000+0000
Updated2014-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
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 DEV Step3: Run the app, and you can see the alert message is null.

Attachments

FileDateSize
4696.zip2011-09-27T17:28:19.000+00001901147

Comments

  1. Eduardo Gomez 2011-07-15

    Associated HD ticket

    http://appc.me/c/APP-274595
  2. Anirudh Nagesh 2011-07-18

    Associated Helpdesk ticket.

    http://appc.me/c/APP-131697
  3. Sabil Rahim 2011-09-27

    pull pending pull #518
  4. Mike Robinson 2011-10-11

    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
  5. Sabil Rahim 2011-10-11

    Mike , thanks for catching that so quickly, i have already made a new pull to fix this issue pull #548 and timob-5494.
  6. Natalie Huynh 2011-10-20

    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
  7. Natalie Huynh 2011-10-21

    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
  8. Natalie Huynh 2011-11-14

    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)

JSON Source