Post

Replies

Boosts

Views

Activity

Export image from Xcode's Canvas Live Preview (PreviewProvider)
Since we have "Live Preview" for SwiftUI in Xcode Canvas for some time now, I'm wondering 3 things: Why is it not already possible to simply export any Live Preview as PNG image? (ie. button which exports current preview, or right click "save as PNG" or even by adding some custom code in PreviewProvider) Is there a technical limitation to this kind of feature? How to do it without official support? (is there any way to find out where Xcode actually caches / stores its renders on disk and accces that image data somehow?) Any ideas where to look? Could perhaps simctl tool help somehow? I find it strange that nobody asked this before, or at least I couldn't find it (hence I'm writing this question), but isn't it obvious that this would be a super useful feature for generating App Store Screenshots directly from SwiftUI Live Preview in Xcode Canvas? Thanks in advance for any constructive feedback.
0
0
1k
Oct ’21