Issue with GPS icon while using "Location Significant Change" and user perception - iphone

I developed an application that uses "Location Significant Change" feature. I notice that after users download my app, they quickly tend to uninstall it because they see the white GPS icon on their iPhone, and they think it will drain their phone battery.
I wonder if there is any workaround or suggestion, I wonder also if Apple is going to do anything about the GPS icon when using "Location Significant Change" feature, either on iOS 6 or next versions.
on comparison Android have a feature where you could setup Alarm manager to wake up application on certain time intervals. This will solve the problem, is there something similar on iOS (or iOS 6 maybe).
Thanks.

This is going to be a non-negotiable aspect to using location services on an iOS device. Apple wants to inform users when their location is being used so they can make informed decisions. So overriding or hiding this location icon, is not going to happen. (jailbreak excluded)
In my opinion, you have a couple options to help yourself out.
Inform the users in your app description in the app store so they know up front that the battery life isn't going to be slammed that bad.
Have a good detailed message set when you ask for permission to use the user's location. This will let them know why and make sure they accept and allow it.
If you have an FAQ on your website or inside the app, make sure you detail what the icon means and reassure the user that Apple takes battery life very seriously, and so do you.
Outside that, there isn't a lot you can do. Just inform your users best you can and go from there. Good luck.
UPDATE
I found a setting in iOS 6 under Privacy-->Location Services-->System Services all the way at the bottom, there is a user setting to hide the stats bar icon. This frees up some status bar real estate for users that don't want to see it. It doesn't mean the app isn't using location, just the icon is hidden. This is something your users would have to do as overriding this is not an option. At least it is something to share with your users.

Note that the location arrow when using significant location changes is different from the one when you are actively using location services in the background. The best thing you can do is to make sure the user understand how is their location being used, and to teach them to identify the difference between location monitoring (like geofence and significant location changes) and location tracking.

Related

Can we make our own Find My iPhone app

I am thinking to make my own app like Find My iPhone app . But I am confused that whether apple allow developers to have access to play with the security or is there such Apple API's that can help us to include features as in the above app. Any suggestions?
Well I just can't comment because of low reputation. But people must give a reason to down-grade a question. Its quite a valid question.
Creating an app like this is semi possible. Due to the fact that you are not allowed to keep running in the background, except for certain special cases. Such as Music or a guidance app (navigation apps)
Your app can register to receive updates from the GPS location and process them.
The problem is it will use your gps all the time.
The find my iphone app is a combination of wifi location/sim card location/gps location.
It uses a combination of all these items which it has to keep track of your location as close as possible. Now back to your question, the fact that you cannot keep running in the background, will mean the app needs to stay open all the time (open I mean running, not necessarily onscreen). Not like the application from apple itself, which of course is allowed to go outside these developer restrictions.
The APIs exist for you to create the main functionality of this app. Core Location and APNS
When use A is looking for the location of user B, A would tell a server that it needs user B's location.
A push notification could fire up user B's app, at which point...
User B's location services would kick in, in the background,
Send this information to your server
Then update user A with another push notification.

Is it possible to get distance from user location to specific location in background in IOS?

