I have a local swift package with both 'Objective-C' and 'Swift' code. I got it working by using 2 different targets in the same package as shown below:
let package = Package( name: "DataStore", platforms: [.iOS(.v13)], products: [ .library( name: "DataStore", targets: ["DataStoreObjC", "DataStoreSwift"] ) ], dependencies: , targets: [ .target( name: "DataStoreObjC", dependencies: , path: "Sources/ObjC", publicHeadersPath: "include" ), .target( name: "DataStoreSwift", dependencies: , path: "Sources/Swift", publicHeadersPath: "include" ), ] )
I can add DataStore package as local package dependency to an app or another local package.
My question is: what if I want to use the file within
DataStoreSwift and vice -versa?
As an example:
- There is
DataStoreObjCwhich I want to use in
- Also there is a
DataStoreSwiftwhich I want to use in
Is there any way to achieve this?