Skip to content

Commit

Permalink
MTSDK 391 iOS demo app crashes when deployment config fetched
Browse files Browse the repository at this point in the history
- correct crash
  • Loading branch information
ksw5 committed May 17, 2024
1 parent 0d2aece commit 0bb3d3d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions iosApp/iosApp/TestbedViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,13 @@ extension TestbedViewController : UITextFieldDelegate {
self.info.text = "FileAttachmentProfile: <\(messenger.getFileAttachmentProfile())>"
case (.deployment, _):
messenger.fetchDeployment { deploymentConfig, error in
if let error = error {
self.info.text = "<\(error.localizedDescription)>"
return
DispatchQueue.main.async {
if let error = error {
self.info.text = "<\(error.localizedDescription)>"
return
}
self.info.text = "<\(deploymentConfig?.description() ?? "Unknown deployment config")>"
}
self.info.text = "<\(deploymentConfig?.description() ?? "Unknown deployment config")>"
}
case (.invalidateConversationCache, _):
messenger.invalidateConversationCache()
Expand Down

0 comments on commit 0bb3d3d

Please sign in to comment.