Select the types of activity you want to include in your feed.
Add coresymbolicationd stub service
This service is used by Xcode when it crashes to help symbolicate the stack trace. However, stubbing it to return empty dictionary replies seems to be enough to get by.
···11+/**
22+ * This file is part of Darling.
33+ *
44+ * Copyright (C) 2023 Darling developers
55+ *
66+ * Darling is free software: you can redistribute it and/or modify
77+ * it under the terms of the GNU General Public License as published by
88+ * the Free Software Foundation, either version 3 of the License, or
99+ * (at your option) any later version.
1010+ *
1111+ * Darling is distributed in the hope that it will be useful,
1212+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ * GNU General Public License for more details.
1515+ *
1616+ * You should have received a copy of the GNU General Public License
1717+ * along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+ */
1919+2020+#include <xpc/xpc.h>
2121+#include <xpc/connection.h>
2222+#include <stdlib.h>
2323+#include <stdio.h>
2424+2525+#define SERVICE_NAME "com.apple.coresymbolicationd"
2626+2727+#ifndef ENABLE_LOG
2828+ #define ENABLE_LOG 0
2929+#endif
3030+3131+#if ENABLE_LOG
3232+ #define server_log(format, ...) do { printf("server connection: " format "\n", ## __VA_ARGS__); fflush(stdout); } while (0)
3333+ #define server_error(format, ...) do { fprintf(stderr, "server connection: " format "\n", ## __VA_ARGS__); fflush(stderr); } while (0)
3434+#else
3535+ #define server_log(format, ...)
3636+ #define server_error(format, ...)
3737+#endif
3838+3939+static void connection_handler(xpc_connection_t connection) {
4040+ server_log("Got a new connection: %p\n", connection);
4141+4242+ xpc_connection_set_event_handler(connection, ^(xpc_object_t object) {
4343+ char* desc = xpc_copy_description(object);
4444+ xpc_type_t type = xpc_get_type(object);
4545+ server_log("Received %s from connection %p: %s\n", (type == (xpc_type_t)XPC_TYPE_DICTIONARY) ? "message" : ((type == (xpc_type_t)XPC_TYPE_ERROR) ? "error" : "unexpected object"), connection, desc);
4646+ free(desc);
4747+4848+ // stub reply
4949+ xpc_object_t reply = xpc_dictionary_create_reply(object);
5050+ xpc_connection_send_message(connection, reply);
5151+ });
5252+ xpc_connection_resume(connection);
5353+};
5454+5555+static void handle_server_error(xpc_object_t error) {
5656+ if (error == XPC_ERROR_CONNECTION_INVALID) {
5757+ server_log("server died (or got cancelled)\n");
5858+ } else if (error == XPC_ERROR_TERMINATION_IMMINENT) {
5959+ server_log("someone wants to kill us\n");
6060+ } else {
6161+ server_error("received unexpected error: %s\n", xpc_copy_description(error));
6262+ exit(1);
6363+ }
6464+};
6565+6666+int main(int arc, char** argv) {
6767+ xpc_connection_t server = NULL;
6868+6969+ server = xpc_connection_create_mach_service(SERVICE_NAME, NULL, XPC_CONNECTION_MACH_SERVICE_LISTENER);
7070+7171+ xpc_connection_set_event_handler(server, ^(xpc_object_t object) {
7272+ xpc_type_t obj_type = xpc_get_type(object);
7373+ if (obj_type == (xpc_type_t)XPC_TYPE_CONNECTION) {
7474+ connection_handler(object);
7575+ } else if (obj_type == (xpc_type_t)XPC_TYPE_ERROR) {
7676+ handle_server_error(object);
7777+ } else {
7878+ server_error("received non-connection, non-error object in event handler: %s\n", xpc_copy_description(object));
7979+ exit(1);
8080+ }
8181+ });
8282+8383+ xpc_connection_resume(server);
8484+8585+ dispatch_main();
8686+ return 0;
8787+};