https://github.com/securevale/swift-confidential-plugin
Swift Package Manager build tool plugin for Swift Confidential.
https://github.com/securevale/swift-confidential-plugin
ios literals obfuscation spm-plugin swift swiftpm
Last synced: 3 months ago
JSON representation
Swift Package Manager build tool plugin for Swift Confidential.
- Host: GitHub
- URL: https://github.com/securevale/swift-confidential-plugin
- Owner: securevale
- License: apache-2.0
- Created: 2022-07-03T20:57:58.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-09-18T16:34:12.000Z (4 months ago)
- Last Synced: 2025-10-16T18:31:52.934Z (3 months ago)
- Topics: ios, literals, obfuscation, spm-plugin, swift, swiftpm
- Language: Swift
- Homepage: https://securevale.blog/open-source
- Size: 37.1 KB
- Stars: 19
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Swift Confidential Plugin
[](https://github.com/securevale/swift-confidential-plugin/actions/workflows/ci.yml)
[](https://www.swift.org/download)
A Swift Package Manager build tool plugin that supports obfuscating Swift literals embedded in libraries and executables.
## Usage
Please see the [Swift Confidential documentation](https://github.com/securevale/swift-confidential) for more detailed usage instructions.
### Adding the plugin as a dependency
You can use this plugin with both SwiftPM and Xcode targets, depending on your needs. Please see the relevant section below for detailed installation instructions.
#### SwiftPM
To use the Swift Confidential plugin with your SwiftPM target, add it to the package's dependencies and then to your target's plugins:
```swift
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
// name, platforms, products, etc.
dependencies: [
// other dependencies
.package(url: "https://github.com/securevale/swift-confidential-plugin.git", .upToNextMinor(from: "0.4.0"))
],
targets: [
.target(
// name, dependencies, resources, etc.
plugins: [
// other plugins
.plugin(name: "Confidential", package: "swift-confidential-plugin")
]
)
]
)
```
#### Xcode
To use the Swift Confidential plugin directly with your Xcode target:
* Add `swift-confidential-plugin` package to your Xcode project. Please refer to the [official documentation](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app) for step-by-step instructions on how to add package dependencies.
* Then, navigate to your target’s `Build Phases` pane, and in the `Run Build Tool Plug-ins` section, click the `+` button, select the `Confidential` plugin, and click the `Add` button.
> [!IMPORTANT]
> Due to the limitations of XcodeProjectPlugin API, the [`confidential.yml` configuration file](https://github.com/securevale/swift-confidential#configuration) must be located in the Xcode project's top-level directory, meaning that you cannot create distinct sets of secret literals for different Xcode targets. Hopefully, this behavior will be improved in the future.
## Versioning
This project follows [semantic versioning](https://semver.org/). The plugin's releases are synced with [Swift Confidential](https://github.com/securevale/swift-confidential) releases.
## License
This plugin is released under Apache License v2.0 with Runtime Library Exception.
Please see [LICENSE](LICENSE) for more information.