0
votes

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?

2
I just did a Ti.API.info(Ti.Platform.osname); on the latest sdk and ipad and its working fine - Dieskim
Sorry, I still get iphone as result. Maybe I have a different problem cause that, but I couldn't figure it out... - anixrud

2 Answers

0
votes

You can use Alloy.isHandheld to check for handhelds. On the other hand osname should give the correct output, too.

0
votes

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.