Swift Package Manager distribution repo for NIM iOS SDK.
- Open your project in Xcode.
- Go to File -> Add Package Dependencies...
- Enter:
https://github.com/netease-im/nimsdk-spm.git
- Select a version rule (recommended: Up to Next Major).
- Choose product(s) you need.
// swift-tools-version:5.7
import PackageDescription
let package = Package(
name: "YourApp",
dependencies: [
.package(url: "https://github.com/netease-im/nimsdk-spm.git", from: "10.9.76")
],
targets: [
.target(
name: "YourApp",
dependencies: [
.product(name: "NIMSDK", package: "nimsdk-spm")
]
)
]
)Available products in this package:
NIMSDKNOSFCSBASEQChat
- SPM tags should map to released SDK versions.
- Binary URLs and SHA-256 checksums are stored in
Package.swift. nimsdk-spmandnimsdk-lite-spmshould not be integrated together in one app.
SwiftPM verifies each binary target with the SHA-256 checksum declared in Package.swift.
If a downloaded binary does not match the checksum, integration fails.