Error when using MKMapView
ios, mkmapview, xcode
Solution
Just ran into this:
Simple Fix: Make sure to check the box for "shows user location" for the MapView in interface builder.
Problem
I created a single view application with story boards. All I had in my view was MKMapView, thats it. It compiles without errors or warning but when I run it, I get this error in my console window: ``` <Error>: ImageIO: CGImageReadSessionGetCachedImageBlockData *** CGImageReadSessionGetCachedImageBlockData: readSession [0x8ab5750] has bad readRef [0x14b79c70] ``` I'm using Xcode 4.3 and iPhone Simulator 5.1. Any thoughts? .h File ``` #import UIKit/UIKit.h #import CoreLocation/CoreLocation.h #import MapKit/MapKit.h @interface WhereamiViewController : UIViewController <CLLocationManagerDelegate, MKMapViewDelegate> { IBOutlet MKMapView *worldView; IBOutlet UIActivityIndicatorView *activityIndicator; IBOutlet UITextField *locationTitleField; } @end ``` .m file ``` #import "WhereamiViewController.h" @interface WhereamiViewController () @end @implementation WhereamiViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } @end ```