UIImageWriteToSavedPhotosAlbum crashed on Mac

I convert one of my painting apps to Mac Catalyst, everything works fine except for when save:
Code Block
UIImageWriteToSavedPhotosAlbum(canvas.getImage(), self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil)

This works on iPhone/iPad, but return an error on Mac (running macOS 11 beta 3) - any idea? Thanks!
Code Block
 {Error Domain=com.apple.photos.error Code=41002 "Unable to obtain photolibraryd XPC proxy for getResourceWriteOnlyServiceWithReply:. photolibraryd could have crashed" UserInfo=0x600003a264c0 (not displayed)}}}}}}
UIImageWriteToSavedPhotosAlbum crashed on Mac
 
 
Q