I've been given the task to make it so that depending which device iPhone / Android an app download button takes you to the correct download page, either on AppStore or Googleplay. Unfortunately hours spent searching for no answer as yet...

I know this can be done using various script for website but have no idea how to do this on mobile devices.

Is anyone able to help.