iOS : How to run the app in background

Description
Hello Team,
I have my iOS app using custom UI, when I minimize the app to the background, the app stops working. I have read about the background restrictions in the iOS app. When I use the zoom app, I can notice that the app runs in the background and the audio of the participants is clearly heard, can you please guide me on how to do this in my application.

Hey @vignesh.9884843620,

Thanks for using the dev forum!

You must add in background modes for your application

Then you have to call the MobileRTCAppDelegate functions within your AppDelegate:

- (void)applicationWillResignActive:(UIApplication *)application
{
    [[MobileRTC sharedRTC] appWillResignActive];
}

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    [[MobileRTC sharedRTC] appDidEnterBackgroud];
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    [[MobileRTC sharedRTC] appDidBecomeActive];
}

- (void)applicationWillTerminate:(UIApplication *)application
{
    [[MobileRTC sharedRTC] appWillTerminate];
}

Thanks!
Michael

Hello @Michael_Condon ,
Worked like a charm, thanks a lot.

1 Like

Hey @vignesh.9884843620,

Awesome! I am happy to hear :slight_smile:
Please let us know if you run into any other issues.

Thanks!
Michael