试图让我的应用程序通用

Nat*_*pos 5 iphone universal ipad ios cordova

www使用PhoneGap框架在我的文件夹上有两个HTML文件.iPhone/iPod one(/mobile/index.html)和iPad one(/index.html).所以我在我的代码中使用此代码AppDelegate.m:

+ (NSString*) startPage
{
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
        return @"index.html";
    } else {
        return @"mobile/index.html";
    }
}
Run Code Online (Sandbox Code Playgroud)

编辑我Targeted Device FamilyiPhone/iPad.

但由于某种原因它不起作用.当我把它放在我的iPad上时,它仍然将应用程序置于兼容模式.我该怎么办?

sal*_*.dm 3

请尝试以下操作:

  • 选择您的目标。
  • 单击“项目”菜单并选择“升级 iPad 的当前目标”。
  • 在出现的对话框中,您有两个选择。选择“一个通用应用程序”。

不确定这就是你所缺少的。但是,如果您还没有这样做,那也不会有什么坏处。