3

Even Though I've imported Google API and Google SDK to my App, but I'm getting the error "-[NSManagedObject tileCoords]: unrecognized selector sent to instance" , when my Map starts loading?

Error Message:

GoogleMaps[11447:1003] -[NSManagedObject tileCoords]: unrecognized selector sent to instance 0xae901d0
2014-06-25 14:39:52.235 GoogleMaps[11447:1003] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSManagedObject tileCoords]: unrecognized selector sent to instance 0xae901d0'
*** First throw call stack:
(
    0   CoreFoundation                      0x02d421e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x02ac18e5 objc_exception_throw + 44
    2   CoreFoundation                      0x02ddf243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
    3   CoreFoundation                      0x02d3250b ___forwarding___ + 1019
    4   CoreFoundation                      0x02d320ee _CF_forwarding_prep_0 + 14
    5   GoogleMaps                          0x00034506 __47-[GMSTileDataCache startWithCompletionHandler:]_block_invoke57 + 717
    6   GoogleMaps                          0x000397aa -[GMSTileDataCache fetchTilesImmediateWithPredicate:sortDescriptor:completionHandler:] + 379
    7   GoogleMaps                          0x000340ef __47-[GMSTileDataCache startWithCompletionHandler:]_block_invoke + 469
    8   libdispatch.dylib                   0x0308c7b8 _dispatch_call_block_and_release + 15
    9   libdispatch.dylib                   0x030a14d0 _dispatch_client_callout + 14
    10  libdispatch.dylib                   0x0308f047 _dispatch_queue_drain + 452
    11  libdispatch.dylib                   0x0308ee42 _dispatch_queue_invoke + 128
    12  libdispatch.dylib                   0x0308fde2 _dispatch_root_queue_drain + 78
    13  libdispatch.dylib                   0x03090127 _dispatch_worker_thread2 + 39
    14  libsystem_c.dylib                   0x0335ce72 _pthread_wqthread + 441
    15  libsystem_c.dylib                   0x03344daa start_wqthread + 30
)
libc++abi.dylib: terminating with uncaught exception of type NSException



@implementation ViewController
{
    GMSMarker *_sydneyMarker;
    GMSMarker *_melbourneMarker;
    GMSMarker *_brisbaneMarker;
    UIView *_contentView;
}
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-37.81969
                                                            longitude:144.966085
                                                                 zoom:4];
    GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera];
   //In this line my app gets breaks and produces the above error 

    _sydneyMarker = [[GMSMarker alloc] init];
    _sydneyMarker.title = @"Sydney";
    _sydneyMarker.snippet = @"Population: 4,605,992";
    _sydneyMarker.position = CLLocationCoordinate2DMake(-33.8683, 151.2086);
    _sydneyMarker.map = mapView;


    _melbourneMarker.map = nil;
    _melbourneMarker = [[GMSMarker alloc] init];
    _melbourneMarker.title = @"Melbourne";
    _melbourneMarker.snippet = @"Population: 4,169,103";
    _melbourneMarker.position = CLLocationCoordinate2DMake(-37.81969, 144.966085);
    _melbourneMarker.map = mapView;

    _brisbaneMarker.map = nil;
    _brisbaneMarker = [[GMSMarker alloc] init];
    _brisbaneMarker.title = @"Brisbane";
    _brisbaneMarker.snippet = @"Population: 2,189,878";
    _brisbaneMarker.position = CLLocationCoordinate2DMake(-27.4710107, 153.0234489);
    _brisbaneMarker.map = mapView;

    _contentView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"aeroplane"]];

    mapView.delegate = self;
    self.view = mapView;

}
friedbunny
  • 2,421
  • 1
  • 23
  • 38
Gobinath Ed
  • 229
  • 2
  • 13
  • Could you please provide full error message? Seems it is incomplete. Thanks. – David V Jun 25 '14 at 09:12
  • This is full error message.. – Gobinath Ed Jun 25 '14 at 09:15
  • i have added my error message in question. – Gobinath Ed Jun 25 '14 at 09:16
  • 1
    What is the version of the Google Map for iOS that you are using? – Ricky Jun 25 '14 at 09:20
  • I don't see any issue in the code above. I would suggest to clean and remove your app from device/simulator and build again. – David V Jun 25 '14 at 09:22
  • 1
    There was a bug related to tile on 1.8.0, but it has been fixed on 1.8.1 https://code.google.com/p/gmaps-api-issues/issues/detail?id=6672 Try following the steps by IAmDav, close the project and reopen again to see if it will fix the crash. – Ricky Jun 25 '14 at 09:28
  • [GMSMapView animateToCameraPosition:]: unrecognized selector sent to instance now i am getting the following error in same line – Gobinath Ed Jun 25 '14 at 09:52
  • @user3655029 Are you getting this error after clean up as I suggested? – David V Jun 25 '14 at 09:55
  • I think now you getting the same error as described below, check the answer http://stackoverflow.com/questions/22019776/googlemaps-basic-ios-demo-app-crash-unrecognized-selector-sent-to-instance – David V Jun 25 '14 at 09:56

0 Answers0