I think the problem has occurred after iOS 11.4.
On iPad
"Ti.Platform.osname" function gives only "iphone"
How can I decide whether it is iPad or iPhone?
or at least whether it is tablet or handheld?
I finally figured that out!
Actually, I'm not sure that this is a problem but shouldn't be like this. The situation is confusing...
If you want that Ti.Platform.osname
function to give you ipad
as result, you should choose iPad as a Deployment Target in your tiapp.xml file.