Hi!
The first thing, to say that all this works correctly debugging with XCode (Swift 4.2), the problem comes when uploading it to the AppStore that gives an error in the DispatchQueue, but I don't know how to see at what point it happens, seeing the log I can only see what happens in the DispatchQueue. This is what the log says, but they are all directions that I do not know how to interpret:
Thread 2 name: Dispatch queue: firmwareQueue
Thread 2 Crashed: .....
0 myapp 0x00..........
1 libdispatch.dylib 0x00..........
2 libdispatch.dylib 0x00..........
3 libswiftCore.dylib 0x00..........
4 myapp 0x00..........
5 myapp 0x00..........
...
In my program:
.....
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let progress = ProgressDialog(delegate: appDelegate.viewControllerActive!)
progress.Show(animate: true, message: "Updating…") // NOT SHOWING
let firmwareQueue = DispatchQueue(label:"firmwareQueue");
firmwareQueue.async {
self.update_firmware(progress: progress) {
.....
}
}
.....
In the function 'update_firmware' it connects via BT with a device and once the connection is established a series of messages are exchanged. In this exchange of messages, a counter is kept to see what is missing from the process and is shown to the user through a progress screen. Progress should be displayed in the ProgressDialog, this is the code inside the update_firmware function to show it:
.....
DispatchQueue.main.async {
self.progress!.SetText(message: "Updating device…")
self.progress!.SetProgressTotal(progress: Float(totalBlockCount))
self.progress!.SetShowProgressbar(show: true);
}
....
Although the progress dialog is not displayed before starting to communicate with the device, it does communicate with it and exchange some messages (I see it on the device before the program crashes).
Does anyone have any idea how I can see the point where it happens? Or if something similar has happened to someone?
Thanks