MKMapView: Apple logo is not displayed

On iOS 16 and below, the Apple logo is not displayed (Leagal labe is displayed). On iOS 17, both logo and legal are displayed.

  • I have not specified layoutMergin for MKMapView.
  • Map View attribute inspector has specified standard settings

Why is only Apple Logo is not displayed ?

Thank you

Answered by DTS Engineer in 799357022

Do you see the same behavior if you run one of our MapKit sample code projects? If not, what is your project doing different compared to the sample code project?

— Ed Ford,  DTS Engineer

Do you see the same behavior if you run one of our MapKit sample code projects? If not, what is your project doing different compared to the sample code project?

— Ed Ford,  DTS Engineer

Thank you for reply.

It’s problem only my project. MapSample and other project has no problem. I check MapSample project file, and Map View attribute inspector. But I think no diffrerent between sample and my project.

MapView has MKAppleLogoImageView but not displayed.

check below

map _MKMapContentView
map MKAttributionLabel
map MKAppleLogoImageView
map UIView
map frame: (10.0, 837.0, 0.0, 0.0)
map isHidden: false
map alpha: 1.0

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        for view in mapView.subviews {
            print("map", type(of: view))
        }

        if let logoView = mapView.subviews.compactMap({ $0 as? UIImageView }).first(where: { String(describing: type(of: $0)).contains("MKAppleLogoImageView") }) {
            print(“map frame: \(logoView.frame)")
            print("map isHidden: \(logoView.isHidden)")
            print("map alpha: \(logoView.alpha)")
        }
    }

Your next step is to take your project and begin building a test project out of it by reducing the code smaller and smaller iteratively to narrow in on why this is happening for only your app. The difference Is likely not something about the map view's configuration, but something else in your project that is influential on your app, such as any methods that are swizzled, or additional libraries that you're using that are altering the behavior of the system.

When creating such a test project, don't overthink it too much based on your existing knowledge of how your app works, go as fast as you can to remove significant code, make just enough changes to make it compile (such removing method bodies except for a single line that returns), and verify if the problem still exists or not. If it still exists, remove more things! If it doesn't, then you can look through the last removal and focus on narrowing what you removed there. By moving quickly here and not overthinking it, you can get down to the vicinity of the issue, especially when focused on things like swizzling and third-party libraries, quite reasonably.

— Ed Ford,  DTS Engineer

Accepted Answer

@SaturnR7 opened a code-level support request with their test project so we could look at it and share the answer back here for everyone's benefit.

Their sample project was one view controller with a MKMapView setup in Interface Builder, with constraints to size it to the view controller's safe area — nothing more than that. As described, the Apple Maps logo is missing when I run the app on iOS 16. but appears when run on iOS 18. I am building the app using Xcode 16 for testing.

The important factor here is that the test project has an Info.plist as part of the source code with many of the standard keys defined, as is true for older Xcode projects. (Projects created with more recent versions of Xcode have moved most of these keys into build settings.) Further, this project set the GENERATE_INFOPLIST_FILE build setting set to NO.

This test project is missing the CFBundleDevelopmentRegion key in its Info.plist file, and that is causing MapKit to not display the Apple Maps logo on older IOS versions. So, there's two ways to address this:

  • Set GENERATE_INFOPLIST_FILE to YES, so that Xcode adds CFBundleDevelopmentRegion to the final Info.plist automatically, with the default value en.
  • Add a CFBundleDevelopmentRegion to the existing Info.plist.

—Ed Ford,  DTS Engineer

I was able to display the logo in two ways. Thank you so much.

MKMapView: Apple logo is not displayed
 
 
Q