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

**URL:** <https://devforum.zoom.us/t/uialertview-is-deprecated-and-unavailable-for-uiscene-based-applications-please-use-uialertcontroller/70831>\
**Category:** iOS\
**Created:** [June 21, 2022, 11:01am UTC](https://devforum.zoom.us/t/uialertview-is-deprecated-and-unavailable-for-uiscene-based-applications-please-use-uialertcontroller/70831 "2022-06-21T11:01:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![basakertugrul9](https://avatars.discourse-cdn.com/v4/letter/b/e480ec/32.png) [@basakertugrul9](https://devforum.zoom.us/u/basakertugrul9)\
**Post date:** [June 21, 2022, 11:01am UTC](https://devforum.zoom.us/t/uialertview-is-deprecated-and-unavailable-for-uiscene-based-applications-please-use-uialertcontroller/70831/1 "2022-06-21T11:01:30Z")

</div>

**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.

```auto
@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**]

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [July 21, 2022, 9:01pm UTC](https://devforum.zoom.us/t/uialertview-is-deprecated-and-unavailable-for-uiscene-based-applications-please-use-uialertcontroller/70831/2 "2022-07-21T21:01:46Z")

</div>

Closed on July 21, 2022, 9:01pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [September 9, 2022, 10:58pm UTC](https://devforum.zoom.us/t/uialertview-is-deprecated-and-unavailable-for-uiscene-based-applications-please-use-uialertcontroller/70831/3 "2022-09-09T22:58:07Z")

</div>

Hi @basakertugrul9 ,

Check out this thread for context on the UIAlertView deprecation error:

> [@App crash by using scene delegate](https://devforum.zoom.us/t/app-crash-by-using-scene-delegate/32844/2):
>
> Hey @Davidsports Thanks for using the dev forum! Unfortunately, the SDK does not support SceneDelegates currently. The SceneDelegate must be removed and disabled to be able to use the iOS native SDK. If you decide to go this route: Remove the SceneDelegate.m file and SceneDelegate.h file. Remove the UISceneSession code in AppDelegate. Add a UIWindow property to the AppDelegate. @property ( strong , nonatomic ) UIWindow \*window; Let me know if you have any other questions. Thanks! Mich…

> [@basakertugrul9](#):
>
> I’d like to know if there is a way for using SwiftUI and MobileRTC **Alerts** together.

I’ll bring this up in our next SDK sync for some guidance.

Thanks for using Zoom!
