I'm trying to use the code sample as a starting point with NetworkExtension
though I'm having some troubles when trying to execute the "register" function in IPCConnection
BTW I'm new to swift (never had any expirience with it before, I'm coming from low level C so I'm not that familiar with this syntax).
I'm getting an error for the lines
guard let providerProxy = newConnection.remoteObjectProxyWithErrorHandler({ registerError in
os_log("Failed to register with the provider: %@", registerError.localizedDescription)
self.currentConnection?.invalidate()
self.currentConnection = nil
completionHandler(false)
}) as? ProviderCommunication else {
fatalError("Failed to create a remote object proxy for the provider")
}
the "fatalError" line is the one I'm reaching, and I haven't got an idea regarding the cause of the issue.
--- EDIT:
Okay, so I figured I forgot to actually set the provider using the line
newConnection.remoteObjectInterface = NSXPCInterface(with: ProviderCommunication.self)
and now it's running without any fatal errors, but I'm still getting the next error
Failed to register with the provider: %@ Couldn’t communicate with a helper application.
Not sure what's "helper application" means