【问题标题】:How to prevent installation of an application on the iPad如何防止在 iPad 上安装应用程序
【发布时间】:2011-06-22 22:35:16
【问题描述】:

如何在 Xcode 中构建应用程序以防止它安装在 iPad 上?我在这里看到的相关问题的答案似乎是指在 Xcode 4 中不再适用的设置和过程。

【问题讨论】:

    标签: build xcode4 installation app-store distribution


    【解决方案1】:

    很遗憾,无法阻止在特定类型的设备上安装应用程序。

    但阻止 iPad 用户使用该应用程序的一种廉价而肮脏的方法是签入appDelegate

    if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    //UIAlertView this app will not run on iPad
    }
    

    UIAlertView代表:

    exit();
    

    这将导致应用无法在 iPad 上运行。

    【讨论】:

    • 谢谢;但问题是如何首先防止安装。
    • 那不存在。所以代替,我创造了这个
    • 酷。如果是真的,你能编辑到那个效果吗?然后我会将此标记为答案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-06
    • 1970-01-01
    • 1970-01-01
    • 2011-04-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多