How to prevent app running on incompatible device.

Is there a simple way to prevent my app to run on device below iPhone 4S and iPad3 ?

I have two scenarios :

  • Hide the device on the appstore level by tweaking in Xcode.
  • Show a message at runtime saying : Sorry, as specified on the appstore,
    your device does not match the minimum configuration.

Which one is the best and how to do it ?

Any one is okey.

how to check
iPhone-generation