0

i download Google Maps SDK for iOS along with api key

i import all frameworks along with GoogleMaps.framework and GoogleMaps.bundle. in my view controller i write.

static CLLocationCoordinate2D kPanoramaNear = {-33.874437, 151.207459};
- (void)loadView
 {

     CGRect applicationFrame = [[UIScreen mainScreen] bounds];
     panoView_ = [[GMSPanoramaView alloc] initWithFrame:CGRectZero];
     panoView_ = [GMSPanoramaView panoramaWithFrame:applicationFrame    nearCoordinate:kPanoramaNear];
     panoView_.backgroundColor = [UIColor grayColor];
     panoView_.delegate = self;
     panoView_.navigationLinksHidden = YES;
     panoView_.autoresizingMask = UIViewAutoresizingFlexibleHeight |   UIViewAutoresizingFlexibleWidth;

     self.view = panoView_;

    [panoView_ moveNearCoordinate:CLLocationCoordinate2DMake(-33.732, 150.312)];
}

but my program crashed

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSData gtm_dataByInflatingData:]: unrecognized selector sent to class 0xe79238'

duncan
  • 31,401
  • 13
  • 78
  • 99
rams
  • 49
  • 1
  • 2
  • 9

1 Answers1

0

Unrecognized selector crashes with the maps SDK are usually caused by missing the -ObjC linker flag:

Community
  • 1
  • 1
Saxon Druce
  • 17,406
  • 5
  • 50
  • 71