Any practice about Swift Package Manager, to write a Objc/Swift mixed framework which don't force user to use different module name?

I want to create the same integration just like you import UIKit.

If you're Objective-C user, you only use Objective-C API.

If you're Swift user, you use some auto Objective-C exported API as well as libSwiftUIKit.dylib pure Swift overlay API. You don't need import SwiftUIKit

However, SwiftPM doesn't allow one Target (Module? Is one target must match one module ?) "contains mixed language source files; feature not supported". This error will prevent you do this thing as raw Xcode Target orgnization.

Note Xcode, Pods/Carthage supports this.

1 Like

Also post the question on twitter, but seems there are no better solution. I have to either blame my Objc user or blame Swift user.

Getting this error: contains mixed language source files; feature not supported

Any plans to add the mixed objective-c and Swift files in the Swift package manager target?

Terms of Service

Privacy Policy

Cookie Policy