Pythonista trigger screen mirror motion control
I am trying to write a script that will activate the screen mirror shortcut on my iphone, for my Apple tv. I want to be able to "flick" my phone and have it start screen mirroring from that, instead of swiping down and hitting the screen mirroring button, and selecting from the options.
What I have learned so far: I can write the motion control, "flick" part of the script using , motion.get_user_acceleration(), and motion.get_attitude(). However, I can't find a way to activate the screen mirror shortcut. Any ideas or help would be very appreciated. Thanks in advance for your time and help.
That makes sense. Would it work to use something like IFTTT to trigger the screen mirror shortcut? I read that pythonista and IFTTT can work together.
IFTTT to trigger the screen mirror
Not sure that any app could access to this feature..
You can run a pythonista script from ifft, shortcuts, or a home screen icon. But turning screen mirroring on requires user action.
You can run a pythonista script from
iPhone flicking (settings/accessibility/touch/..)
Even MPAudioVideoRoutingPopoverController (Belongs to private API, not public, don't use it) does not support any more mirroring
The app was terminated due to an Objective-C exception. Details below: 2021-05-19 15:54:01.491399 Mirroring is no longer supported by MPAudioVideoRoutingPopoverController
Well, the airdop script worked great, just for sound though. It showed my apple TV, but only for speaker use. I looked for screen mirroring in accessibility, and couldn't find a shortcut there.
@smiddleton I think you can forget it. No way for an app to set screen mirroring for all apps. Security...
Thanks for the help everyone. I did learn a lot, and that is a win!
@smiddleton but it is so sad to terminate on a "no way"...
I guess you know that your "flick" can open the control center without any swipe, but you should still to have to tap on screen mirroring and on AppleTV.