Thanks for the suggestion. However this approach would not help me since I want to generate different image data depending on the widget size. The suggested approach is taking one image and scaling it to fit the widget which is slightly different.
Post
Replies
Boosts
Views
Activity
It appears that this issue has been addressed in Xcode 12.0 beta 3 with the new placeholder APIs. The provider should now implement:
public func placeholder(with: Self.Context) -> Self.Entry
Thanks to this new API, the placeholder should have access to the context and should be able to use the displaySize.
I can reproduce this crash for my release version as well and reported the issue here: FB8178959
I figured out that if you disable the DEAD_CODE_STRIPPING settings for the release build, the widget is not crashing anymore. So I assume that this is an Xcode issue.