Recently I found that the macOS accessibility APIs can read individual controls in iOS Simulator apps – you can explore the whole UI from a macOS app.

However, I also found that it appears to shut down entirely once the App Sandbox is enabled. Some forum posts from Our Lord and Savior @justkwin seem to confirm this.

Annoyingly, it's perfectly possible if I use Xcode's private frameworks. I'm guessing shipping a Mac App Store app using those is a no-no, even if I check that Xcode is present? 👀

@twostraws @justkwin do you have a quick link to some documentation on that?
@crazybutable @justkwin Here's the forum post from Quinn, saying "It’s just limited to posting events." Earlier he cites this link, which says that accessibility APIs are restricted in sandbox: https://developer.apple.com/documentation/security/protecting-user-data-with-app-sandbox
Protecting user data with App Sandbox | Apple Developer Documentation

Guard user data and operating system resources from malicious attacks by limiting your app’s access to files, network connections, and hardware capabilities.

Apple Developer Documentation
@twostraws @justkwin thank you! A little googling on my part found the simctl command line tool, but I just got as far as various sites saying “oh if you want to do more than this you have to set up sockets and RPCs and Apple discourages this blah blah blah
@crazybutable @justkwin If you found any interesting links, please do send them back! I'm keen to learn more.

@twostraws @crazybutable By some coincidence, I posted a summary of this landscape earlier today,

https://developer.apple.com/forums/thread/820594?answerId=881772022#881772022

Title: Clipboard manager rejected … | Apple Developer Forums

@justkwin @crazybutable Well, your post *didn't* mention running things through Xcode's private frameworks, so I'm going to take that as tacit authorization that it's probably okay? 🫠