How to prevent installation of an application on the iPad
How do I build an app in Xcode to pr开发者_运维问答event it's installation on an iPad? The answers to related questions I see here seem to refer to settings and procedures that no longer apply in Xcode 4.
Unfortunately this it is not possible to prevent an installation of an app on a certain type of device.
But a cheap and dirty way to prevent iPad users from using the app would be to check in the appDelegate
:
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
//UIAlertView this app will not run on iPad
}
and than in the UIAlertView
Delegate:
exit();
This will cause the app to not run on the iPad.
精彩评论