iPhone应用程序被拒绝:首次启动时,iPad上的屏幕变为白色

时间:2016-02-17 10:19:10

标签: ios swift app-store testflight

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

应用程序在从内存中删除并重新打开时应运行。

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

修改

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

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

Edit2

所以我仍然有问题。它只在TestFlight版本中。我正在操作状态栏从Light到Default,隐藏到可见。

在Xcode / Devices实时日志中,我得到了这个:

<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打开应用程序。这太奇怪了。

1 个答案:

答案 0 :(得分:1)

我们在UIWindow.appearance().backgroundColor = UIColor.whiteColor()

中有didFinishLaunchingWithOptions

删除此行解决了它。