简体   繁体   中英

iPhone App Rejected: first time launch the screen turns white on iPad

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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