Need help understanding if this is an XCode issue or user error. I created a XCFramework to distribute as a Swift Package.
Manifest file ex:
When I import my Swift package in to a new XCode project, the modules in the dependencies are not found. Only when I manually import each dependency as a Swift Package in the new project can I successfully build.
At this point, however, when I run the app, I get warnings of duplicate definitions for those modules I manually added.
Example of one of those warnings:
Is this a bug or am I misunderstanding how to define my package manifest file?
Manifest file ex:
Code Block // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "MyFramework", platforms: [ .iOS(.v9) ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "MyFramework", targets: ["MyFramework"]) ], dependencies: [ .package(name: "Alamofire", url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "4.8.2")), ... ], targets: [ .binaryTarget( name: "MyFramework", path: "./Sources/MyFramework.xcframework") ] )
When I import my Swift package in to a new XCode project, the modules in the dependencies are not found. Only when I manually import each dependency as a Swift Package in the new project can I successfully build.
At this point, however, when I run the app, I get warnings of duplicate definitions for those modules I manually added.
Example of one of those warnings:
Code Block objc[556]: Class _TtCC9Alamofire17MultipartFormData8BodyPart is implemented in both /private/var/containers/Bundle/Application/BDC359F9-519E-476F-94BF-9F94736B1B66/MyApp.app/Frameworks/MyFramework.framework/MyFramework (0x10578cd08) and /private/var/containers/Bundle/Application/BDC359F9-519E-476F-94BF-9F94736B1B66/MyApp.app/MyApp (0x1050ed3a0). One of the two will be used. Which one is undefined.
Is this a bug or am I misunderstanding how to define my package manifest file?