简体   繁体   English

如何在Xcode 5中手动将仅限iPhone的应用程序转换为Universal?

[英]How to manually convert an iPhone-only app to Universal in Xcode 5?

I have an iPhone-only app which needs to become universal. 我有一个只有iPhone的应用程序,需要变得普遍。 I selected the target and changed Deployment Info > Devices from "iPhone" to "Universal". 我选择了目标并将部署信息>设备从“iPhone”更改为“通用”。 The blog post I found says Xcode asks you what to do. 我发现的博文说Xcode会问你该怎么做。 But it didn't ask anything. 但它没有问任何问题。 When I run the app on iPad it just crashes with no log in console. 当我在iPad上运行应用程序时,它只是崩溃而没有登录控制台。

The problem can be that my project doesn't use any xib files. 问题可能是我的项目不使用任何xib文件。 Is there a resource that details what exactly you need to configure to make an app universal by hand? 是否有资源详细说明您需要配置什么才能使应用程序通用?

For making your App Universal: 制作App Universal:

  • In Targets -> General -> Deployment Info -> Set Devices to Universal 在目标 - >常规 - >部署信息 - >将设备设置为通用
  • Now create iPad XIBs for the page that you have created. 现在为您创建的页面创建iPad XIB。
  • Select xib -> Go to File's Owner -> Choose Custom class tab in inspector -> Set the class name for which you have created the iPad xib 选择xib - >转到文件所有者 - >选择检查器中的自定义类选项卡 - >设置已为其创建iPad xib的类名
  • Now select the view of that xib & go to inspector -> Set Referencing Outlets for the view 现在选择该xib的视图并转到检查器 - >为视图设置引用插座

After following these steps while you run the Application into iPad than iPad screen will be opened without any crash. 在将应用程序运行到iPad之后执行这些步骤之后,将打开iPad而不会发生任何崩溃。

Please note that you need to follow the steps every time when you create new iPad xib. 请注意,每次创建新的iPad xib时都需要按照步骤操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将通用应用程序转换为仅iPhone - Convert a universal application to iPhone-only 如何在仅适用于iPhone的应用程序的XCode 4.3中指定iPad Retina图标? - How do I specify an iPad Retina icon in XCode 4.3 for an iPhone-only app? 在Xcode 7.2中仅将iPhone App转换为Universal App - Convert only iPhone App to Universal App in Xcode 7.2 在iPad上运行通用iOS应用程序尝试调用仅限iPhone的类 - Running universal iOS app on iPad tries to call iPhone-only class 如何将Xcode 4.1 iPhone应用程序转换为通用应用程序 - How to convert xcode 4.1 iPhone app in to Universal app 对于仅限iPhone的应用程序,Xcode中的“需要全屏”选项有什么影响? - What is the impact of the “Requires full screen” option in Xcode for an iPhone-only app? 将Xcode 4.6 iPhone应用程序转换为通用应用程序 - Convert xcode 4.6 iPhone app in to Universal app 在Xcode 4.2上将iPhone应用程序转换为通用应用程序 - Convert iPhone app to Universal app on xcode 4.2 如何在Xcode 7或更高版本中将我的iOS App从iPhone转换为通用? - How to convert my iOS App from iPhone to universal in Xcode 7 or later? Titanium-如何使仅iPhone应用程序在iPad的兼容模式下良好运行? - Titanium - How to make an iphone-only app run nicely in iPad's compatibility mode?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM