[AC-6682] semantic.colors.json won't work/log on iOS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Sebastian Klaus |
Assignee | Abir Mukherjee |
Created | 2021-02-19T08:29:19.000+0000 |
Updated | 2021-02-19T10:11:24.000+0000 |
Description
File: assets/semantic.colors.json
{
"windowBackgroundColor": {
"dark": "#666666",
"light": "#ff0000"
},
"background":{
"dark": "#00ff00",
"light": "#0000ff"
}
}
Open new window
const window = Ti.UI.createWindow();
window.open();
console.log(Ti.UI.fetchSemanticColor('windowBackgroundColor'))
console.log(Ti.UI.fetchSemanticColor('background'))
Returns
[INFO] {}
[INFO] {}
Not a bug. The return value of "fetchSemanticColor" is not an object but a "TiColor" instance, which doesn't have a default description that can be logged.