Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5547] MobileWeb: Ti.Platform.model returns null

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2011-06-10T05:38:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMisha Vasko
AssigneeMaxim Negadaylov
Created2011-06-10T04:17:37.000+0000
Updated2017-03-10T18:53:53.000+0000

Description

Property Ti.Platform.model returns null on iPhone. It have to return the model of the phone.
var win = Titanium.UI.currentWindow;
win.backgroundColor = '#EEE';

var show = Ti.UI.createButton({
	title: 'Show',
	left: 90,
	top: 10,
	width: 140,
	height: 45,
	fontSize: 20
});

var close = Ti.UI.createButton({
	title: 'Close',
	left: 90,
	top: 60,
	width: 140,
	height: 45,
	fontSize: 20
});

var ta = Ti.UI.createTextArea({
	top: 110,
	left: 10,
	width: 300,
	height: 180,
	backgroundColor: 'white',
	fontSize: 18
});

win.add(show);
win.add(close);
win.add(ta);

close.addEventListener('click', function(){
	Titanium.UI.currentWindow.close();
});

show.addEventListener('click',function(){
	ta.value = 'Operation system: ' + Ti.Platform.osname + '\r\n';
	ta.value = ta.value + 'OS type: ' + Ti.Platform.ostype + '\r\n';
	ta.value = ta.value + 'Platform name: ' + Ti.Platform.name + '\r\n';
	ta.value = ta.value + 'Window height: ' + Ti.Platform.displayCaps.platformHeight + '\r\n';
	ta.value = ta.value + 'Window width: ' + Ti.Platform.displayCaps.platformWidth + '\r\n';
	ta.value = ta.value + 'Platform model: ' + Ti.Platform.model + '\r\n';

});

Comments

  1. Andrew Kulinich 2011-06-10

    We can't know phone model in a browser
  2. Lee Morris 2017-03-10

    Closing ticket as the issue will not fix.

JSON Source