Posts

Post not yet marked as solved
1 Replies
387 Views
I tried low level XPC API. Here is the sample code.  int main(int argc, char *argv[]) { init_dispatch_queue();  xpc_main(handler); es_client_t *client; es_new_client_result_t result = es_new_client(&client, ^(es_client_t *c, const es_message_t *msg) { handle_event(c, msg); }); if (result != ES_NEW_CLIENT_RESULT_SUCCESS) { os_log_error(OS_LOG_DEFAULT, "Failed to create the ES client: %d", result); return 1; } es_event_type_t events[] = { ES_EVENT_TYPE_AUTH_EXEC, ES_EVENT_TYPE_AUTH_OPEN }; if (es_subscribe(client, events, sizeof(events) / sizeof(events[0])) != ES_RETURN_SUCCESS) { es_delete_client(client); return 1; } dispatch_main(); }  xpc_main() function internally calls dispatch_main. Other extension code didn't execute. I added XPCService dict in info.plist and added RunLoopType as NSRunLoop as given in link. But it still don't work well.   NSXPConnection API that allows extension to function. I can't use these API as pyobjc do not support block calls.   Can we make low level xpc_main() to execute in second thread and not block extension.
Posted Last updated
.
Post marked as solved
1 Replies
326 Views
I tried Sample app given in WWDC. Using "ES_EVENT_TYPE_AUTH_OPEN" I could stop writing to file using echo. But if I use vim or text edit and edit the file it saves the changes. I tried "ES_EVENT_TYPE_AUTHSIGNAL", "ES_EVENT_TYPE_AUTH_UNLINK", "ES_EVENT_TYPE_AUTH_TRUNCATE", but no luck.
Posted Last updated
.
Post not yet marked as solved
0 Replies
748 Views
Apple has announced that we'll be submitting patches to enable Python3 to build natively for Apple Silicon.  Will there be support for Python 2.7.18 as well. We have our application compiled with Python2.7.18 and packaged using PyInstaller. I don't find any way to create an universal application using Python and PyInstaller. Next plan is to setup Python and PyInstaller on native Apple Silicon machine and create separate builds.
Posted Last updated
.