Hello all!
So I've tried to make use of MFi controllers with Pythonista, however I can't get it to trigger a 'GCControllerDidConnectNotification'.
Thanks to @omz's previous help with NSNotificationCenter I built a little script to make it easier to handle those things. If you take a look at it, it works just fine with the test case notification. However following code wont trigger for me when I connect a controller:
from objc_util_ext import *
from objc_util import *
def cnotification(new_controller):
print 'Connected'
controller_framework = import_framework('GameController')
observer_add('GCControllerDidConnectNotification',cnotification)
Also following returns an empty list, eben when I have a controller connected (which is also recognised by other apps which can use controllers):
controller = ObjCClass('GCController')
print controller.controllers()