diff --git a/CHANGES.md b/CHANGES.md index e2f1607..2b27c5d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,11 @@ ## develop +## sora-ios-sdk-2022.3.0 + +- [ADD] 接続失敗時とサーバーによる切断時にエラー内容をアラートで表示する + - @szktty + ## sora-ios-sdk-2022.2.0 - [UPDATE] Environment.example.swift に signalingConnectMetadata を追加する diff --git a/Podfile b/Podfile index b229b02..8962440 100644 --- a/Podfile +++ b/Podfile @@ -5,7 +5,7 @@ platform :ios, '13.0' target 'SoraQuickStart' do use_frameworks! - pod 'Sora', '2022.2.0' + pod 'Sora', '2022.3.0' pod 'SwiftLint' pod 'SwiftFormat/CLI' diff --git a/README.md b/README.md index 4bf25d3..842d19e 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ Please read https://github.com/shiguredo/oss before use. - iOS 13 以降 - アーキテクチャ arm64, x86_64 (シミュレーターの動作は未保証) - macOS 12.2 以降 -- Xcode 13.2 -- Swift 5.5.2 +- Xcode 13.4 +- Swift 5.6.1 - CocoaPods 1.11.2 以降 - WebRTC SFU Sora 2021.2 以降 diff --git a/SoraQuickStart/ViewController.swift b/SoraQuickStart/ViewController.swift index f22464f..f5596d6 100644 --- a/SoraQuickStart/ViewController.swift +++ b/SoraQuickStart/ViewController.swift @@ -85,6 +85,13 @@ class ViewController: UIViewController { } if let error = error { NSLog(error.localizedDescription) + DispatchQueue.main.async { + let alertController = UIAlertController(title: "接続に失敗しました", + message: error.localizedDescription, + preferredStyle: .alert) + alertController.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil)) + self?.present(alertController, animated: true, completion: nil) + } } strongSelf.updateUI(false) } @@ -96,6 +103,13 @@ class ViewController: UIViewController { // 接続に失敗するとエラーが渡されます。 if let error = error { NSLog(error.localizedDescription) + DispatchQueue.main.async { [weak self] in + let alertController = UIAlertController(title: "接続に失敗しました", + message: error.localizedDescription, + preferredStyle: .alert) + alertController.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil)) + self?.present(alertController, animated: true, completion: nil) + } self.updateUI(false) return }