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
Code Block 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
| - | Sources
| - | Tests
| - | framework.xcframework
Code Block swift . . .target( name: "Sample"), .testTarget( name: "SampleTests", dependencies: ["Sample"]), .binaryTarget( name: "SampleFramework", path: "framework.xcframework") ] . .