0

Is there a standard way to invoke a custom in-call/double-height status bar? If not, where's the best place to start in building my own functionality. I know there are a few years-old questions regarding how to do this, but there aren't any satisfying answers. Is there any new way to do this? (Possibly in iOS 8)

WaltersGE1
  • 813
  • 7
  • 26
  • Possible duplicate of [Showing in-call status bar (double height) for a custom VoIP app in iOS](http://stackoverflow.com/questions/37571066/showing-in-call-status-bar-double-height-for-a-custom-voip-app-in-ios) – Teepeemm Jun 02 '16 at 18:55

2 Answers2

3

There's nothing new here, but I'm not finding good past answers to dupe to, so...

Are you looking to test your app's layout under double-height status bar conditions (e.g. during a call or navigation)? Use the Simulator and go to Hardware → Toggle In-Call Status Bar ⌘Y in the menu bar, just like it's always been.

Are you looking to do some background activity that causes a double-height status bar to appear? In that case, the status bar is provided by the system in response to you performing certain activities:

  • Recording: Set the UIBackgroundModesaudio key in your app's Info.plist. Then, set the AVAudioSessionCategoryRecord or AVAudioSessionCategoryPlayAndRecord category on your audio session when you want to record audio.

  • VoIP: Also et the UIBackgroundModesvoip key in your app's Info.plist. Then, set the AVAudioSessionCategoryPlayAndRecord category on your audio session when you want to make a call.

The system determines what gets displayed on the status bar, and the App Store generally doesn't accept apps that use the status-bar-displaying background modes for something other than their prescribed purpose.

rickster
  • 124,678
  • 26
  • 272
  • 326
0

The red banner outside the app is created by iOS. To create the green in-call banner whilst inside the app, there is no inbuilt functionality for that, you will need to create your own.

I asked & answered a similar question here

Basically iOS has no inbuilt functionality to display an in-app status bar, you need to create your own. @cjensen's response led me to this article explaining this.

If you need an in-app call status bar, you need to create it yourself or use a library like KrauseFx's TSMessages to do it for you. Using a UILocalNotification as @cjensen suggested is simply one way to provide an entry point to decide when to create this banner.

Community
  • 1
  • 1
ed'
  • 1,815
  • 16
  • 30