In-Navigation Status Bar iOS - ios

Google maps already has a blue bar that appears whenever you are in navigation. I want to know how I can implement this myself. Any ideas?

Configure your app to use Core Location in the background. And when, as you must now do in iOS 8, you come to request authorization, request When In Use authorization.
The blue bar will then appear automatically whenever your app is using core location in the background.

Related

Prevent Location blue bar in ios 11

As you already heard, in iOS11, an app that’s actively receiving continuous background updates will show a double-height blue bar, whenever authorization is set to While Using. It seems there is no way to remove the blue bar if the App is using background location App.
My app supports ios 9.0 and above and, I have added all the keys required in info.plist including the one below.
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string></string>
But seems everybody says there is no way to remove the blue bar while background location updates is working.
However I have installed UBER and somehow they managed to hide the blue bar when the app is in background, but in my app I can see blue bar when I put app in background.
Does some one knows any solution to get rid of blue bar in iOS11 when we set permission "while using the app" ?
In iOS 11, the Blue Bar will appear when an Always authorized app opts-in to displaying the blue bar while it is actively receiving Continuous Background Location updates via startUpdatingLocation()
There’s a new property on CLLocationManager that Always authorized apps can use to control the visibility of their blue bar.
#property(assign, nonatomic) BOOL showsBackgroundLocationIndicator
When-in-use authorized apps will continue showing the Blue Bar as before.
No other service will turn on the Blue Bar. When an app which makes use of any other location service receives an occasional update (for example Significant Location Change), the location arrow on the status bar will momentarily blink solid, but the Blue Bar will not appear.
According to apple , After iOS 11 update that blue bar is showing when app is running on the background. What you can do is, track user location when app is in the foreground.
Check this
Try with NSLocationAlwaysUsageDescription in info.plist file and use requestAlwaysAuthorization in CLLocationManager.
showsBackgroundLocationIndicator is useful for requestAlwaysAuthorization.

Change text in status bar while app in background

I want to change the text of red bar shown below, how do I do it? I see it when my swift app is currently using the microphone and is in the background.
You cannot change it yourself.
This is a system level event that occurs when your app is running in
background stage and using services like location, audio, etc. This
link discusses about the types of background services an app can
use.

CLLocationManager: any way to use requestAlwaysAuthorization and still have blue bar?

I'd really like to have the blue bar that says "____ is Using Your Location" when my app is in the background, because it's good for the user experience. I can only get this bar to show up when I use requestWhenInUseAuthorization, along with having Location as a Background Mode in the plist.
I've come across a scenario where I need to use requestAlwaysAuthorization instead, since otherwise I can't start location updates when the app is already in the background: CLLocationManager startUpdatingLocation() doesn't work when called in background
But I cannot use requestAlwaysAuthorization, because doing that will cause the blue bar to not show up, and it's more important for me (and the users) to have the blue bar. Is there any way to simultaneously use requestAlwaysAuthorization and have the blue bar show up?
No. Everything you've said is completely accurate: you only get one kind of authorization, and if it's Always authorization, there's no blue bar. (Instead, the user will be asked every few days to reconfirm the Always authorization.)
Watch the WWDC 2015 on Core Location; it's very clear about this.
If you think you have a contrary use case, file an enhancement request with Apple.

iOS: is it possible to get an app to show on the top area of the screen whilst in background?

The above is what can bee seen in iOS when the Maps app goes in background state. Is it possible to achieve the same with custom apps or is it only something that Apple apps can do (e.g. Garageband)?
The behaviour is:
user opens Maps app and sets navigation
user sets Maps in background
iOS top navigation area becomes blue and stays visible whilst using other apps
once the user taps on the bar it returns to the Maps app
Those are the background modes available on Xcode:
Is it possible to do this for all these modes?
Yes you can do it by setting
CLAuthorizationStatus = kCLAuthorizationStatusAuthorizedWhenInUse
instead of kCLAuthorizationStatusAuthorizedAlwaysUse
and add this in your .plist
you have to request when in use authorization , but this is not the trick , here is the trick
click on your project in the project navigator
select your target .
click on the capabilities tap
turn background modes one
List item
check the location updates check box .
of course you have to set the NSLocationWhenInUseUsageDescription property in your info.plist

iOS8: How to display blue bar "is Using Your Location" with "requestAlwaysAuthorization"

How does an app register for location services in the background and signification change location services, i.e. using requestAlwaysAuthorization, and get the Blue Bar to warn the user that they might want to end their activity?
According to Apple documentation using requestWhenInUseAuthorization:
The system displays a location-services indicator in the status bar when your app moves to the background with active location services.
However,
Apps cannot use any services that automatically relaunch the app, such as region monitoring or the significant location change service.
The limitation on requestWhenInUseAuthorization seems severe (cannot be relaunched if killed by the OS).
Can an app call both the Authorization methods?
Is the app supposed to forgo being relaunched by significant location change services, in order to get the Blue Bar to be seen?
Am I missing something obvious here?
(Similar question is Blue banner "Your app is using your location" is not showing after exiting my app. Other questions seem to want to get rid of the banner.)
The blue bar only show when you enable Background Location Updates and request when-in-use authorization in iOS 8.
Blue bar “is Using Your Location” appears shortly after exiting app
Sounds like location manager can't stop immediately. So the blue bar will appear until location manager stop completely. Or maybe it's just a bug .

Resources