У меня проблема в MKMapView в iOS 8.x.x. Приложение работает отлично iOS 7.x.x, но не в iOS 8.x.x. На устройстве отображаются только аннотации, но нет карты.
Я попытался сделать сильное Reset мое устройство, но не повезло.
Я добавил эти 2 значения в info.plist, а также это требование для iOS 8 и далее
<key>NSLocationAlwaysUsageDescription</key>
<string>Location is required to find out where you are</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location is required to find out where you are</string>
и добавил эти строки кода в мой Viewdidload.
// Check for iOS 8. Without this guard the code will crash with "unknown selector" on iOS 7.
if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)])
{
[self.locationManager requestWhenInUseAuthorization];
//[self.locationManager requestAlwaysAuthorization];
self.myMapView.showsUserLocation = YES;
}
Добавив эти 2 значения в info.plist и выше строки кода, я могу получить User Location и аннотацию, показывая на карте местоположение пользователя, но Map is Blank.
Аналогично этому сообщению: MKMapView показывает пустой экран в iOS 8