Files
suixinkan_ios_new/suixinkan/Core/CameraTethering/CameraTetheringSession.swift
汉秋 90d135b5ac 完善 OTG 相机有线传图:支持 Sony/Canon 自动识别,页面 detach 保持会话以便再次进入复连。
引入进程级 CameraTetheringSession 与共享 USB Browser;离开传图页仅取消 UI 回调,App 终止时再完整 shutdown 释放 PTP 与 Browser 资源。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 15:45:35 +08:00

18 lines
532 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Foundation
/// OTG detach UI App shutdown
@MainActor
enum CameraTetheringSession {
static let sharedService = AutoDetectCameraService()
/// UI ICC/PTP Browser
static func detachFromUI() {
sharedService.detachFromUI()
}
/// App USB Browser
static func shutdown() async {
await sharedService.shutdown()
}
}