Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4256412
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:21:00+00:00 2026-05-21T05:21:00+00:00

I am developing an app ,where I need to provide the notification to the

  • 0

I am developing an app ,where I need to provide the notification to the user, when he is say x meter from the location.I have implemented the map,the logic for all that.Now I want to implement the push notification in that.I have read here on the stack overflow but didn’t find the solution.I knew that I need to provide the methods in the app delegate.But i want to know how my server will come to know that the user is x meters from the destination.Do I also need to parse the webservice and send the data in the didupdatetoUserLocation.Or the server will take care of that.If server would that then how the server will come to know.
Any help would be appreciated
Thanks All……

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:21:01+00:00Added an answer on May 21, 2026 at 5:21 am

    you would have to send all the location-information to your server and your server would have to calculate, whether the push service shall become active or not. That would just work, if the application is active in the background and would cause a lot of communication stack.

    I would suggest to use the local push service. By calling a function in the background on the device you can track the location and compare it to the “push”-location. If the push shall be shown, continue with UILocalNotification which is available since iOS 4:
    http://developer.apple.com/library/ios/#documentation/iphone/Reference/UILocalNotification_Class/Reference/Reference.html

    UILocalNotification *localNotif = [[UILocalNotification alloc] init];
    if (localNotif == nil)
    {
        return;
    }
    localNotif.fireDate = [NSDate date];
    localNotif.timeZone = [NSTimeZone defaultTimeZone];
    localNotif.alertBody = [NSString stringWithFormat:NSLocalizedString(@"Hey there, you are here: %@\n%@", nil), @"Country", @"Town"];
    localNotif.alertAction = NSLocalizedString(@"W00t show me", nil);
    
    localNotif.soundName = UILocalNotificationDefaultSoundName;
    localNotif.applicationIconBadgeNumber = 1;
    
    NSDictionary *infoDict = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:1344] forKey:@"LocationPush"];
    localNotif.userInfo = infoDict;
    
    [[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
    [localNotif release];
    

    Since you need a server based push service, implement the following methods in your appdelegates method applicationDidFinishLaunching, thats how you can register the device for the service:

    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound)];
    

    Further on you can implement the following methods for detailed settings:

    - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
    { 
    }
    
    - (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err
    { 
    }
    

    Since I’m not that familiar with server-based push notification I can’t tell you more, all I know about is, that you need to set up a server with the key, that you generated and registered in the provision profile of apple:
    http://developer.apple.com/ios/manage/bundles/index.action

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.