Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Sending iMessage and Facetiming/calling using Pythonista
-
Hi,
I have a few questions:- Is possible to send imessages/sms messages using pythonista?
- Is it possible to start a Facetime Audio/Facetime/Normal call using pythonista?
- Is it possible to check if you are currently on a Facetime Audio, Facetime or Normal call?
If yes to any of the above answers, could you please link me the documentation for this. I am wanting to create some shortcuts on my iPhone 11.
-
OMZ, our developer, hasn't put fully the ability to use Pythonista with shortcuts like he wants, but my following answers are the best to my knowledge and might not be 100% correct. But I always try lol
@Nik said:
- Is possible to send imessages/sms messages using pythonista?
- Apple's Sandboxing doesn't allow Explicitly Apps to manipulate other Apps.
@Nik said:
- Is it possible to start a Facetime Audio/Facetime/Normal call using pythonista?
- Same as answer for first Question
@Nik said:
- Is it possible to check if you are currently on a Facetime Audio, Facetime or Normal call?
- If this is possible I would look into
objc_util
module. then walking up he View Tree till you find Pythonista's Main View then getting a list of the Superview's Subviews. then iterate them to find iMessage or FaceTime.
Hope this helps!
-
-
-
@Nik, see below for a quick Proof of concept for tracking call status. You can find the other statuses to check in the
callObserver_callChanged_
in this Apple doc. If, instead of callbacks, you just want to check that there are no ongoing calls right now, check thatlen(controller.callObserver().calls())
returns zero.import time import webbrowser from objc_util import * load_framework('CallKit') CXCallController = ObjCClass('CXCallController') CXCallObserver = ObjCClass('CXCallObserver') def callObserver_callChanged_(_self, _cmd, _obserever, _call): call = ObjCInstance(_call) if call.outgoing: print('Calling...') ObserverDelegate = create_objc_class( 'ObserverDelegate', methods=[callObserver_callChanged_], protocols=['CXCallObserverDelegate'] ) controller = CXCallController.alloc().init() retain_global(controller) delegate = ObserverDelegate.alloc().init() retain_global(delegate) controller.callObserver().setDelegate_queue_(delegate, None) time.sleep(1) webbrowser.open('facetime-audio://123456789')
-
wow this is awesome! im going to look more into this! thanks!
-
This post is deleted! -
This post is deleted!