I've got an Xcode project with the following file structure:
MyPlugin.xcodeproject
sdk.xcconfig
MyPlugin.c
MyPlugin.swift
MyPlugin-Bridging-Header.h
If I remove MyPlugin.swift from the target, everything compiles fine. Adding it to the target outputs the following error:
Swift Compiler Error: 'Files.h' file not found
The contents of MyPlugin-Bridging-Header.h
is simply:
#include "sdk.h"
That sdk.h
is being found correctly in the search paths, however it has the following line which is where the error is occurring.
#include <Files.h>
Everything I've searched for has mentioned creating a module.modulemap
file so I've have tried that with the following, but it doesn't fix the error:
module Files [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/Files.h"
export *
}
I'm currently wondering whether this modulemap will work if the #include
statement I'm trying to fix is within the sdk.h rather than directly in the bridging header?
Additional set up info:
Xcode 10, Swift 4.2, Deployment target: 10.9, Architectures: x86_64