# TLCLock-SDK-ios **Repository Path**: tlclock/tlclock-sdk-ios ## Basic Information - **Project Name**: TLCLock-SDK-ios - **Description**: tlcLock sdk pod仓库托管 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-20 - **Last Updated**: 2025-02-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # TLCLock-SDK-ios #### 介绍 tlcLock sdk, 是用于管理TLC门锁的SDK,内部通过蓝牙与门锁进行交互 #### 安装教程 1. pod安装 Podfile添加TLCLock的依赖 ``` source 'https://github.com/CocoaPods/Specs.git' platform :ios, '13.0' target 'TLCLockDemo' do use_frameworks! pod 'TLCLock', '~> 0.1.1' end ``` 2. Swift Package Manager 开发工具: Xcode 15.0+ ``` https://gitee.com/tlclock/tlclock-sdk-ios.git ``` 请选择最新的tag 3. 手动安装 可直接拖 `TLCLock.xcframework`到项目中 环境: * iOS 13.0+ * Xcode 15.0+ | Swift 5+ #### 使用说明 1. 添加隐私权限说明 因为用到了设备的蓝牙,项目中需要在info.plist内进行说明 ``` NSBluetoothAlwaysUsageDescription 蓝牙权限将用于扫描、添加和使用蓝牙设备。请点击“好”,授权APP使用该权限。 NSBluetoothPeripheralUsageDescription 蓝牙权限将用于扫描、添加和使用蓝牙设备。请点击“好”,授权APP使用该权限。 ``` 2. SDK内部会进行扫描,连接,发送等逻辑,使用者无需关心这些细节,只需要通过`TLCManager`获取一个`LockDevice`对象,即可进行相关操作 ``` let device = TLCManager.getLockDevice(mac: mac) let result = await device.getLockInfo() if result.isFailure { showToast(result.errorMessage) return } let value = result.value! ``` #### Demo demo: https://gitee.com/tlclock/tlclock-demo_ios.git #### 联系 email: 936381813@qq.com