I've recently been using ChatGPT's "Code Copilot" to produce Swift scripts, and it's worked rather well.
I started off by just asking for a simple function, largely as a means to get a working example of some of Apple's APIs; but by gradually building it up, in the manner of a teacher ("Now...