- 在Android SDK中新增FileSDK模块,提供统一的文件上传、下载、打开接口 - 实现Android端文件下载到沙盒目录或公共Downloads目录,并支持通知栏进度显示 - 完善Android WebView组件,增加文件选择、拍照、下载拦截、H5双向通信能力 - 在iOS SDK中新增XuqmFileSDK模块,提供文件上传下载功能 - 实现iOS端WebView组件的文件下载拦截和原生文件选择器集成 - 更新文档说明Android和iOS SDK的文件操作API使用方法 - 重构iOS SDK项目结构,按功能拆分为多个独立模块便于集成 - 添加文件下载进度通知和完成后的文件打开功能
77 行
2.8 KiB
Swift
77 行
2.8 KiB
Swift
// swift-tools-version: 5.9
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "XuqmSDK",
|
|
platforms: [.iOS(.v16), .macOS(.v13)],
|
|
products: [
|
|
// Individual modules — use these for per-module consumption
|
|
.library(name: "XuqmCoreSDK", targets: ["XuqmCoreSDK"]),
|
|
.library(name: "XuqmImSDK", targets: ["XuqmImSDK"]),
|
|
.library(name: "XuqmPushSDK", targets: ["XuqmPushSDK"]),
|
|
.library(name: "XuqmUpdateSDK", targets: ["XuqmUpdateSDK"]),
|
|
.library(name: "XuqmLicenseSDK", targets: ["XuqmLicenseSDK"]),
|
|
.library(name: "XuqmFileSDK", targets: ["XuqmFileSDK"]),
|
|
.library(name: "XuqmWebViewSDK", targets: ["XuqmWebViewSDK"]),
|
|
// Convenience — backward compatible, includes all modules
|
|
.library(name: "XuqmSDK", targets: ["XuqmSDK"]),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "XuqmCoreSDK",
|
|
path: "Sources/XuqmCoreSDK",
|
|
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
|
|
),
|
|
.target(
|
|
name: "XuqmImSDK",
|
|
dependencies: ["XuqmCoreSDK", "XuqmFileSDK"],
|
|
path: "Sources/XuqmImSDK",
|
|
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
|
|
),
|
|
.target(
|
|
name: "XuqmPushSDK",
|
|
dependencies: ["XuqmCoreSDK"],
|
|
path: "Sources/XuqmPushSDK",
|
|
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
|
|
),
|
|
.target(
|
|
name: "XuqmUpdateSDK",
|
|
dependencies: ["XuqmCoreSDK"],
|
|
path: "Sources/XuqmUpdateSDK",
|
|
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
|
|
),
|
|
.target(
|
|
name: "XuqmLicenseSDK",
|
|
dependencies: ["XuqmCoreSDK"],
|
|
path: "Sources/XuqmLicenseSDK",
|
|
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
|
|
),
|
|
.target(
|
|
name: "XuqmFileSDK",
|
|
dependencies: ["XuqmCoreSDK"],
|
|
path: "Sources/XuqmFileSDK",
|
|
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
|
|
),
|
|
.target(
|
|
name: "XuqmWebViewSDK",
|
|
dependencies: ["XuqmFileSDK"],
|
|
path: "Sources/XuqmWebViewSDK",
|
|
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
|
|
),
|
|
.target(
|
|
name: "XuqmSDK",
|
|
dependencies: [
|
|
"XuqmCoreSDK", "XuqmImSDK", "XuqmPushSDK",
|
|
"XuqmUpdateSDK", "XuqmLicenseSDK", "XuqmFileSDK",
|
|
],
|
|
path: "Sources/XuqmSDK",
|
|
swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
|
|
),
|
|
.testTarget(
|
|
name: "XuqmSDKTests",
|
|
dependencies: ["XuqmSDK"],
|
|
path: "Tests/XuqmSDKTests"
|
|
),
|
|
]
|
|
)
|