Possible Duplicate:
How can we programmatically detect which iOS version is device running on?
We have a site which has a registration form. In this form we have a file upload button. As you already know when someone access our site via iOS devices they can't upload a file because iOS doesn't support file upload via safari. Now we found out iOS6 enables users to upload a photo via safari. Now the question is we don't know how many people will update to iOS6. So how can we detect which version of iOS a visitor is running and then show them a warning or a popup message ?
We want to detect if the site is accessed by iOS5.1 or less and show a popup message saying "Your software version does not support file upload. Please update to iOS 6 or download our app to upload your image"
Any help ? thank you.