Hello,
I’m trying to implement this abstract function in my shared code to swift
abstract class FacebookAnalytics {
@NativeCoroutines
abstract suspend fun logEvent(event: String, properties: Map<String, String>)
}
public class TestFacebookAnalyticsWriter : FacebookAnalytics {
public override func logEvent(event: String, properties: [String : String]) -> (@escaping (KotlinUnit, KotlinUnit) -> KotlinUnit, @escaping (Error, KotlinUnit) -> KotlinUnit, @escaping (Error, KotlinUnit) -> KotlinUnit) -> () -> KotlinUnit {
print("FacebookAnalytics: logEvent()")
AppEvents.shared.logEvent(AppEvents.Name(event), parameters: properties)
}
}
And then I want to call this Analytics as such:
let analytics = TestFacebookAnalyticsWriter()
try! await asyncFunction(for: analytics.logEvent(event: "", properties: ["" : ""]))
But I don’t know what to return from the TestFacebookAnalyticsWriter logEvent function