应用程序适用于 iphone ipad 模拟器,但不适用于 ipad 设备:黑屏,然后熄灭
我有一个 iPhone 应用程序,可以在 iPhone 模拟器/设备上完美运行。
它以 iPhone 分辨率和 iPhone 2X 分辨率运行(即我没有为 iPad 添加任何根视图控制器)。
问题是该应用程序在 iPad 模拟器上运行良好,但在 iPad 设备中打开时,屏幕变黑,然后应用程序退出。
您认为此问题的原因是什么?
I've an iPhone app that Works perfectly on iPhone simulator/device.
It runs in iPhone resolution and iPhone 2X resolution (i.e. I didn't add any root viewcontrollers for iPad).
The problem is the application works fine on iPad simulator, but when open in iPad device, the screen goes black then the application exit.
What do you think the cause of this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚将 iPhone 应用程序升级为通用应用程序后遇到了这个问题。该应用程序在 iPhone 和 iPad 模拟器中运行,但当我尝试在 iPhone 上运行它时,我遇到了与您相同的黑屏和应用程序退出。
修复的目的是确保在 iPod/iPhone 部分和 iPad 部分的“项目目标摘要”页面上正确设置“主故事板”。由于某种原因,我的 iPod/iPhone 主故事板是空白的。修复后,我的应用程序开始运行。
I just ran into this problem after upgrading an iPhone app to be a universal app. The app worked in the iPhone and iPad simulators, but when I tried running it on my iPhone, I got the same black screen and app exit as you did.
The fix was to make sure that the 'Main Storyboard' was set properly on the Project Targets Summary page for both the iPod/iPhone section and the iPad section. For some reason, my iPod/iPhone Main Storyboard was blank. After fixing it, my app started working.