Skip to content
Snippets Groups Projects
Commit ab7c9026 authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Add RegisterForNotifications functor

parent fda62946
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!31Update Bindings
import Bindings
import XCTestDynamicOverlay
public struct RegisterForNotifications {
public var run: (Int, String) throws -> Void
public func callAsFunction(
e2eId: Int,
token: String
) throws {
try run(e2eId, token)
}
}
extension RegisterForNotifications {
public static let live = RegisterForNotifications { e2eId, token in
var error: NSError?
BindingsRegisterForNotifications(e2eId, token, &error)
if let error = error {
throw error
}
}
}
extension RegisterForNotifications {
public static let unimplemented = RegisterForNotifications(
run: XCTUnimplemented("\(Self.self)")
)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment