Getting SourceKit-LSP working for iOS projects: cocoapods or carthage

See this thread. Whether using cocoapods or carthage it is still the produced Xcode project and its build system that determines the compiler arguments to pass.