iphone - Geo Fencing Identifier -
how specify entire country region in region identifier.wether accept the
identifier :@"uk"
here code reo identifier.how can specify england or uk.please me sort out
cllocationcoordinate2d location2d = mapview.region.center; clregion *regionformonitoring = [[clregion alloc] initcircularregionwithcenter:location2d radius:1 identifier:@"regionidentifier"]; [[utils getlocationmanager] startmonitoringforregion:regionformonitoring];
clregions totally unsuitable purpose.
first of all, radius specified distance in meters region covers - in case asking system monitor region @ specific lat/long radius of 1 meter!
also, system regions have maximum number of regions can monitored (around 10 or so), , maximum radius can used of around 400 meters after region not work.
you need read "monitoring shape based regions" section of apple document:
there 2 other possible approaches trying do:
1) use significant location updates, , test on each update if in area shape specify.
2) use coretelephony cell carrier device on , see if carrier number matches 1 in country of interest. of course, not work on ipads or other ios devices no cell connection.
neither of approaches exact around edges, not consume battery life using gps.
Comments
Post a Comment