开发者

How to prevent installation of an application on the iPad

开发者 https://www.devze.com 2023-03-14 15:37 出处:网络
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 Xco

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消