Inspired by @rafa’s https://docktor.site, I created Squircle - a free Mac app that adds the correct corner radius, padding, and shadow to square app icons following Apple's design guidelines. Just drop the square icon in and out you get a single png or an appiconset for Xcode.

https://apps.apple.com/us/app/squircle-resize-app-icons/id6499279814

Docktor, for Mac

Preview app icons in the Dock

Docktor, for Mac
While creating this app, I discovered that macOS app icons aren’t just smooth rounded rectangles or continuous rounded rectangles, as Sketch and SwiftUI call them, but rather a cubic Bézier curve with 52 points. I solved this problem by inspecting the SVG representation of this curve to get the coordinates for a SwiftUI shape.