iPhone Mirroring API

I'm super excited about the announcement of iPhone Mirroring on macOS.

Will there be a way to communicate with a connected device throughout an API? E.g., will we developers get a way to write automation or interact with the connected device via code?

Answered by DTS Engineer in 790726022

Sounds like we know each other?

Only parasocially, in that I read your blog.

I'll have to check out the new stuff, though!

Please do. Honestly, I don’t think there’s enough there to do what you want, but it’s good to confirm that before you go off to file your ERs.

However, I did wonder whether [CoreHID] has anything to do with communicating to connected iPhones

Nope. CoreHID is a new high-level API to interact with HID devices, and iOS devices aren’t those.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

To what end?

Are you looking for something that you might use during development? Or something that’d apply to end-user systems?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm building RocketSim (https://www.rocketsim.app), a developer tool that already works for the Simulator.

RocketSim shows a side window next to the Simulator, and would potentially also show it next to an iPhone Mirror.

The idea is to add actions like that allow developers to write automations like:

  • Login using a username/password (requiring an API to submit text)
  • Tap a button, fill in text, tap another button aka app navigation automation (requires both text input and UI interaction)

Developers have to perform many repetitive interactions in their apps during debugging, so it would be awesome if I could automate that for real devices!

Additionally, an API to enable developer settings like:

  • Network conditioner
  • Accessiblity settings

Oh, hey Antoine!

AFAIK there’s no API to do this sort of thing. There is the devicectl tool. Have you played around with it already? There’s a lot of interesting stuff in there, although I must admit that I haven’t taken the time to look through it all. And, IIRC, we added some new stuff with the current betas.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Oh, hey Antoine!

Sounds like we know each other? 🙈

AFAIK there’s no API to do this sort of thing. There is the devicectl tool. Have you played around with it already?

I have checked it out, but didn't find evidence of it being my answer. I'll have to check out the new stuff, though! However, I did wonder whether this new framework has anything to do with communicating to connected iPhones: https://developer.apple.com/documentation/CoreHID

Accepted Answer

Sounds like we know each other?

Only parasocially, in that I read your blog.

I'll have to check out the new stuff, though!

Please do. Honestly, I don’t think there’s enough there to do what you want, but it’s good to confirm that before you go off to file your ERs.

However, I did wonder whether [CoreHID] has anything to do with communicating to connected iPhones

Nope. CoreHID is a new high-level API to interact with HID devices, and iOS devices aren’t those.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Only parasocially, in that I read your blog.

Ah, that's so cool! Make me proud to see Apple developers read my content too 💪

Please do. Honestly, I don’t think there’s enough there to do what you want, but it’s good to confirm that before you go off to file your ERs.

Dang, you're completely right. This helps a ton already for what I want to built! Thanks a lot!

Nope. CoreHID is a new high-level API to interact with HID devices, and iOS devices aren’t those.

Perfect, that clarifies a lot and saves me some time investigating that library.

iPhone Mirroring API
 
 
Q