I have objc project https://github.com/facebookincubator/SocketRocket which I forked and adding SPM support. I create Package.swift:
let package = Package(
name: "SocketRocket",
platforms: [
.iOS(.v12)
],
products: [
.library(
name: "SocketRocket",
targets: ["SocketRocket"]
)
],
targets: [
.target(
name: "SocketRocket",
path: "SocketRocket",
publicHeadersPath: "."
),
.testTarget(
name: "SocketRocketTests",
dependencies: ["SocketRocket"],
path: "Tests"
)
]
)
There is an umbrella header file inside of project SocketRocket.h:
#import <SocketRocket/NSRunLoop+SRWebSocket.h>
#import <SocketRocket/NSURLRequest+SRWebSocket.h>
#import <SocketRocket/SRSecurityPolicy.h>
#import <SocketRocket/SRWebSocket.h>
I created a modulemap:
module SocketRocket {
header "SocketRocket.h"
export *
}
But there is issue in building package: Building for debugging... fatal error: 'SRDelegateController.h' file not found #import "SRDelegateController.h" ^~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
I think imports is not applying, every time I run again and again there is different number of compiled files(0, 3, 4, 19):
[0/19] Compiling SRIOConsumerPool.m
I'm expecting to solve my problem.
publicHeadersPathand don't need use modulemap