Identifying iOS version

Hi, this may not be possible, but in testing my app across different versions of iOS, I have identified a few parts I’d like to change/restrict to improve performance on older generations - primarily iPhone 3G and iPod touch.

Is it possible to identify a users iOS version and then perform an action based on this? In my case I want to disable/enable a lot of audio based on the iOS.

Thanks [import]uid: 125592 topic_id: 29028 reply_id: 329028[/import]

I’m not 100% certain but I *believe* platformVersion may return this - let me know how it goes;

[lua]print( system.getInfo( “platformVersion” ) )[/lua]

(Print is just for testing purposes, obviously.) [import]uid: 52491 topic_id: 29028 reply_id: 116849[/import]

Thanks peach, I’ll give it a try this evening and report back [import]uid: 125592 topic_id: 29028 reply_id: 116853[/import]

Hi Peach, this retrieves the version perfectly, but how can I use the results to turn audio on or off?

If a user is on iOS version older than 4.3 I want to turn some audio off, how can I set this command, will there be an issue if iOS version has two decimal points e.g. 4.2.1?

thanks [import]uid: 125592 topic_id: 29028 reply_id: 117272[/import]

You could remove the decimal point and then say;
if version < 430 then
– do stuff here
end [import]uid: 52491 topic_id: 29028 reply_id: 117374[/import]