-3

I want to install app in iPhone but when they click on app, than app give a popup to user "App is not supported for your iPhone" . it just like Whatsapp has blocked in many Devices Android as well as iPhones and Windows.

Please help me if any one have proper idea about it.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Kumar Lav
  • 5
  • 1
  • 5

1 Answers1

-3

It's not your responsibility to filter out devices. The most common approach is to set a deployment target. If you set your deployment target to iOS 10, users on iOS 9 (like the iPad 2) simply won't be able to download your app.

If you really want to block certain devices, you can always do it manually. This answer provides a way of getting the device model your app is running on. You can then manually check, like this:

if modelName == "iPhone 6" || modelName == "iPhone 6 Plus" {

     // Present a popup here.

} else {
     // Continue, because this device is supported.
}
Bram Roelandts
  • 470
  • 7
  • 25
  • No dud, I am not satisfied with your answer. – Kumar Lav Sep 08 '18 at 10:51
  • 1
    @KumarLav Could you explain why? Your question is unclear and you refuse to be more precise, yet you're unsatisfied with my answer. – Bram Roelandts Sep 08 '18 at 10:52
  • 2
    Apple would never accept an app that does what you propose in the 2nd half of this answer. If the app can be installed it must be allowed to run. Any valid solution must prevent the app from being installed (downloaded / purchased) at all. – rmaddy Sep 08 '18 at 15:49
  • @rmaddy While I do see your point, that’s not entirely true. Such “blocking” could be used for certain parts of an app. For example, certain features can be iPad-only. In addition to that, it’s also possible the OP is developing an in-house app. Your point is valid, but only in some cases. – Bram Roelandts Sep 08 '18 at 17:04
  • But an iPad-only feature simply wouldn't appear on the iPhone. You wouldn't pop up an alert saying "Sorry, iPad-only". My real point is that Apple isn't going to allow an app that, upon launch, posts a blocking alert that says "Sorry, this device isn't supported". If a device isn't supported, setup the app so it can't be installed on the device at all. – rmaddy Sep 08 '18 at 17:11
  • @rmaddy And that is also not entirely true. While the OP asked about a popup, my code could also be used to hide features. I think the fault does not lie in my answer. The OP specifically asked about a popup, and I mentioned that’s not the way it usually works. BUT if, for some reason, he does want to go through with it, my answer will help achieving that. – Bram Roelandts Sep 08 '18 at 17:15