Xcode 12: iOS 14 Widget all black in simulator. How to fix?
Asked Answered
C

2

3

I want to add some iOS 14 widgets to my existing iOS app. When testing the widget in simulator it frequently happen, that the widget is not displayed correctly but is all black. Both in the widget selection dialog and in the actual widget that is shown on the homescreen.

Re-running the app does not solve the problem. In most cases the problem goes away when deleting the app and restarting the simulator. However, in some rare cases only deleting the simulator and adding a new one solved the problem.

So far this only happened when running the app in simulator while on a real devices everthing is OK. Since the problems goes away when switching the simulator, I assume that there is nothing wrong with my code. But of course I want to be sure, that this is not a problem of the app itself before submitting and publishing the app.

Is this a known problem in Xcode 12? Am I doing something wrong? Is there a known fix?

So far I only found some posts from users who experienced this problem with other apps in early versions of iOS 14 beta. But these problems should have been fixed with later beta versions and should of course not happen any more in the final iOS 14 version.

Christenachristendom answered 5/10, 2020 at 9:16 Comment(0)
P
0

Looks like a known apple issue on simulator as mentioned here https://developer.apple.com/forums/thread/650782

Pamphleteer answered 28/1, 2021 at 3:12 Comment(0)
A
0

If you use custom fonts within your code, if you don't include the font files in the Widget target + declare them in Info.plist you will get the black screen and no visible error

Ariannaarianne answered 27/5 at 9:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.