We have to send the captured image simultaneously in a background thread. we have used this DispatchQueue to call below API.
@IBAction func gallery(_ sender: Any) {
func upload(imageData: Data,fileName: String,completion:@escaping (_ success:Bool, _ error:String) -> Void) {
DispatchQueue.global(qos: .background).async{
//code
})}
}
@IBAction func camera(_ sender: Any) {
func upload(imageData: Data,fileName: String,completion:@escaping (_ success:Bool, _ error:String) -> Void) {
DispatchQueue.global(qos: .background).async{
//code
})}
}
@IBAction func contine(_ sender: Any) {
func session(session: String,completion:@escaping (_ success:Bool, _ error:String) -> Void) {
)}
}
The problem is I have another service "session" web service to call after captured the documents. No need to wait for a response. But I can't get value for this "session" web service. How to call the service simultaneously without waiting for a response.