wwdc20-10147

RSS for tag

Discuss WWDC20 Session 10147 - Distribute binary frameworks as Swift packages

Posts under wwdc20-10147 tag

1 Post
Sort by:

Post

Replies

Boosts

Views

Activity

Local xcFrameworks in Swift Packages
In the talk, it was explained how to use a binaryTarget to add a .xcframework from a url, but what about a local path? Take the following Package and file structure, is this the correct way to structure and refer to the .xcFramework? | SamplePackage | - | Package.swift | - | README.swift | - | Sources | - | - | Sample | - | - | - | file.swift | - | - | SampleFramework | - | - | - | framework.xcframework | - | - | Tests | - | - | - | LinuxMain.swift | - | - | - | SampleTexts | - | - | - | - | sampleTests.swift // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package(     name: "Sample",     platforms: [         .iOS(.v13),         .macOS(.v10_12)     ],     products: [         // Products define the executables and libraries produced by a package, and make them visible to other packages.         .library(             name: "Sample",             targets: ["Sample", "SampleFramework"]),     ],     targets: [         // Targets are the basic building blocks of a package. A target can define a module or a test suite.         // Targets can depend on other targets in this package, and on products in packages which this package depends on.         .target( name: "Sample"),         .testTarget(             name: "SampleTests",             dependencies: ["Sample"]),         .binaryTarget(             name: "SampleFramework",             path: "framework.xcframework")     ] ) I am getting the following error(s): invalid custom path 'framework.xcframework' for target 'SampleFramework' target path '/framework.xcframework' is not supported; it should be relative to package root
4
0
8.2k
Dec ’23