Page 1 of 1

iOS device info

Posted: Thu Nov 17, 2011 8:20 pm
by Kaubs
Is there a way to poll device info such as:

iOS version
agent - iphone, ipad, ipod

?

Thanks!!

Re: iOS device info

Posted: Thu Nov 17, 2011 8:56 pm
by townsend
Have a look at the systemVersion statement.

Also look at the environment statement.

You can do something like,

Code: Select all

if the environment is "mobile" then
      ...
end if
To determine whether you're on an iPhone or iPad, I think you're going to have to look at the screen size.

Re: iOS device info

Posted: Thu Nov 17, 2011 10:27 pm
by Kaubs
Right! Thank you. The systemversion worked great. I probably will have to go with screen res which is a little sad just because I cannot tell the diff between iPhone and iPod touch. I'm sure I can work something out though.

Re: iOS device info

Posted: Thu Nov 17, 2011 10:41 pm
by townsend
What's the screen resolution of iPhones?
What the screen resolution of iPads?

Once you know that, build an IF statement.

Code: Select all

on mouseUp
     put width of stack "testing" && height of stack "testing"
end mouseUp

Re: iOS device info

Posted: Thu Nov 17, 2011 11:36 pm
by Kaubs
I also just found that this works for me

Code: Select all

Put the platform into avariable
"the platform" defined my phone as and iPhone. I'm curious to see what all it can identify. This works better for me though as I dont have to try and track down a ton of screen resolutions in the future and cannot be limited to only iOS production with my stack.

Re: iOS device info

Posted: Fri Nov 18, 2011 1:25 am
by Kaubs
One more question....how about obtaining a devices MAC address? Possible on iPhone or other devices?

Re: iOS device info

Posted: Fri Nov 18, 2011 8:07 pm
by CALL-151
Use the Machine function to identify iPhone vs iPad vs iPod Touch. It's explained in the release notes. I'm not aware of a LC method for obtaining the MAC address at runtime.

Re: iOS device info

Posted: Sat Nov 19, 2011 10:00 pm
by macnomad2
And by the way,to differenciate iPad 1 and iPad 2, for speed reasons, have I something else than testing if there is a camera or not, just to be on the safe side ? I want to show more things on the faster device ;)
Thanks