ios - monitoringDidFailForRegion calls only on ipad -


i have developed ios application supports both iphone & ipad.

in application have integrated location tracking feature.

here how implemented it.

     //start monitoring region checked in location     cllocationcoordinate2d centercoordinate = cllocationcoordinate2dmake(latitude,longtitude);     regionalmonitor = [[clregion alloc] initcircularregionwithcenter:centercoordinate        radius:regional_monitor_radious identifier:@"checkedin"];     [locationmanager startmonitoringforregion:regionalmonitor];   - (void)locationmanager:(cllocationmanager *)manager didenterregion:(clregion *)region {         nslog(@"didenterregion"); } - (void)locationmanager:(cllocationmanager *)manager didexitregion:(clregion *)region {         nslog(@"didexitregion"); } - (void)locationmanager:(cllocationmanager *)manager monitoringdidfailforregion:(clregion *)region witherror:(nserror *)error {     nslog(@"region monitoring failed error: %@", [error localizeddescription]);  } 

this methods working in iphone application. when try executes them in ipad

monitoringdidfailforregion 

method called. works in ipad simulator.

is there particular reason it, or device oriented bug. because if comment

[locationmanager startmonitoringforregion:regionalmonitor]; 

then not called monitoringdidfailforregion method

log message - region monitoring failed error: operation couldn’t completed.

thanks

i'm pretty sure geofencing not supported on wifi ipads, or @ least older ones.

try printing value of [locationmanager ismonitoringavailableforclass:clregion]. if true (1), should work. otherwise, it's unsupported on current device.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -