Is there a good way to manage Objective C imports across the different Swift Package Manager incarnations?
I've been settling on repo-relative imports since that seems to be good way to make Objective C library code portable across CocoaPods, swift build, swift test and inclusion in app projects via Xcode's Swift Package Manager interface.
After the testing suggestion at SwiftPM and Library Unit Testing, I'm also trying swift package generate-xcodeproj and that doesn't seem to work:
For the other Swift Package Manager incarnations, accessing repo-relative headers works by adding .headerSearchPath("../.."), to the target where the path is a relative path from the path: to the repo root. With swift package generate-xcodeproj, I start to get the right paths if I add .headerSearchPath("${SOURCE_ROOT}"),. However, then I run into build failures since modules seem to be disabled in the swift package generate-xcodeproj while they're required in the other build.
I'll keep working through this, but it feels like I might have taken a wrong turn and curious if there's a better way.
You don't need an Xcode project, Xcode 11+ natively understands your package. You can create schemes by opening the package in Xcode (e.g. by just double-clicking the Package.swift manifest file), but most likely you won't need them and can use the autogenerated ones. Running xcodebuild -list in the directory which contains your package manifest will show which schemes are available, just like it would for an Xcode project.