iPhone App Rejected:第一次启动iPad屏幕变白 [英] iPhone App Rejected: first time launch the screen turns white on iPad

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

问题描述

我的 iPhone 唯一应用程序被拒绝了,但是当 Apple 在 iPad x1/x2 上尝试它时,应用程序在启动屏幕后变成白色.我认为状态栏是问题所在,但我不确定.我在 plist 中有 基于控制器的状态栏外观 NO.然后在 PageViewController 中的第一个 VC 上,我使用 UIApplication.sharedApplication().statusBarHidden = false.

当应用从内存中删除并重新打开时,它会按原样运行.

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

编辑:

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

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

编辑 2:

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

在 Xcode/Devices live log 下,我得到了这个:

:无法同时满足约束.可能以下列表中的至少一项约束是您不想要的.尝试这个:(1) 查看每个约束并尝试找出您不期望的;(2) 找到添加不需要的约束或约束的代码并修复它.("<NSLayoutConstraint:0x13e61d790 V:|-(20)-[UIInputSetContainerView:0x13e546f30] (Names: '|':UITextEffectsWindow:0x13e544af0)>","<NSLayoutConstraint:0x13e632b30 'UIInputWindowController-top' V:|-(0)-[UIInputSetContainerView:0x13e546f30] (Names: '|':UITextEffectsWindow:0x13e544af0)>")将尝试通过打破约束来恢复<NSLayoutConstraint:0x13e61d790 V:|-(20)-[UIInputSetContainerView:0x13e546f30] (Names: '|':UITextEffectsWindow:0x13e544af0)>在 UIViewAlertForUnsatisfiableConstraints 处创建一个符号断点以在调试器中捕获它. 中列出的 UIView 上的 UIConstraintBasedLayoutDebugging 类别中的方法;也可能有帮助.

Edit3:

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

解决方案

我们在didFinishLaunchingWithOptions中有UIWindow.appearance().backgroundColor = UIColor.whiteColor()>

去掉这条线就解决了.

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?

Edit:

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:

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.

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:

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.

解决方案

We had UIWindow.appearance().backgroundColor = UIColor.whiteColor() in didFinishLaunchingWithOptions

Removing this line solved it.

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