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.
}