使用Xcode 6编译的iPhone应用程序在iPad上作为Universal运行

时间:2021-03-29 22:52:01

I have got an app developed for iPhone family only, and I used to run it on iPad to test how it will look on iPhone 4s (since it launched with iPhone 4s resolution, size, and else '2x' round button for fullscreen support). However, now when I run it on my iPad with iOS 8, Xcode ignores all build settings and runs it as for iPad. My storyboard constraints were not projected for iPad screen.

我有一个专为iPhone系列开发的应用程序,我曾经在iPad上运行它来测试它在iPhone 4s上的外观(因为它推出了iPhone 4s分辨率,尺寸,以及'2x'圆形按钮,用于全屏支持) 。但是,现在当我在iOS 8的iPad上运行它时,Xcode会忽略所有构建设置并像iPad一样运行它。 iPad屏幕没有预测我的故事板限制。

I have:

  1. Devices option set to iPhone on General tab in project settings
  2. 设备选项在项目设置的常规选项卡上设置为iPhone

  3. Main storyboard file name and Main storyboard file name are removed from Info-plist
  4. 主要故事板文件名和主故事板文件名将从Info-plist中删除

  5. All App Icons and Launch Images for iPad are deleted
  6. iPad的所有应用程序图标和启动图像都将被删除

  7. In Launch Screen File the option Use Size Classes set to NO, and the assets are generated for iPhone only
  8. 在“启动屏幕文件”中,“使用大小类”选项设置为“否”,并且仅为iPhone生成资产

Is that a normal behavior? I want to use my iPad as before to test iPhone 4s resolution. I am sure that my app won't become universal because of that, but nevertheless I think this is a problem.

这是正常的行为吗?我想像以前一样用我的iPad来测试iPhone 4s的分辨率。我确信我的应用程序不会因此而变得普及,但我认为这是一个问题。

1 个解决方案

#1


5  

The use of Launch Screen File in iOS 8.0, 8.0.1 and 8.0.2 will make you universal.

在iOS 8.0,8.0.1和8.0.2中使用Launch Screen File将使您具有普遍性。

This is a know bug and fixed in iOS 8.1, for you only option is to use assets catalog with a launch images.

这是一个已知错误并已在iOS 8.1中修复,因为您只能选择使用带有启动映像的资产目录。

Or you can add the device modifier in the Launch file name, like <launchNib>~iphone.nib

或者您可以在启动文件名中添加设备修改器,例如 ~iphone.nib

#1


5  

The use of Launch Screen File in iOS 8.0, 8.0.1 and 8.0.2 will make you universal.

在iOS 8.0,8.0.1和8.0.2中使用Launch Screen File将使您具有普遍性。

This is a know bug and fixed in iOS 8.1, for you only option is to use assets catalog with a launch images.

这是一个已知错误并已在iOS 8.1中修复,因为您只能选择使用带有启动映像的资产目录。

Or you can add the device modifier in the Launch file name, like <launchNib>~iphone.nib

或者您可以在启动文件名中添加设备修改器,例如 ~iphone.nib