Issue #575
Create Objc target
Check runtime
Check for example _runtime(_ObjC)
or os(macOS
if you plan to use platform specific feature
- https://github.com/Quick/Quick/blob/master/Package.swift
- https://github.com/Quick/Quick/pull/687/files
For example, in test we use XCTest
which is run via Xcode and is a macOS framework, so we need to check for os(macOS)
Note that in Objc framework, the header files must be in include
folder
targets: {
var targets: [Target] = [
.testTarget(
name: "QuickTests",
dependencies: [ "Quick", "Nimble" ],
exclude: [
"QuickAfterSuiteTests/AfterSuiteTests+ObjC.m",
"QuickFocusedTests/FocusedTests+ObjC.m",
"QuickTests/FunctionalTests/ObjC",
"QuickTests/Helpers/QCKSpecRunner.h",
"QuickTests/Helpers/QCKSpecRunner.m",
"QuickTests/Helpers/QuickTestsBridgingHeader.h",
"QuickTests/QuickConfigurationTests.m",
]
),
]
#if os(macOS)
targets.append(contentsOf: [
.target(name: "QuickSpecBase", dependencies: []),
.target(name: "Quick", dependencies: [ "QuickSpecBase" ]),
])
#else
targets.append(contentsOf: [
.target(name: "Quick", dependencies: []),
])
#endif
return targets
}(),