# App Crash when trying to run

**URL:** <https://devforum.zoom.us/t/app-crash-when-trying-to-run/9057>\
**Category:** iOS\
**Created:** [March 20, 2020, 6:13am UTC](https://devforum.zoom.us/t/app-crash-when-trying-to-run/9057 "2020-03-20T06:13:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamsanketray123](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/iamsanketray123/32/3825_2.png) [@iamsanketray123](https://devforum.zoom.us/u/iamsanketray123)\
**Post date:** [March 20, 2020, 6:13am UTC](https://devforum.zoom.us/t/app-crash-when-trying-to-run/9057/1 "2020-03-20T06:13:50Z")

</div>

class AppDelegate: UIResponder, UIApplicationDelegate, MobileRTCAuthDelegate {

```
var window: UIWindow?

let kSDKAppKey = "SDK key here"
let kSDKAppSecret = "SDK secret here"
let kSDKDomain = "www.biztiz.com"

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
    
    // Step 1: Set SDK Domain and Enable log (You may disable the log feature in release version).
    
    MobileRTC.shared().setMobileRTCDomain(kSDKDomain)
    
    
    
    // Step 2: Get Auth Service
    let authService = MobileRTC.shared().getAuthService()

    print("MobileRTC Version: \(MobileRTC.shared().mobileRTCVersion())")

    if authService != nil {
        // Step 3: Setup Auth Service
        authService?.delegate = self

        authService?.clientKey = kSDKAppKey
        authService?.clientSecret = kSDKAppSecret
        // Step 4: Call authentication function to initialize SDK
        authService?.sdkAuth()
    }

    
    
    
    
    
    return true
}

```

func onMobileRTCAuthReturn(\_ returnValue: MobileRTCAuthError) {  
print(“onMobileRTCAuthReturn (returnValue)”)

```
    if returnValue != MobileRTCAuthError_Success {
        let message = String(format: NSLocalizedString("SDK authentication failed, error code: %zd", comment: ""))
        print("\(message)")
    }
}

```

}

This is what my appDelegate looks like. It simply crashes on launch without any errors in console.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [March 20, 2020, 7:58pm UTC](https://devforum.zoom.us/t/app-crash-when-trying-to-run/9057/2 "2020-03-20T19:58:33Z")

</div>

Hi [iamsanketray123](https://devforum.zoom.us/u/iamsanketray123),

Thanks for using Zoom SDK and sharing the code. There are a few issues here:

1. **[IMPORTANT]It seems like you are posting your SDK key/secret in the public forum so please regenerate your SDK key/secret as soon as possible.**
2. The SDK domain should be [zoom.us](http://zoom.us) . The domain you mentioned is not recognized by us.
3. It looks like you did not initialize the SDK before performing SDK authentication, please refer to our demo app for the implementation: [https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/SDKPresenters/how\_to\_init\_auth\_sdk/how\_to\_init\_sdk/SDKInitPresenter.m](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/SDKPresenters/how_to_init_auth_sdk/how_to_init_sdk/SDKInitPresenter.m)

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:34pm UTC](https://devforum.zoom.us/t/app-crash-when-trying-to-run/9057/3 "2020-08-21T19:34:25Z")

</div>

Closed on August 21, 2020, 7:34pm UTC


