3

I've got a project using Mapbox. The code base is mixed objC and Swift code. The class using Mapbox is written in Swift but is exposed to legacy objC code. I'm using !use_frameworks in my pod file to be able to use Swift pods as well. The problem I'm facing is that generated -swift.h file is wrong.

This is the problematic bit:

#if defined(__has_feature) && __has_feature(modules)
@import ObjectiveC;
@import Mapbox;
@import CoreGraphics;
@import Foundation;
@import UIKit;
#endif

__has_feature(modules) is false so it won't import Mapbox module and the build fails later in the file

@interface MapBoxView : NSObject <MGLMapViewDelegate>

since it doesn't know the MGLMapViewDelegate.

I've got all the Define modules, Enable modules, etc. set to Yes in all project/target settings. Any ideas?

Tom
  • 1,516
  • 1
  • 14
  • 34

0 Answers0