// swift-tools-version: 5.9 import PackageDescription let package = Package( name: "azure_speech", platforms: [.iOS("16.0")], products: [ .library(name: "azure-speech", targets: ["azure_speech"]) ], dependencies: [ // 依赖speech接口模块 .package(path: "../../../speech/ios/speech"), // 添加对ble_service的依赖 .package(path: "../../../ble_service/ios/ble_service") ], targets: [ .target( name: "azure_speech", dependencies: [ .product(name: "speech", package: "speech"), .product(name: "ble-service", package: "ble_service"), "MicrosoftCognitiveServicesSpeech" ], path: "Sources", // 修改为包含整个 Sources 目录 sources: ["azure_speech/", "tools/"] // 明确指定包含的子目录 ), // 使用binaryTarget引用Azure Speech SDK的.xcframework .binaryTarget( name: "MicrosoftCognitiveServicesSpeech", path: "MicrosoftCognitiveServicesSpeech.xcframework" ) ] )