问题
I had my app working perfectly. I've updated the Xcode to the latest 10.2 version and something weird happened (as usual with any update...)
The app runs smoothly on the debugger. No issues at all!
When I archive a version to testflight, that version shows the splashscreen then goes into black screen (without crashing) just stays in the black screen... does anyone know what might be happening here?
thanks in advance
回答1:
Because of iOS 13 and later, app launch different than earlier versions. Using the latest xCode-11, If you run or install the app from TestFlight on iOS 13 it should work but below 13 it will show black or splash screen. Actually UIApplicationMain
expect a window property in AppDelegate
which is in iOS-13 inside SceneDelegate
. So simply add this line of code (declare window property) in your AppDelegate.
Swift:
var window: UIWindow?
Objective-C:
@property (strong, nonatomic) UIWindow *window;
回答2:
I wasn't able to find what was going on... so i fixed it by installing xcode 10.1... it works again.. so it's an Xcode 10.2 issue
来源:https://stackoverflow.com/questions/55386242/after-updating-to-xcode-10-2-build-gets-black-screen-on-testflight