Forum Libraries, Components, and Plugins

Binding COVID library, bridging functions headers in swift to objective c understand

Hi!

I'm trying to bind the lib DP-3T for Xamarin.iOS (it's in GitHub but I can't put links here). I've problems with some functions that they use callbacks like:

public func sync(completionBlock: ((Result<Void, DP3TTracingError>) -> Void)? )

or enums with different params like:

public enum DP3TNetworkingError : Error {

        case networkSessionError(error: Error)
        case notHTTPResponse
        case HTTPFailureResponse(status: Int)
    ...

that I don't know how to represent in swift that objc can understand. Anyone has ideas or examples of how to convert this type of objects to something that objective-c understand?

Thanks.

Sign In or Register to comment.