Keychain package
* Added the Keychain package * Added a Makefile to easily build the package * Updated the README with additional information
This commit is contained in:
15
Keychain/Package.resolved
Normal file
15
Keychain/Package.resolved
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"originHash" : "60d3d428473214be2374da47614464243c913251a95cfad9c1f8331314114aba",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "swiftlintplugins",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/SimplyDanny/SwiftLintPlugins",
|
||||
"state" : {
|
||||
"revision" : "8a4640d14777685ba8f14e832373160498fbab92",
|
||||
"version" : "0.63.2"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 3
|
||||
}
|
||||
29
Keychain/Package.swift
Normal file
29
Keychain/Package.swift
Normal file
@@ -0,0 +1,29 @@
|
||||
// swift-tools-version: 6.2
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "Keychain",
|
||||
platforms: [
|
||||
.macOS(.v12)
|
||||
],
|
||||
products: [
|
||||
.library(
|
||||
name: "Keychain",
|
||||
targets: [
|
||||
"Keychain"
|
||||
]
|
||||
)
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "0.63.2")
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "Keychain",
|
||||
plugins: [
|
||||
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
6
Keychain/Sources/Keychain/Keychain.swift
Normal file
6
Keychain/Sources/Keychain/Keychain.swift
Normal file
@@ -0,0 +1,6 @@
|
||||
//
|
||||
// Keychain.swift
|
||||
// Keychain
|
||||
//
|
||||
// Created by Bram Kolkman on 20/02/2026.
|
||||
//
|
||||
13
Makefile
Normal file
13
Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
.PHONY: build resolve clean
|
||||
|
||||
build:
|
||||
@echo "Building Swift package 'Keychain'"
|
||||
@swift build --package-path Keychain --scratch-path .build
|
||||
|
||||
resolve:
|
||||
@echo "Resolving Swift package dependencies..."
|
||||
@swift package resolve --package-path Keychain --scratch-path .build
|
||||
|
||||
clean:
|
||||
@echo "Cleaning build artifacts..."
|
||||
@rm -rf .build Keychain/.swiftpm
|
||||
38
README.md
38
README.md
@@ -1,3 +1,39 @@
|
||||
# Keychain
|
||||
|
||||
A Swift package for the Keychain
|
||||
A Swift package for interacting with the Keychain.
|
||||
|
||||
## Requirements
|
||||
|
||||
- macOS 12+
|
||||
- Swift 6.2+
|
||||
|
||||
## Package Structure
|
||||
|
||||
```
|
||||
Keychain/
|
||||
├── Package.swift
|
||||
├── Package.resolved
|
||||
└── Sources/
|
||||
└── Keychain/
|
||||
└── Keychain.swift
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
- [SwiftLintPlugins](https://github.com/SimplyDanny/SwiftLintPlugins) (≥ 0.63.2) — enforces Swift style and conventions at build time.
|
||||
|
||||
## Usage
|
||||
|
||||
Add the package to your `Package.swift` dependencies and import `Keychain` in your Swift files.
|
||||
|
||||
## Makefile
|
||||
|
||||
A `Makefile` is provided at the root of the repository to simplify common tasks.
|
||||
|
||||
| Command | Description |
|
||||
|----------------|------------------------------------------|
|
||||
| `make build` | Builds the Swift package |
|
||||
| `make resolve` | Resolves package dependencies |
|
||||
| `make clean` | Removes build artifacts and `.swiftpm` |
|
||||
|
||||
Build artifacts are placed in `.build/` at the repository root (outside the package directory).
|
||||
|
||||
Reference in New Issue
Block a user