Advice on determining close locations while iPhone app in background

I need some advice for a location based iPhone app.

I'm building an app that informs the user of nearby locations. When the app is in the foreground it will use the normal didUpdateToLocation:fromLocation: method (calculates distance between user and place of interest), but when it is in the background I'm not sure what is the best way to do this.

I'm thinking of creating CLRegions from all the places of interest just before the app goes to the background. If the user enters a region the app will do a local notification and inform the user of the place of interest.

Or I could register for CL significant update, calc distance between user and all the places and notify of any close ones. Maybe not the best solution, the OS might not give me enough time to compute close places?

Has anyone any experience doing the same? any advice?

-------------Problems Reply------------

I think you should register for significant locations updates (cell change events), and then do your math on events. You can do anything on the basis of this event. As per my experience, region monitoring is also dependent on cell change events along with some extra computations which you don't need.

However you need to enable background location updates. For which you need to convince Apple that this background location services are required for your app. As Apple docs say that background location services are only for apps who provide turn by turn navigation.

how to enable background location updating Understanding background tracking of user's location in iOS

Category:iphone Views:1 Time:2012-01-17

Related post

  • Location based iPhone app architecture 2011-06-14

    I am in the process of building a location-based iPhone app and I am unsure of my architecture. I plan on using Core Resource (http://coreresource.org/) along with Core Data to manage the objects on a remote server. I then plan on sending the current

  • How to determine request (URL) that iPhone app sends to server? 2010-12-06

    I am trying to find out the structure of request (URL, POST or XML file) that a particular iPhone app sends to server to retrieve data from it. In the browser you always see the URL that was used to retrieve HTML of the page, but in the iPhone app yo

  • Move files on network to different locations via iPhone app 2011-11-20

    I have files and directories setup on a Windows network share (\foo). I want to be able to move the files into different directories (eg. \foo\bar\baz.txt --> \foo\quux\baz.txt) via an iPhone app. However, having failed to find a solution I think

  • iTunes store - iPhone App - customizable background? 2009-04-16

    At iTunes, some iPhone Applications have their own background image screens.. like Sim City I'm not talking about "primary screenshot / additional screenshots" or "Large 512x512 icon" I'm talking about the big eye-candy title screen that some famous

  • How to stop running iphone app in background in iphone sdk 4.0 and above 2011-03-09

    Please tell me some solution for how to stop app at background when we close the app in iphone sdk 4.0 and above. can any one provide me some sample code for it. Thanks, Priyanka --------------Solutions------------- Set the UIApplicationExitsOnSuspen

  • How to run a part of Code and upDate UI even when the iPhone App is BackGround 2011-09-20

    A piece of code need to be executed even after the iPhone app sent to background. Based on the values the UI need to get changed. When I bring the App to foreground.It need to be updated with the changes made at the background time. Eg.When I sent a

  • How to add locationPreview icon of the certain location in iPhone app? 2010-02-09

    I was wondering if it is possible to add an icon (or image) with selected location like it is shown on the attached picture (left top corner) to my app? Maybe such an image could somehow be captured from Google or there is another way to deal with it

  • Need some advice before starting coding my next iPhone app 2010-03-16

    I need some advice about how should I start coding something. So here is the context: I've just finished building a CMS that manage a SQLite database. My application will be picking this database and use its content as the application's content. So f

  • Save file in a different location in iPhone App 2010-05-31

    I have a problem. My proget create a xml file. In the iPhone this file was store in the NSDocumentDirectory. I wanna save this file in another directory like Desktop(where there are the apps) or another visible folder. Thanks. This is my code: -(void

  • Advice needed on database access in iphone apps 2010-04-29

    I needed some advice on how to get the data from the database(sqlite). I am having a navigation based application. The db i have, contains a CONTACTS table.For each row in CONTACT, another table CONTACT_DETAILS contains around 50 rows. The data from

  • Run the existing iPhone app in background from JSP page inside an UIWebView 2011-10-12

    I have a button in JSP page inside an UIWebView by pressing the button i want to run another existing iPhone native application in background only.Do anyone have a solution for this. --------------Solutions------------- You can't start any apps progr

  • iPhone app entering background state and presenting a UIAlertView 2011-01-22

    If an app delegate receives the -willResignActive message and a UIAlertView is within 0.5 seconds of being shown, the app will present two alert views (one a duplicate) when it becomes active once more. This is a problem, because if responding to the

  • Iphone App - Project Structure 2010-07-13

    I was wondering if anyone can give me some advice regarding the structure of my iphone app. As a non programmer i've broken my app down into smaller projects, i.e. a project for each main function of my app (Twitter RSS Feed, 3rd Party API etc etc).

  • Is it Possible to fetch the lat-long of the current location in iPhone for continuous 2011-08-06

    I know that it is possible to fetch the lat-lng of the current location. But i want to make it to fetch continuosly for iphone. So is it Possible ? If Possible then How its Possible. . Please Guide me regarding it. . . Thanks. --------------Solutions

  • How to display background image or foreground image of an iphone app 2009-04-20

    This might come across as a very silly question. I am trying to place an image behind my first "Hello World" app on iphone, since this morning. I tried doing so using Interface Builder using UIImageView object from library and also tried doing so pro

  • retrieve wallpaper system setting in iphone app 2010-02-18

    I would like to retrieve iphone wallpaper system setting and display the system wallpaper into my iphone app as background image. Is it possible or sample code? Thanks in advance. --------------Solutions------------- AFAIK there are no documented pro

  • iPhone App - background disappears after memory warning 2010-09-12

    When I receive a memory warning in my navigation based iPhone App the background image disappears in the previously allocated navigation controllers. The background image is set as the background property of a UIView. This view is then added to the m

  • How to run iphone application in background for long time? 2011-03-14

    I want to run my iphone app in background and it is working fine but after 15 mins system terminates it.I want to run it for more than 15 mins..what should I DO? --------------Solutions------------- Try reading Apple's guide: Executing Code in the Ba

  • How to determine click location coordinates in iphone app view class 2010-11-08

    i'm trying to make a connect four iphone app. I have made my own custom UIView class, which is where the game is played. However, I am trying to use the touchesMoved, touchesEnded, etc. methods to retrieve data based on where the user clicked (so i k

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.171 (s). 11 q(s)