PlutoSwiftSDK is a Swift library that provides tools for proof generation and includes a reusable BrowserView component.
- Proof generation for your provided configuration.
- Reusable BrowserView component based on WKWebView.
- macOS: 11.0 or later
- Xcode: 14.0 or later
- iOS: 12.0 or later
- Swift: 5.0+
git clone https://github.com/yourusername/PlutoSwiftSDK.git
cd PlutoSwiftSDKOpen the Xcode project:
open PlutoSwiftSDK.xcodeprojSelect the PlutoSwiftSDK scheme and build it with Cmd + B.
Select the PlutoSDKTestApp scheme and run it:
Cmd + RRun the tests in Xcode with Cmd + U. Or from the terminal:
xcodebuild test -scheme PlutoSwiftSDK -destination 'platform=iOS Simulator,name=iPhone 14'PlutoSwiftSDK/
├── Sources/ # Source code
│ ├── Enums.swift # Enums
│ ├── ManifestModels.swift # Models for manifest
│ ├── ManifestParser.swift # JSON parsing
│ ├── BrowserView.swift # BrowserView component
│ └── PlutoSDK.swift # Public API
├── Tests/ # Unit tests
├── PlutoSDKTestApp/ # Sample app
├── PlutoSwiftSDK.xcodeproj # Xcode project
└── README.md # Project documentation
- Open Xcode and go to File > Swift Packages > Add Package Dependency.
- Enter the repository URL: https://github.com/yourusername/PlutoSwiftSDK.git
- Add this to your Podfile:
pod 'PlutoSwiftSDK', :git => 'https://github.com/yourusername/PlutoSwiftSDK.git'- Run
pod installimport PlutoSwiftSDK
let manifestConfig = """
{
"manifestVersion": "1.0",
"id": "1234",
"title": "Sample",
"description": "This is a test.",
"mode": "TLSN",
"request": {
"method": "POST",
"url": "https://example.com/api",
"headers": { "Content-Type": "application/json" },
"body": "{\\"key\\":\\"value\\"}"
},
"response": {
"status": "200",
"headers": {},
"body": {
"json": [["key", "value"]],
"contains": "success"
}
}
}
"""
if let manifest = PlutoSDK.parseManifest(config: manifestConfig) {
print("Manifest ID: \(manifest.id)")
}import PlutoSwiftSDK
import UIKit
let browserView = BrowserView(frame: someView.bounds)
browserView.load(url: URL(string: "https://example.com")!)
someView.addSubview(browserView)- Fork the repository.
- Create a new branch.
- Commit and push your changes.
- Open a pull request.
This project is licensed under the MIT License.
GitHub: pluto
Twitter: @plutolabs_
First, update the version in the PlutoSwiftSDK.podspec file.
make releaseThis will archive the framework, zip it up, and give you a sha256 of it.
Next, upload the zipped file to the GCP Bucket.
Once that is uploaded, grab the public URL and update the PlutoSwiftSDK.podspec file with the new URL and sha256.
Finally, publish then new version to CocoaPods:
pod trunk push PlutoSwiftSDK.podspec