Ios6 Simulator Mkmapkit "Couldn't Find Default.Styleproto in Framework"

iOS6 Simulator MKMapKit Couldn't find default.styleproto in framework

I found a way to consistently reproduce this.

First, the culprit is a set of files in the Cache folder for your simulator. Go to your Application Support folder for the iPhone Simulator:

~/Library/Application Support/iPhone Simulator/[6.0 and above]/Library

Then look inside of your Caches/GeoServices/Resources

You'll see some .styleproto files in there. These files are only created when MapKit is first used in a simulator. It may also happen on the device, but I haven't confirmed it.

If you want to test this, make sure you have the .styleproto files, then re-launch your app, and you won't see the warning again when accessing the maps.

Remove the GeoServices cache folder, quit and restart the simulator (and your app), and there is the warning!

Call Maps for directions from inside your app - iOS5 iOS6

I had a similar problem and I had to create some conditional OS code to deal with the fact that the Google Maps application has been removed. From the new MKMapItem Reference

//first create latitude longitude object
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(latitude,longitude);

//create MKMapItem out of coordinates
MKPlacemark* placeMark = [[MKPlacemark alloc] initWithCoordinate:coordinate addressDictionary:nil];
MKMapItem* destination = [[MKMapItem alloc] initWithPlacemark:placeMark];

if([destination respondsToSelector:@selector(openInMapsWithLaunchOptions:)])
{
//using iOS6 native maps app
[destination openInMapsWithLaunchOptions:@{MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving}];
}
else
{
//using iOS 5 which has the Google Maps application
NSString* url = [NSString stringWithFormat: @"http://maps.google.com/maps?saddr=Current+Location&daddr=%f,%f", latitude, longitude];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]];
}

[placeMark release];
[destination release];

To get walking directions:

  1. For iOS 6 maps - You can set MKLaunchOptionsDirectionsModeWalking instead of MKLaunchOptionsDirectionsModeDriving
  2. For Google maps - Add &dirflg=w to the url.

I think it's better to use the openInMapsWithLaunchOptions in iOS6 because it gives you complete control over how the maps application will respond.

ADBannerContentSizeIdentifierPortrait deprecated in iOS6?

With iOS6 came several new updates to the auto-resizing capabilities. Apple no longer wants developers to use the ADBannerContentSizeIdentifierPortrait and ADBannerContentSizeIdentifierLandscape techniques, and instead use the auto-resizing capabilities of iOS6.

Similarly, the setCurrentContentSizeIdentifier and setRequiredContentSizeIdentifiers are also deprecated.

A pretty good tutorial that I found the other day on auto-resizing in iOS6 can be found here



Related Topics



Leave a reply



Submit