登录 注册
电商与营销工具数据分析与数据处理
4,173
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
Swift
语言
—
创建时间
最近更新

项目能做什么

Valet 是一个专为苹果生态(iOS、macOS、tvOS、watchOS)打造的 Swift 开源库。它解决了系统 Keychain 底层 API 繁琐复杂的问题,无需深入了解其原理即可通过简单直观的键值接口,在钥匙串中安全存储敏感数据,并支持灵活配置访问权限。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Valet

[![CI Status](https://img.shields.io/github/actions/workflow/status/square/Valet/ci.yml?branch=main)](https://github.com/square/Valet/actions?query=workflow%3ACI+branch%3Amain)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fsquare%2FValet%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/square/Valet)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fsquare%2FValet%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/square/Valet)
[![codecov](https://codecov.io/gh/square/Valet/branch/master/graph/badge.svg)](https://codecov.io/gh/square/Valet)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://spdx.org/licenses/Apache-2.0.html)

Valet lets you securely store data in the iOS, tvOS, watchOS, or macOS Keychain without knowing a thing about how the Keychain works. It’s easy. We promise.

## Getting Started

### Swift Package Manager

Install with [Swift Package Manager](https://github.com/apple/swift-package-manager) by adding the following to your `Package.swift`:

```swift
dependencies: [
    .package(url: "https://github.com/Square/Valet", from: "5.0.0"),
],
```

### CocoaPods

Valet 5.1.0 and earlier remain available on CocoaPods. Newer releases are not published there, so use one of the other installation methods on this page.

### Carthage

Install with [Carthage](https://github.com/Carthage/Carthage) by adding the following to your `Cartfile`:

```ogdl
github "Square/Valet"
```

Run `carthage update --use-xcframeworks` to build the framework and drag the built `Valet.xcframework` from `Carthage/Build` into your Xcode project.

### Submodules

Or manually checkout the submodule with `git submodule add git@github.com:Square/Valet.git`, drag Valet.xcodeproj to your project, and add Valet as a build dependency.

## Usage

Prefer to learn via watching a video? Check out [this video tutorial](https://www.youtube.com/watch?v=E2Z8BBARlvs&list=PL_csAAO9PQ8Z9QxzfRxpN1YrVHXmncTSU&index=3). Note that this video was recorded during the Valet 4 release.

### Basic Initialization

```swift
let myValet = Valet.valet(with: Identifier(nonEmpty: "Druidia")!, accessibility: .whenUnlocked)
```

```objc
VALValet *const myValet = [VALValet valetWithIdentifier:@"Druidia" accessibility:VALAccessibilityWhenUnlocked];
```

To begin storing data securely using Valet, you need to create a Valet instance with:

* An identifier – a non-empty string that is used to identify this Valet. The Swift API uses an `Identifier` wrapper class to enforce the non-empty constraint.
* An accessibility value – an enum ([Accessibility](Sources/Valet/Accessibility.swift#L25)) that defines when you will be able to persist and retrieve data.

This `myValet` instance can be used to store and retrieve data securely on this device, but only when the device is unlocked.

#### Choosing the Best Identifier

The identifier you choose for your Valet
阅读完整原文

项目深度分析 AI 生成

跨平台/多设备端到端加密云同步 SDK (Cloud-Valet)

产品构想基于 Valet 的本地 Keychain 抽象,提供开箱即用的 iCloud / 私有云 E2EE 跨设备同步能力,解决单纯本地 Keychain 无法跨设备无缝共享安全凭证的痛点。
核心功能端到端加密同步、冲突解决逻辑、生物识别(Face ID/Touch ID)解锁解密凭证、零知识后端接口适配器。
目标用户开发多端协同应用(如跨平台密码管理器、笔记应用、即时通讯工具)的独立开发者与中小团队。
难度/周期高 · 2-3个月 · 成本:低(主要为云中继服务器及苹果开发者账号成本)
收费模式按 MAU 或数据同步量的 SaaS 订阅制;提供免费 Tier + 商业高级版。
竞争风险网络同步大幅增加安全攻击面;Apple 官方已有 iCloud Keychain/CloudKit 竞品方案。
依据 AI推测

移动端数据合规与存储安全静态/动态分析插件

产品构想针对 iOS/macOS 开发者推出的安全检测工具,检查应用内敏感数据(Token、密码、个人隐私)是否存在明文 UserDefaults 存储或 Keychain 权限配置不当(Accessibility 设置错误)。
核心功能Xcode/CI 集成扫描脚本、不安全存储自动修复建议(一键迁移到 Valet 格式)、合规报告导出(支持 GDPR/HIPAA 审计要求)。
目标用户出海移动应用开发者、金融与健康类 App 安全合规负责人。
难度/周期中等 · 1-2个月 · 成本:极低(主要是本地分析工具与规则集维护)
收费模式开发者工具买断制(License Key)或团队 CI 扫描每月订阅费。
竞争风险规则覆盖率要求高,同类大型静态代码分析工具(如 SonarQube)可能带来竞争。
依据 尚需验证的假设

移动端高级安全加固与防逆向企业扩展包

产品构想基于 Valet 接口规范,提供包含越狱/Root 环境检测、内存防 Dump、动态反 Hook 与硬件级 Secure Enclave 强化绑定的商业级安全扩展库。
核心功能Secure Enclave 深度绑定、内存中敏感字符串即时擦除、越狱/调试环境阻止 Keychain 访问、防重放攻击签名。
目标用户移动金融、数字钱包、高价值 IP 类应用的开发商。
难度/周期高 · 3个月以上 · 成本:极低(纯软件开发)
收费模式按应用年授权(Per-app Annual License)或定制安全咨询服务。
竞争风险需要极深厚的底层 iOS 逆向与对抗能力,交付成本和技术支持压力大。
依据 已验证事实
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

相似项目数据正在完善中,暂不展示(避免误导)

项目优势与风险

技术成熟度创建时间待补全,最近推送 ,发布过 56 个 Release
社区活跃Star 4,173 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。