简体   繁体   English

启动黑屏 - iOS应用程序

[英]Black screen on launch - iOS app

Some of my users are saying that my app creates a black, empty screen on launch, which I simply cannot reproduce. 我的一些用户说我的应用程序在启动时会创建一个黑色的空屏幕,我根本无法重现。 Does anyone have advice on how to go about solving this? 有没有人就如何解决这个问题提出建议?

I have some SQLite data that gets loaded into an NSDictionary object right after launch--in a file called SecondaryLoadingViewController.m, on a background thread. 我有一些SQLite数据在启动后立即加载到NSDictionary对象中 - 在后台线程上的一个名为SecondaryLoadingViewController.m的文件中。 This view controller merely displays a replica of our splash screen image, which definitely isn't empty...or black. 此视图控制器仅显示我们的闪屏图像的副本,该副本绝对不是空的......或黑色。 I'm not blocking the main thread, and this only happens for about two or three seconds on an iPhone 5. 我没有阻止主线程,这只在iPhone 5上发生了大约两三秒钟。

Furthermore, I've got NSAssert statements throughout my database code, so if something were to go wrong in there, you'd think that would result in a crash--not a black, empty screen. 此外,我在整个数据库代码中都有NSAssert语句,所以如果出现问题,你会认为这会导致崩溃 - 而不是黑屏,空白屏幕。

I'm lost here. 我迷失在这里。 I guess I could email the affected users and ask them to use an application like iExplorer to send me all of their user data in an attempt to reproduce the problem for once? 我想我可以通过电子邮件发送受影响的用户,并要求他们使用像iExplorer这样的应用程序向我发送所有用户数据,以尝试重现问题一次?

Any other ideas would be awesome. 任何其他想法都会很棒。 Thanks. 谢谢。

It turns out the black screen only showed up on the iPod, not the iPhone or iPad. 事实证明黑屏只出现在iPod上,而不是iPhone或iPad上。 The problem was this key in the plist file: 问题是plist文件中的这个键:

"Main storyboard file base name (iPhone)" “主要故事板文件基本名称(iPhone)”

Notice the "(iPhone)" at the end. 注意最后的“(iPhone)”。 I have no idea how that got there, but deleting "(iPhone)" from the key solved everything. 我不知道如何到达那里,但从键中删除“(iPhone)”解决了一切。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM