Trying to generate an AppleScript executable for MacOS using Xcode 13 Applescript framework. Right out of the box, the project generated by Xcode has the following difficulty. As shown in the Connections inspector for the "App Delegate" icon, the "App Delegate" does not refer to the AppDelegate.applescript listed in the Project navigator. This results in the inability to connect UI elements to the AppleScript code. A screenshot of the Connections inspector is attached showing the error "AppDelegate does not have an outlet named theWindow" whereas the script clearly defines such an outlet. This project is freshly generated, no changes have been made. Am I missing a configuration piece or something else? Examples I've watched on YouTube of generating simple "Hello World" apps all work as the Xcode IB does normally i.e., by using control-drag to contact different objects, but they were all done on earlier versions of Xcode.
Trying to use Xcode 13 with Applescript framework
Am I missing a configuration piece or something else?
I think this is Just a Bug™. Indeed, if I take a project that I created with Xcode 13.0 and open it in Xcode 12.5, I can wire up outlets and actions there.
I encourage you to file a bug report about this. Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
So Eskimo, thanks for your quick analysis. I submitted a report using Feedback Assistant and got a number, FB9680966. I'm not sure it's a bug report, I'll look further. And in the meantime I should come up with an earlier version of Xcode. And James-Liu, appreciate the confirmation.
FB9680966
Thanks!
tried this with Xcode 12 … and it all works fine
Cool.
Be aware that Xcode 12 is not supported on macOS 12 (per the release notes) so take that into account before upgrading.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
I noticed that @IBOutlet
and @IBAction
support appears to have quietly disappeared from Python in Xcode 13 as well. I was able to fix it in my case by creating fake Objective C or Swift classes which have the relevant named IBAction/IBOutlet names, and then just not including them in any build; just including the files in the project so Interface Builder can see them.