Search code examples
swiftmapkitios13xcode11

Symbol not found when building App including MapKit


When using the new Xcode 11 beta. I'm getting the following crash while running my app that uses MapKit. Xcode 10 works fine. Also creating a new project and adding a Map with Mapkit works fine.

A simple web search doesn't yield anything.

Any clues where to look to solve this problem?

Xcode 11 beta 1:

dyld: Symbol not found: _NavigationConfig_MapLocalizeLabels
  Referenced from: /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/MapKit.framework/MapKit
  Expected in: /Users/Teameh/Library/Developer/Xcode/DerivedData/MyApp-dejdjcwzzweszweqllhjxqbarbsp/Build/Products/Debug-iphonesimulator/Navigation.framework/Navigation
 in /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/MapKit.framework/MapKit

Xcode 11 beta 3:

dyld: Symbol not found: _NavigationConfig_MapLocalizeLabels
  Referenced from: /System/Library/Frameworks/MapKit.framework/MapKit
  Expected in: /Users/Teameh/Library/Developer/Xcode/DerivedData/MyApp-dejdjcwzzweszweqllhjxqbarbsp/Build/Products/Debug-iphonesimulator/Navigation.framework/Navigation
 in /System/Library/Frameworks/MapKit.framework/MapKit

I've split my code up in multiple frameworks, one is called Navigation.framework, could that be the issue? This was not a problem with Xcode 10.


Update 1

As suggested by in the comments, this is not fixed by adding MapKit to the embedded frameworks. I thought system frameworks should not be added to the embedded frameworks, and this shows that that does not work.


Update 2

I've removed MapKit and all the code referencing it but still I get the same crash.


Solution

  • As you stated you have your own Navigation Framework. Xcode is looking for _NavigationConfig_MapLocalizeLabels in your own Navigation Framework instead of Mapkit's Navigation framework.

    Renaming your Navigation framework to something else should do the trick.