I am using the Google Maps iOS SDK(using swift) and after successfully running my program multiple times I decided to exit Xcode to resume working on my project later. After re-opening Xcode and trying to relaunch my project I get this error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSManagedObject tileCoords]: unrecognized selector sent to instance 0x7c037e90' .
It is saying that there is no mapWithFrame method on the GMSMapView object, although I copied the sample code directly off of the Google maps SDK website.
Could I receive a bit more guidance on handling this issue? Here is an image of the call stack Image and the line of the code it is blowing up on.
let camera = GMSCameraPosition.cameraWithLatitude(37.5784623,longitude:-77.42166750000001, zoom: 4)
Blows up here ---->
mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera)
Try initializing map view with frame only and in view will appear set its camera as follow:
mapView = GMSMapView(frame: CGRectZero)
// on view will appear
mapView.camera = GMSCameraPosition.cameraWithLatitude(37.5784623,longitude:-77.42166750000001, zoom: 4)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.