I have an iOS/iPadOS app. When I run the app on Mac as a Designed for iPad app, Save button on the Share Sheet crashes the app.
I want to share a view with ImageRenderer, but here's an even easier example where I am trying to share an SF Symbol as an image.
ShareLink(item: Image(systemName: "swift"), preview: SharePreview(Text("PNG"), image: Image(systemName: "swift")))
Share button works. It opens Share Sheet. "Add to Photos" works. "Copy" works. I can paste the image file in Finder after I press "Copy". But when I press the "Save" button, my app crashes with the error:
Thread 1: "-[NSItemProvider pathExtension]: unrecognized selector sent to instance 0x600001c1e290"
How to fix this error? How to make saving the image work? Maybe I need additional permissions in plist? I already have "Privacy - Photo Library Additions Usage Description" and everything on iOS and iPadOS works without a problem.