Swift Client
Implementation of a client compatible with the WRAP Protocol in Swift
Installation
PolywrapClient is available through Swift Package Manager.
Via Xcode Menu
To add Polywrap Client as an SPM package to your project in Xcode you must do: File -> Swift Packages -> Add Package Dependency. And then enter https://github.com/polywrap/swift-client
Via Package file
Add it as a dependency within your Package.swift manifest:
let package = Package(
...
dependencies: [
.package(url: "https://github.com/polywrap/swift-client.git", from: "0.0.3")
],
...
)Then import PolywrapClient wherever you’d like to use it:
import PolywrapClientUsage
Here's an example of how you could use the PolywrapClient class:
import PolywrapClient
// Create a Config Builder instance
let builder = BuilderConfig()
// Create a PolywrapClient instance with the builder
let client = builder.build()
// Invoke any method by passing URI and method name
let result: String = try client.invoke(uri: "wrap/cool-uri", method: "coolMethod")Contributions
Please check out our contributing guide for guidelines about how to proceed.
