我们已在我的应用中实施了Google Maps SDK。如果我们从mac安装构建它可以正常工作,但如果我们从diawi或TestFlight下载构建,应用程序会在启动地图时崩溃。
// Create a GMSCameraPosition that tells the map to display the coordinate at zoom level 6
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:[currentlat doubleValue]
longitude:[currentlong doubleValue]
zoom:11];
//check screen resolution
if (screenSize.height>480)
{
//iphone 5
mapBaseView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
mapview = [GMSMapView mapWithFrame:CGRectMake(0, 0, mapBaseView.frame.size.width, mapBaseView.frame.size.height) camera:camera];
}
else
{
//iphone 4
mapBaseView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
mapview = [GMSMapView mapWithFrame:CGRectMake(0, 0, mapBaseView.frame.size.width, mapBaseView.frame.size.height) camera:camera];
}
mapview.myLocationEnabled = YES;
mapview.delegate=self;
mapview.mapType=kGMSEarthRadius;
[mapBaseView addSubview:mapview];