After updating to Xcode 10.2 build gets black screen on testflight

非 Y 不嫁゛ 提交于 2020-02-24 08:15:46

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!