SystemKit
开源库可用于 Apple 平台,例如 macOS
、iOS
。它是一个通用库,可以方便高效地使用设备系统功能。
Universal SystemKit 的安装方法可以通过 Swift Package Manager 或 Github 仓库 完成,详细信息如下。
如果您不想使用上述任何依赖管理器,您可以手动将 SystemKit
集成到您的项目中。
您可以拉取 SystemKit
Github 仓库,并将 SystemKit
包含进来以构建动态或静态库。
Swift Package Manager 是一种用于自动化 Swift 代码分发的工具,并已集成到 swift 编译器中。
一旦您设置好 Swift 包,将 SystemKit
添加为依赖项就像将其添加到 Package.swift 的 dependencies 值一样简单。
从 Xcode 菜单中,单击 File → Swift Packages → Add Package Dependency。
在出现的对话框中,输入仓库 URL:https://github.com/ChangYeop-Yang/Universal-SystemKit.git。
3-1. 在 Branch 中,输入文本 "master"。
dependencies: [
.package(url: "https://github.com/ChangYeop-Yang/Universal-SystemKit", .branch("master"))
]
3-2. 在 Branch 中,输入文本 "Version(2, 4, 0)"。
dependencies: [
.package(url: "https://github.com/ChangYeop-Yang/Universal-SystemKit", from: Version(2, 4, 0))
]
Universal-SystemKit
库的详细构建结果如下。
平台 | 最低 Swift 版本 | 安装 | 状态 |
---|---|---|---|
iOS 13.0+ | 5.0 | Swift Package Manager、手动、Github 仓库 | ✅ 完全测试 |
macOS 10.15+ (Catalina) | 5.0 | Swift Package Manager、手动、Github 仓库 | ✅ 完全测试 |
以下指南路径描述了使用 Universal SystemKit
开源库的方法。 有关其他相关信息,请通过创建 issue 进行咨询。
SKDispatchFileMonitor → SKDispatchFileMonitor
为 iOS 和 macOS 平台上的文件事件监控提供了通用接口。
SystemKit
在 MIT 许可证下发布。 有关详细信息,请参阅 LICENSE。
MIT License
Copyright (c) 2022 Universal-SystemKit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.