Problems when using objc_util()
@rozaimech, recommend trying
objc_util.retain_globalon the delegate. Classic fix for ”second run” issues.
@rozaimech, I forgot that we need to retain the reference to the block. This seems reliable, and no progress needed:
def handler(_cmd, _object, _error): obj = ObjCInstance(_object) print(obj) handler_block = ObjCBlock( handler, restype=None, argtypes=[c_void_p, c_void_p, c_void_p]) retain_global(handler_block)
I forgot that we need to retain the reference to the block.
I also knew it from a previous similar problem but I already forgot it, as usual 😢
@cvp, yes. It applies to all descriptors, by definition.
Due to a bug, same way of calling using
on_main_threadis currently needed for
set_idle_timer_disablednot to crash.