I need to calculate distance from user location to specific location, when the app is in background, and get a local notification based on that.
Background location tracking is totally possible, and I have already done that, but is it possible to execute a block of code, containing some condition checking and based on that update and get a local notification?
I am not getting any proper solution. Is there any way to do so?
Can you help me please?
Yeah, you can definitely do that. I'm doing it in an app right now. Use significant location changes, or regions, as previously suggested, to keep the pressure off the users battery as much as possible.
We observe regions (and significant location changes where regions are not supported by the device) then check a few things and fire off a local notification if needs be.
We started with a basic prototype to prove the concept and I highly recommend that approach as a way to get familiar with the location and notification frameworks.
Start with the Location Awareness Programming Guide. Most everything you need to know is in there. (Most things that aren't in there are simply impossible for an AppStore app.) See also Tracking the User's Location in the iOS App Programming Guide.
The best tool for what you're describing is likely "Shape-Based Regions." You can basically draw a box on a map and say "when the user enters or leaves this box, let me know." If at all possible, this is the tool you should use. It has the least impact on battery life.
If you absolutely cannot solve the problem any other way, it is legal to request background location delivery with startUpdatingLocation (and the appropriate background mode in Info.plist; see the above docs). An app that tracks your route while you hike would be be appropriate for this kind of setup. But you should avoid it if at all possible since it's a major battery drain.
You will want to update for significant locations in the background: http://mobile.tutsplus.com/tutorials/iphone/ios-multitasking-background-location/. Then you will want to create a location notification based on that.
My issue is that I am not sure if you can create a local notification in the background.

How to do hourly location updates?

I'm building a location-based app, but I hate having the location services icon on. I only need coordinates once per hour, but I can't figure out how to do this without saying the app is a VoIP app. Is it possible to do this in a way that's App Store acceptable?
You can use location in the UIBackgroundModes of your app, see the documentation.
About the location services icon on, I think you should leave it. It's a fair feedback for your user. A user has to know its position is being tracked and leaving the icon on for a few seconds each time the geolocation actually happens wouldn't be fair. (and it sounds like a case of app rejection to me).
As long as you don't have a negative impact on the device battery, the user will be grateful you let it know you're tracking his position.
For instance, apps such as OpenPaths made my iPhone show the location icon on all the time and have no real negative impact on the battery.
I would register for significant location change updates. When updates happen compare timestamp with last update. Use update if time delta > 60 minutes. Worst case: I believe you get the location indicator outline. this tells the user that a kind of tracking is happening — but not all the time, so it' not a battery issue and you don't get too many support requests. Best case: Registering for significant location change update doesn't show the indicator outline. But I am not certain. Completely without icon might just not be possible.

Programmatically change Required background modes

I have an app that need Location Based Services in the background.
So in info.plist I setrRequired background modes to "App registers for location updates".
and everything works fine.
My question is, how can I disable it running in background?
Is it possible to add an option and let users set it on/off?
As I know info.plist can not be change programmatically
so how can I do this?
The key is the description - it supports registering for location updates. So all you should have to do is tell your location manager to stop updating when the app goes into the background (or before) and it should then not be using location updates in the background.
There is no way to re-define the info.plist abilities of the app at runtime.
Traditionally (and pragmatically) you would set up your location manager to -startUpdatingLocation while your app is in use. This will drain your battery pretty quick if you leave it running full time. Typically you would call this, get the information you need, or update information, the call -stopUpdatingLocation. This puts everything to rest, no more battery drain.
When rolling over to the background, you have very limited options for accuracy if you still want to preserve battery life. The main one is -startMonitoringForSignificantChanges. This location update relies primarily on cell tower hand offs and triangulation. So if your user isn't moving large distances or is in an area with limited cell reception, don't expect this background mode to work very good.
You other background option is -startMonitoringRegion. This allows you to create a circle based region around places and get notifications when you -enterRegion or -exitRegion. These all have to be set up before entering the background. They do have the added benefit of better location updates. WiFi changing, cell tower handoffs, and even other apps using location updates. The OS grabs all locations updates and funnels them down and makes them available to any regions registered with the OS.
You still have the option to run location updates live in the background, but your users will not be thankful that they have no battery after 30 minutes of use.
Good luck. There are plenty of examples how to achieve all of these on SO and the web. The trick is finding the right combination that will work for you. Good Luck.

Recognising nearby iPhones running my app

I have a requirement in my iPhone app that I know when somebody running the same app is close by.
I'm thinking that GameKit using Bluetooth would let me do that. GPS location is not precise enough in this particular case.
However, if the user closes the app then the function won't work anymore. Even under iOS4, the task switching will close down the BonJour services so I can't have the app run in the background.
Seems to me I can only have this function if the user leaves the app up and running. Would you agree? Or is there a different approach I can take?
People are very concerned with privacy, so they would naturally expect such privacy invading functionality to be switched off when they close down the application.
If they choose to have this feature enabled, then it's a different matter. Then they expect that somebody else may locate them.
You might however consider implementing some sort of opt-in offline service, where the latest gps position is stored on a server including a timestamp. When somebody else (with the app running) moves within a certain distance of this location while it's still "fresh", then you send off a notification to the first device. That way the user would be notified that somebody may be close, and can then switch on their own device.