Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18119] iOS: Ti.UI.iPhone.StatusBar constants generate invalid warnings on Studio console.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-12-09T22:32:08.000+0000
Affected Version/sRelease 3.5.0
Fix Version/sRelease 3.5.0, Release 4.0.0
ComponentsiOS
Labelsqe-3.5.0, qe-assigned
ReporterKajenthiran Velummaylum
AssigneeVishal Duggal
Created2014-12-02T05:38:52.000+0000
Updated2014-12-09T22:32:08.000+0000

Description

Ti.UI.iPhone.StatusBar constants are generating following warning message.
 [WARN] :   Titanium.UI.iPhone.StatusBar.OPAQUE_BLACK DEPRECATED in 3.4.2, in favor of UI.iPhone.StatusBar.LIGHT_CONTENT: REMOVED in 3.5.0 
This message is invalid since there is no release version called 3.4.2.

Steps to reproduce

1. Create a classic app using following code
var isDayMode = true,
    ios = Ti.Platform.name === 'iPhone OS',
    iosFlat = ios && +Ti.Platform.version >= 7,
    win = Ti.UI.createWindow({
        backgroundColor: '#fff'
    }),
    label = Ti.UI.createLabel({
        text: 'Day Mode', textAlign: 'center',
        color: '#000', font: { fontSize: 30 },
        top: iosFlat ? 60 : 30, bottom: 0
    }),
    button = Ti.UI.createButton({
        title: 'Switch',
        color: '#000',
        top: iosFlat ? 30 : 0, height: 30
    });
button.addEventListener('click', function() {
    isDayMode = !isDayMode;
    if (isDayMode) {
        ios && (win.statusBarStyle = Ti.UI.iPhone.StatusBar.DEFAULT);
        win.backgroundColor = '#ccc';
        label.color = button.color = '#000';
        label.text = 'Day Mode';
    }
    else {
        ios && (win.statusBarStyle = Ti.UI.iPhone.StatusBar.TRANSLUCENT_BLACK);
        win.backgroundColor = '#444';
        label.color = button.color = '#fff';
        label.text = 'Night Mode';
    }
});
win.add(label);
win.add(button);
win.open();
2. Run on iPhone device

Actual Result

Invalid warning message is thrown in studio console.

Expected Result

Warning message should be valid. It should use valid release versions and constant names. For Eg: *OPAQUE_BLACK* and *LIGHT_CONTENT* are not used in code.

Comments

  1. Ingo Muschenetz 2014-12-02

    This instead should say "deprecated in 3.5.0, removed in 3.6.0"
  2. Vishal Duggal 2014-12-03

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6422 3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6423 3.4.2 is a valid release as it is available from the CI build system. Just updating removed version to 3.6.0
  3. Eric Wieber 2014-12-09

    Verified fixed using: Titanium SDK 3.5.0.v20141208122514 Studio 3.4.1.201410281743 Xcode 6.1.1 On: iPad mini, iOS 8.1 iPhone 6, iOS 8.2b iPhone 4S Sim, iOS 8.1 Warning message is as Vishal describes.

JSON Source