Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect when App is Slide Over on top of running app on iPad

We have a WebRTC Swift 4.2 application using Google's native WebRTC code. We are having issues with Apple's App Slide Over Multitasking feature on iPads.

Issue:

What we are seeing is when our Application is running in a video call on an iPad as soon as another app is 'Slide Over' our app, our application stops using the video camera and microphone until the Slide Over app is closed. Once closed our application gets the microphone and camera back.

Expected Result:

Our application is still able to use the camera and microphone and the user is able to use both apps at the same time.

Questions:

Is there a setting we need to turn on to disallow Slide Over apps? If not is there a event we can subscribe to when the slide over happens so we can request camera and microphone access again?

What we have done:

  1. We have set our application to require full screen in the project settings.
  2. We have tried subscribing to the following events on the AppDelegate: applicationDidEnterBackground, applicationWillResignActive, applicationDidBecomeActive. These events do fire once for the initial Slide over app open and close but not after consecutive Slide Overs with same app.
  3. Turning on all Background mode capabilities. Has no effect.
  4. On our ViewController.swift we have tried to subscribe to viewWillLayoutSubviews event. This event does not fire for apps opened with Slide Over.

Versions:

  • iOS 11.4.1
  • Swift 4.2
  • Xcode 10.1
like image 701
Austin Avatar asked Nov 05 '18 16:11

Austin


1 Answers

I filed a bug report with Apple and they said,

"This sounds like expected behavior, given that only one foreground app is allowed at a time."

like image 174
Austin Avatar answered Nov 17 '22 23:11

Austin