xcode 应用程序在 iPad 上运行,但仅适用于 iPhone
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30595032/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
App running on iPad while its iPhone-Only
提问by sdd
I made an iPhone App with Xcode. The devices setting is set to "iPhone". But in iTunes Connect it is rejected because it doesn't run on the iPad.
我用 Xcode 制作了一个 iPhone 应用程序。设备设置设置为“iPhone”。但是在 iTunes Connect 中它被拒绝,因为它不能在 iPad 上运行。
That is weird because it is an iPhone app, but when I checked it in Xcode, I can run it with the iPad simulator,however I think that normally this is not possible with an iPhone app.
这很奇怪,因为它是一个 iPhone 应用程序,但是当我在 Xcode 中检查它时,我可以使用 iPad 模拟器运行它,但是我认为这通常不适用于 iPhone 应用程序。
I have added pictures to make my question clearer:
我添加了图片以使我的问题更清楚:
So what is gone wrong and how can I fix it?
那么出了什么问题,我该如何解决呢?
EDIT:
Picture from resolution center:
编辑:来自分辨率中心的图片:
回答by sdd
Thanks all, I Found the problem/solution:
谢谢大家,我找到了问题/解决方案:
In my info.plist there was an extra row called supported interface orientations(iPad) where the portrait mode was added.
在我的 info.plist 中,有一个额外的行称为支持的界面方向(iPad),其中添加了纵向模式。
I have no idea how this got added here but when I removed it, the problem was solved.
我不知道这是如何添加到这里的,但是当我删除它时,问题就解决了。
回答by Keab42
From the Apple iOS App Store Review Guidelines (https://developer.apple.com/app-store/review/guidelines/):
来自 Apple iOS App Store 指南 ( https://developer.apple.com/app-store/review/guidelines/):
2.10 iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution
2.10 iPhone 应用程序还必须在 iPad 上以 iPhone 分辨率和 2X iPhone 3GS 分辨率运行,无需修改
Basically, if you set an app to "Universal" it will have iPad and iPhone versions of the UI and will appear in the search results for both. If you set it to iPhone only, it will still be installable on iPads, but it doesn't appear in the search results by default. Additionally when a user does install it on an iPad it will just scale up the UI to best fit the screen. You cannot prevent your app from running on iPads.
基本上,如果您将应用程序设置为“通用”,它将具有 iPad 和 iPhone 版本的用户界面,并将出现在这两者的搜索结果中。如果您仅将其设置为 iPhone,它仍可安装在 iPad 上,但默认情况下不会出现在搜索结果中。此外,当用户将其安装在 iPad 上时,它只会放大 UI 以最适合屏幕。您无法阻止您的应用在 iPad 上运行。
回答by Julian E.
Every app can run on the iPad no matter if it is supported or not. The option you have in Xcode is if you want to configure it to look good on the iPad using it's own storyboard. If you configure it for both iPad and iPhone your app fill get a +in the right corner of the price on the App Store and show up on iPad searches. However if you don't configure it to support iPads it'll not show up on searches of the Apple App Store, unless osmose selects iPhone only. You can easily submit your app to the App Store, without it being rejected my friend. Hope that helps. Keep coding.
无论是否支持,每个应用程序都可以在 iPad 上运行。您在 Xcode 中的选项是,如果您想使用它自己的故事板将其配置为在 iPad 上看起来不错。如果您为 iPad 和 iPhone 配置它,您的应用程序会在 App Store 价格的右角填写一个+,并显示在 iPad 搜索中。但是,如果您不将其配置为支持 iPad,它就不会出现在 Apple App Store 的搜索中,除非 osmose 只选择 iPhone。您可以轻松地将您的应用提交到 App Store,而不会被我的朋友拒绝。希望有帮助。继续编码。
回答by Santu C
Nothing is wrong here , you can do this in debug mode for development purpose. Even you can run it on your iPad device from xCode. Don't worry about it, nothing wrong here.
这里没有错,您可以出于开发目的在调试模式下执行此操作。甚至你可以在你的 iPad 设备上从 xCode 运行它。别担心,这里没有错。