Parse Push Notifications with Location IOS -


im familiar parse push notifications, while planning app had idea send push notification once user in location (a park, museum, etc)

is possible??

this can done easy , out parse. add code in app delegate

// start [self.locationmanager startupdatinglocation];

pragma mark - cllocationmanagerdelegate

/* * locationmanager:didupdatetolocation:fromlocation: * */ - (void)locationmanager:(cllocationmanager *)manager didupdatetolocation:(cllocation *)newlocation fromlocation:(cllocation *)oldlocation {

if (uiapplication.sharedapplication.applicationstate == uiapplicationstateactive) {     // active app, pin in map  } else {     nslog(@"app backgrounded. new location %@", newlocation);      // local push if near.       uilocalnotification *notification = [[uilocalnotification alloc] init];                 notification.alertbody = @"you near";                 [[uiapplication sharedapplication] presentlocalnotificationnow:notification];   } 

}

remember add in info.plist

"app registers location update"


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -