Documentation Archive Developer
Search

XPC Changes for Swift

XPC

Declaration
From
func xpc_activity_register(_ identifier: UnsafePointer<Int8>, _ criteria: xpc_object_t, _ handler: XPC.xpc_activity_handler_t)
To
func xpc_activity_register(_ identifier: UnsafePointer<Int8>, _ criteria: xpc_object_t, _ handler: @escaping XPC.xpc_activity_handler_t)

Declaration
From
func xpc_array_apply(_ xarray: xpc_object_t, _ applier: XPC.xpc_array_applier_t) -> Bool
To
func xpc_array_apply(_ xarray: xpc_object_t, _ applier: @escaping XPC.xpc_array_applier_t) -> Bool

Declaration
From
func xpc_connection_send_message_with_reply(_ connection: xpc_connection_t, _ message: xpc_object_t, _ replyq: DispatchQueue?, _ handler: XPC.xpc_handler_t)
To
func xpc_connection_send_message_with_reply(_ connection: xpc_connection_t, _ message: xpc_object_t, _ replyq: DispatchQueue?, _ handler: @escaping XPC.xpc_handler_t)

Declaration
From
func xpc_connection_set_event_handler(_ connection: xpc_connection_t, _ handler: XPC.xpc_handler_t)
To
func xpc_connection_set_event_handler(_ connection: xpc_connection_t, _ handler: @escaping XPC.xpc_handler_t)

Declaration
From
func xpc_dictionary_apply(_ xdict: xpc_object_t, _ applier: XPC.xpc_dictionary_applier_t) -> Bool
To
func xpc_dictionary_apply(_ xdict: xpc_object_t, _ applier: @escaping XPC.xpc_dictionary_applier_t) -> Bool

Declaration
From
func xpc_main(_ handler: XPC.xpc_connection_handler_t) -> Never
To
func xpc_main(_ handler: @escaping XPC.xpc_connection_handler_t) -> Never

Declaration
From
func xpc_set_event_stream_handler(_ stream: UnsafePointer<Int8>, _ targetq: DispatchQueue?, _ handler: XPC.xpc_handler_t)
To
func xpc_set_event_stream_handler(_ stream: UnsafePointer<Int8>, _ targetq: DispatchQueue?, _ handler: @escaping XPC.xpc_handler_t)