iOS 13.3,用XPC做沙盒App的通讯
xpc_connection_t connection = xpc_connection_create_mach_service(
"com.what.the.fuck.xpc", NULL, XPC_CONNECTION_MACH_SERVICE_PRIVILEGED);
xpc_connection_set_event_handler(connection, ^(xpc_object_t _Nonnull event) {
if (xpc_get_type(event) == XPC_TYPE_ERROR) {
// ios13,立刻就到这里了,connection invalid
}
};
xpc_connection_resume(connection);
iOS 12.4上一切正常……难道是iOS13搞了什么更高级的机制,不许沙盒App访问特权XPC服务?