Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
add Swift Package installation instructions
  • Loading branch information
soundflix committed Jan 1, 2022
1 parent b8665a1 commit e5ced89
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,31 @@ SwiftOSC is a Swift Open Sound Control (OSC) 1.1 client and server framework.

## Installation

```
### [CocoaPods](http://cocoapods.org)

````ruby
pod 'SwiftOSC', '~> 2.0'
````

### [Swift Package Manager](https://swift.org/package-manager/)

```swift
dependencies: [
.package(url: "https://github.com/soundflix/SwiftOSC.git", from: "2.0.0")
]
```

OR
Alternatively, you can add the package [directly via Xcode](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).

OR install locally:

### Step 1

Clone or download repository from Github.

### Step 2

Open SwiftOSC.xcworkspace and build SwiftOSC frameworks.
Open SwiftOSC.xcworkspace and build SwiftOSC frameworks.

### Step 3

Expand All @@ -47,7 +59,7 @@ var server = OSCServer(port: 8080)
Setup server delegate to handle incoming OSC Data
```swift
class OSCHandler: OSCServerDelegate {

func didReceive(_ message: OSCMessage){
if let integer = message.arguments[0] as? Int {
print("Received int \(integer)")
Expand Down Expand Up @@ -93,7 +105,7 @@ client.send(message)
```
## Known Issues
- OSCClient loses connection following returning from being in the background. Call client.restart() in this situation.\


## About

Expand Down

0 comments on commit e5ced89

Please sign in to comment.