GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-29T04:04:26.000+0000 |
Affected Version/s | Release 3.0.2, Release 3.1.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07 |
Components | iOS |
Labels | module_app_properties, parity, qe-sdk3.1.0, qe-testadded |
Reporter | Wilson Luu |
Assignee | Max Stepanov |
Created | 2013-03-20T01:16:28.000+0000 |
Updated | 2013-09-30T09:07:06.000+0000 |
*Details:* If you use Ti.App.Properties.setList() to save an array that contains null, undefined, or an empty value, then setList() will not save the array and return "Attempt to insert non-property value" message in xcode's console.
*This is not a regression. Bug still occurs on 3.0.2.GA.*
Also, Ti.App.Properties.setList() works as expected on Android; can save an array that contains null, undefined, or an empty value.
*Steps to reproduce:*
1. Install the following Titanium app to an iOS device:
var win = Ti.UI.createWindow({
backgroundColor: 'white'
});
// same issue if there is null or undefined in the array
var vals = [,42];
Ti.App.Properties.setList('number', vals);
var label = Ti.UI.createLabel({
text: (Ti.App.Properties.getList('number')[1] + ' monkies'),
font: { fontSize:48 }
});
win.add(label);
win.open();
2. Launch app
*Actual:* iOS will not save vals array and return "Attempt to insert non-property value" message (see log.txt)
*Expected:* App should launch with "42 monkies" in the label like in Android (see android.png)
*Note:* This issue seems similar to TIMOB-11399
PR https://github.com/appcelerator/titanium_mobile/pull/4036
Ti.App.Properties.setList cannot save arrays that contain null. App launches with "42 monkies" in the label. Verified on: Device : iPad mini, iOS version: 6+ SDK: 3.1.0.v20130405170202 CLI version : 3.1.0-beta OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.0.201304011603 XCode : 4.5.1