本文介绍了iPhone App被拒绝:首次启动时,iPad上的屏幕变白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的仅iPhone应用程序被拒绝,但是当Apple在iPad x1/x2上尝试该应用程序时,该应用程序在启动屏幕后变成白色.我认为状态栏是问题所在,但我不确定.我在plist中有View controller-based status bar appearance NO.然后在PageViewController中的第一个VC上,使用UIApplication.sharedApplication().statusBarHidden = false.

My iPhone only app got rejected, but when Apple tried it on an iPad x1/x2 the app turned white after the launch screen. I think the status bar is the problem, but I'm not sure. I have View controller-based status bar appearance NO in plist. And then on my first VC in a PageViewController I use UIApplication.sharedApplication().statusBarHidden = false.

从内存中删除并重新打开该应用后,该应用会正常运行.

The app runs as it should when it's removed from memory and reopened.

还有其他人遇到同样的问题吗?

Has anyone else faced the same problem?

修改:

更多信息:LaunchScreen之后,我的第一个ViewController是PageViewController,在第一个ViewController中,我打开了一个正在加载的ViewController,同时下载了一些json.这看起来/似乎是启动屏幕的扩展,但是带有LaunchScreen中使用的图像的动画,当下载JSON时,我将其删除并显示了PageViewController.

Some more info: After LaunchScreen my first ViewController is a PageViewController and in the first ViewController I open a loading ViewController while downloading some json. This looks/appears as an extension of the launch screen but with a animation of the image used in LaunchScreen, when the JSON is downloaded I remove it and my PageViewController shows.

self.loadingViewController = LoadingiewController()
self.loadingViewController!.view.frame = self.view.bounds
self.navigationController?.view.addSubview(self.loadingViewController.view)

Edit2 :

所以我仍然有问题.它仅在TestFlight版本中.我将状态栏从浅"更改为默认",将其隐藏至可见.

So I still have the problem. It's only in the TestFlight version. I'm manipulating the status bar from Light to Default, hidden to visible.

在Xcode/Devices实时日志下,我得到以下信息:

Under Xcode/Devices live log I get this:

<Warning>: Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want.
    Try this:
        (1) look at each constraint and try to figure out which you don't expect;
        (2) find the code that added the unwanted constraint or constraints and fix it.
(
    "<NSLayoutConstraint:0x13e61d790 V:|-(20)-[UIInputSetContainerView:0x13e546f30]   (Names: '|':UITextEffectsWindow:0x13e544af0 )>",
    "<NSLayoutConstraint:0x13e632b30 'UIInputWindowController-top' V:|-(0)-[UIInputSetContainerView:0x13e546f30]   (Names: '|':UITextEffectsWindow:0x13e544af0 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x13e61d790 V:|-(20)-[UIInputSetContainerView:0x13e546f30]   (Names: '|':UITextEffectsWindow:0x13e544af0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

Edit3 :

所以我才注意到.如果我从TestFlight弹出窗口/警报窗口中打开新安装的应用程序,则约束将被打破,并且该应用程序将变为白色.但!如果我是第一次从SpringBoard中打开应用程序,则该应用程序会运行.这太奇怪了.

So I just noticed. If I open the app newly installed from the TestFlight popup/alert window the constraint gets broken and the app goes white. But! If I open the app from the SpringBoard the first time it works. This is so strange.

推荐答案

我们在didFinishLaunchingWithOptions

删除此行即可解决.

这篇关于iPhone App被拒绝:首次启动时,iPad上的屏幕变白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 14:33