0

I'd like to detect which iphone is being used then vary the webview url based on the phone. In other words, display a different url for iPhone 5 than iPhone 6, iPhone 6 plus.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user3294722
  • 235
  • 1
  • 2
  • 12
  • Why base it on device? Base it on screen size. Better yet, write the web page to render itself properly based on the screen size. That logic doesn't belong in the native app. – rmaddy Jan 10 '17 at 02:53
  • that's not helpful rmaddy – user3294722 Jan 10 '17 at 03:15
  • How is it not helpful? I gave two better ideas for solving your problem. Why base it on device? The iPhone 6, 6s, 7, and 7s all have the same screen size, for example. – rmaddy Jan 10 '17 at 03:18
  • @rmaddy , maybe the OP has something like different URLs, one which displays "you are using an iPhone 5", another which displays "you are using an iPhone 6", etc.; maybe he doesn't want a dynamic web page – auspicious99 Jan 10 '17 at 03:30
  • This question has been answered before, e.g., at http://stackoverflow.com/questions/19584208/identify-new-iphone-model-on-xcode-5-5c-5s – auspicious99 Jan 10 '17 at 03:46

0 Answers0