我的应用程序在 iPod 上仅显示黑屏

发布于 2024-11-14 18:54:43 字数 120 浏览 3 评论 0原文

我的应用程序已投入生产,可在除 iPod touch 之外的所有设备上正常运行,iPod touch 在启动应用程序时仅显示黑屏。 有谁知道这可能是问题所在吗? iPod touch 运行的是 4.2.1 iOS 版本。 谢谢

My app is in productions an works correctly in all devices except the iPod touch, which only shows a black screen when start the app.
Does any body knows which could be the problem?
The iPod touch is running with the 4.2.1 iOS version.
Thnks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

叫嚣ゝ 2024-11-21 18:54:43

正如 @ValentiGoClimb评论,Xcode 在生成时有错误的默认值Info.plist文件;它仅设置 iPad 和 iPhone 的情节提要键,而不是 iPod Touch。

<key>UIMainStoryboardFile~ipad</key>
<string>iPadStoryboardFileName</string>
<key>UIMainStoryboardFile~iphone</key>
<string>iPhoneStoryboardFileName</string>

我还没有找到在 Xcode 的常规项目设置屏幕下编辑此内容的好方法(这就是这个问题最有可能存在的原因),因此在 Info.plist 文件中手动添加密钥效果很好。

<key>UIMainStoryboardFile</key>
<string>iPhoneStoryboardFileName</string>

As @ValentiGoClimb mentioned in the comment, Xcode has bad defaults when generating the Info.plist file; it only sets the Storyboard keys for iPads and iPhones, not iPod Touches.

<key>UIMainStoryboardFile~ipad</key>
<string>iPadStoryboardFileName</string>
<key>UIMainStoryboardFile~iphone</key>
<string>iPhoneStoryboardFileName</string>

I haven't found a good way to edit this under the General Project settings screen in Xcode (which is why this problem most likely exists), so adding the key manually in the Info.plist file works well.

<key>UIMainStoryboardFile</key>
<string>iPhoneStoryboardFileName</string>
琉璃繁缕 2024-11-21 18:54:43

您的 iPod 应该配备视网膜显示屏。

所以只需尝试使用 [email protected]

并且请确保资源中有此内容。

Your iPod is supposed to have the retina display.

so just try using [email protected] .

And also please make sure to have this in resources.

笛声青案梦长安 2024-11-21 18:54:43

试试这个 -

  1. 打开主窗口的 xib 文件,
  2. 在检查器窗口中的 xib 文件中选择窗口
  3. ,选择第一个选项卡
  4. ,选中“启动时可见”

Try this -

  1. Open your mainwindow's xib file
  2. select window in xib file
  3. in inspector window select first tab
  4. check mark the "visible at launch"
注定孤独终老 2024-11-21 18:54:43

对我来说,我使用的是 XIB 而不是 Storyboard
但在 Xcode 10 中,它在目标设置中被设置为“MainStoryBoard”作为主界面。

所以我已经从“MainStoryBoard”更改为“MainWindow”并为我工作。

是问题
已修复
使用 XIB作为主界面

For me, I’m using XIB not Storyboard.
But with Xcode 10 it’s set as “MainStoryBoard” as Main Interface in target setting.

So I have changed from “MainStoryBoard” to “MainWindow” and worked for me.

Was Problem
Fixed
Using XIB as Main Interface

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文