The Issue with Maps Being Displayed in Red on iOS Simulators Running iOS 18.0 or Later

The Issue with Maps Being Displayed in Red on iOS Simulators Running iOS 18.0 or Later

Clock Icon2025.01.17

NOTE: This article is an English translation of "iOS 18.0以降のiOSシミュレータで地図を表示すると真っ赤になってしまう問題."

Previously, in the article "Fixing the Issue of SafariViewController Freezing in the Combination of Xcode 16.0 and iOS 18.0 Simulators," I discussed how the Excluded Architectures setting caused issues where SFSafariViewController and UIImagePickerController would not function properly.

Later, during testing with Xcode 16.2, it was discovered that enabling the Excluded Architectures setting also caused similar issues with map display functionality (MapKit). This article explains this newly identified issue.

Overview of the Issue

In iOS simulators running iOS 18.0 or later, enabling the Excluded Architectures setting causes maps to appear completely red. This issue does not occur on physical devices.

Sample Code for Testing

Below is a minimal sample code that uses MapKit to display the area around the Imperial Palace in Tokyo. When this code is run on an iOS simulator with iOS 18.0 or later, the issue can be reproduced.

import SwiftUI
import MapKit

struct ContentView: View {
    @State private var region = MKCoordinateRegion(
        center: CLLocationCoordinate2D(latitude: 35.6844779, longitude: 139.7512224),
        span: MKCoordinateSpan(latitudeDelta: 0.05, longitudeDelta: 0.05)
    )

    var body: some View {
        Map(coordinateRegion: $region)
    }
}

#Preview {
    ContentView()
}

Testing Results

The sample code above was executed on an iPhone 16 Pro / iOS 18.0 simulator. The table below summarizes the behavior differences depending on whether the Excluded Architectures setting is enabled or not.

When Excluded Architectures is Enabled When Excluded Architectures is Disabled
Map turns completely red Map displays correctly

From these results, the following observations were made:

  • When Excluded Architectures is enabled, the map turns red.
  • When Excluded Architectures is disabled, the map displays correctly.

Summary

Issue

This issue, like the previously reported problems with SFSafariViewController and UIImagePickerController, appears to be caused by the Excluded Architectures setting.

  • The issue where SFSafariViewController displays a blank white screen and the app freezes.
  • The issue where UIImagePickerController causes the app to freeze.
  • The issue where MapKit displays maps in red.

These issues have been occurring in the simulator environment since the release of Xcode 16.0 and iOS 18.0 on September 16, 2024, and as of December 2024, they remain unresolved. It is advisable to remove this setting as soon as possible.

Solution

The Excluded Architectures setting can be found in the Build Settings section of the project, as shown in the image below. Removing this setting resolves the issue.

20241219164422

However, as mentioned in the previous article, if the third-party SDKs your app depends on do not support arm64, the issue may not be resolved. In such cases, you will need to request the SDK provider to add arm64 support.

(Updated on 2025/01/17) Created a Minimal Project

An Apple developer on the Apple Developer Forums requested a minimal project setup that reproduces the issue, so I created a sample project.

https://github.com/CH3COOH/SampleXcode16IOS18MKMapKit

(Updated on 2025/01/18) Reported the Issue to an Apple Engineer

I submitted the minimal project to the Apple Developer Forums, and an Apple engineer requested that I file a bug report. Using the Feedback Assistant, I reported the details of the issue and added the feedback number to the forum thread.

https://developer.apple.com/forums/thread/765787?page=2

Additionally, the Apple engineer provided the following comments regarding possible solutions:

As to the Excluded Architectures detail here, it's really important that folks are looking to address any dependencies in your app that are requiring that you to continue using the x86_64 CPU architecture in the simulator. You should have a plan in place to make sure your libraries that aren't yet rebuilt for Apple silicon get rebuilt with Apple silicon support, or be talking with your library vendors to make sure they are providing you with an updated version that includes Apple silicon support. We have a Technote that goes into detail on what you need to do and why.

In short, if the issue is caused by libraries that do not support Apple silicon, it will be necessary to ask the library vendors to provide Apple silicon-compatible versions. This aligns with what I mentioned in the "Solution" section, and at this point, it seems to be the only viable solution.

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.