iOS Async
Void function example
// Await
let error: ProvenError? = await agent.start(startUpTimeout: nil)
if (error != nil) {
// Handle error
} else {
print("Agent Started!")
}
// Or use a completion handler
agent.start(startUpTimeout: nil) { error in
if (error != nil) {
// Handle error
} else {
print("Agent Started!")
}
}[agent startStartUpTimeout: nil
completion:^(ProvenmobileProvenError *_Nullable error){
if(error){
// Handle error
}else{
NSLog(@"Agent Started!");
}
}
];Returning function example
KMPNativeCoroutines
Last updated
Was this helpful?