UIAlertView is deprecated and unavailable for UIScene based applications, please use UIAlertController!

Description
I’d like to know if there is a way for using SwiftUI and MobileRTC Alerts together. Since SwiftUI uses @main like below, it seems like some crashes regarding Scene and UIAlertView are occurring.

@main
struct MyNewApp: App {
    var body: some Scene {
        WindowGroup {
                AppView()
        }
    }
}

The output is also added below:

[unspecified] An empty string is not a valid group container identifier.

2022-06-21 12:05:27.969495+0300 CeibaTeleHealth[12418:1113397] [unspecified] container_create_or_lookup_app_group_path_by_app_group_identifier: client sent invalid parameters

2022-06-21 12:05:27.994152+0300 CeibaTeleHealth[12418:1113397] *** Terminating app due to uncaught exception ‘NSObjectNotAvailableException’, reason: 'UIAlertView is deprecated and unavailable for UIScene based applications, please use UIAlertController!'

***** First throw call stack:**

(0x1c2f9d288 0x1dbc97744 0x1c2ff4390 0x1c5a7d064 0x1c5a7d59c 0x10bc8b214 0x10bd2d200 0x10ba99460 0x10beba1a0 0x10cf5d7c8 0x1c2fb2678 0x1c2f36654 0x1c2f30e00 0x1c2f0f4b0 0x1c2f22bc8 0x1df056374 0x1c5892648 0x1c5613d90 0x1cad74f24 0x1caca2e08 0x1cac840f4 0x104fecda4 0x104fece34 0x104ff2748 0x105c95ce4)

libc++abi: terminating with uncaught exception of type NSException

dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

*** Terminating app due to uncaught exception ‘NSObjectNotAvailableException’, reason: ‘UIAlertView is deprecated and unavailable for UIScene based applications, please use UIAlertController!’

terminating with uncaught exception of type NSException

Additionally, Scene delegate methods are removed from App Delegate and the file is deleted. UIApplicationSceneManifest is removed as well.

I’m facing the crash explained above sometimes when opposite side’s ending the call. I think SDK is trying to use an UIAlertView occasionally. The Scene structure of SwiftUI is not letting it happen and then the app crashes.

Is there a way to avoid that issue?

To Reproduce(If applicable)
Steps to reproduce the behavior(mostly occurring scenario):

  1. User1: Start call
  2. User2: Accept Call
  3. User2: Ends call before User1 gets to see his/her own video view
  4. User1: App crashes

Smartphone (please complete the following information):

  • Device: [e.g. iPhone 11 Pro]
  • OS: [e.g. iOS 15.5]