Google's John Mueller said that if you are redirecting users based on them having an iOS device or an Android device, it is best to also offer a "subtle banner" so those who are on Android and want to access the iOS version can also access that and visa versa.
The webmaster said he redirects iOS users to one place and Android users to another place and asked how that might impact Google indexing the two pages. John wrote:
This is essentially the same thing as a country- or language-specific setup (eg, redirect users with a French-language browser to the French version of the page).Our recommendations there are to allow all users (and search engines) to access all versions, and to show a subtle banner to the "perceived wrong" users pointing them at the better-fitting versions of the page -- something like "it looks like you're using Android - click here to see the Android version of this page".
Using a cookie to save the user's preference (ideally let the user specify that with a checkbox like "always show the Android version") and automatically redirecting when that cookie is set is fine too (and wouldn't affect search since crawlers generally don't keep cookies).
This will result in both of these pages getting indexed, and making it possible for users to explicitly find either of them when relevant.
I do something similar on my mobile site, where I know many of our mobile visitors are looking for either our iOS apps or Android apps. We let them access both but the banner at the top will direct an Android user to the Android apps page and an iOS user to the iOS apps page. We do not do any forced redirection here but rather have the download our apps button dynamic based on the device type. Both pages have their own unique URLs.
So again, you can access both from the navigation but our button at the top goes to one or the other depending on the device.
Forum discussion at Google Webmaster Help.