XuqmGroup-Web/docs-site/docs/ios/setup.md
XuqmGroup 06436394ed docs: fix version numbers, add license SDK docs; fix service gating reactivity
- Android: correct version header 0.5.x→0.4.x, add sdk-license to module table, update artifact versions to 0.4.10
- iOS: correct min version iOS 14→16, bump version to 0.2.0, update SPM ref to from: "0.2.0"
- RN: fix version 0.3.x→0.2.x, standardize npm registry URL, add @xuqm/rn-license to module table
- Flutter: update git ref to v0.2.2, add xuqm_flutter_license to module tables
- Add new docs: ios/license, rn/push, rn/license, flutter/push, flutter/update, flutter/license
- tenant-platform: make appKey a computed ref in Push/VersionManagementView to fix service gating reactivity on route change
- tenant-platform: add requestActivation API endpoint
- tenant-platform: add IM service gating UI (checkServiceEnabled + activation dialog)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 02:23:57 +08:00

95 行
1.8 KiB
Markdown

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

# iOS 安装配置
**版本**0.2.0 · **最低 iOS 版本**iOS 16 · **语言**Swift 5.9+
---
## Swift Package Manager推荐
SDK 已发布到 Gitea,在 Xcode → File → Add Package Dependencies 中输入:
```
https://xuqinmin.com/xuqinmin12/XuqmGroup-iOSSDK
```
或在 `Package.swift` 中添加:
```swift
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "MyApp",
platforms: [.iOS(.v16)],
dependencies: [
.package(url: "https://xuqinmin.com/xuqinmin12/XuqmGroup-iOSSDK", from: "0.2.0")
],
targets: [
.target(
name: "MyApp",
dependencies: [
.product(name: "XuqmSDK", package: "XuqmGroup-iOSSDK")
]
)
]
)
```
> 目前 iOS SDK 以单模块 `XuqmSDK` 发布,内部包含 Core、IM、Push、Update 子模块。
---
## 最低 iOS 版本
- iOS 16.0+
- macOS 13.0+(如需 Mac Catalyst
- Xcode 16.0+
---
## 权限声明
根据业务需要,在 `Info.plist` 中添加以下权限:
### Camera拍照/视频通话)
```xml
<key>NSCameraUsageDescription</key>
<string>需要访问相机以发送图片或进行视频通话</string>
```
### Photo Library发送图片/视频)
```xml
<key>NSPhotoLibraryUsageDescription</key>
<string>需要访问相册以发送图片和视频</string>
```
### Microphone语音消息/语音通话)
```xml
<key>NSMicrophoneUsageDescription</key>
<string>需要访问麦克风以发送语音消息或进行通话</string>
```
---
## 初始化
`AppDelegate``SceneDelegate` 中:
```swift
import XuqmSDK
XuqmSDK.shared.initialize(config: config)
```
---
## 下一步
- [iOS IM 接入 →](./im)
- [iOS Push 接入 →](./push)
- [iOS 版本更新 →](./update)
- [iOS 授权管理 →](./license)