You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,25 +46,27 @@ $ brew install carthage
46
46
To integrate SwiftyZorb into your Xcode project using Carthage, specify it in your `Cartfile`:
47
47
48
48
```ogdl
49
-
github "SomaticLabs/SwiftyZorb" ~> 2.0
49
+
github "SomaticLabs/SwiftyZorb" ~> 3.0
50
50
```
51
51
52
52
Run `carthage update` to build the framework and drag the built `SwiftyZorb.framework` into your Xcode project.
53
53
54
-
You must also drag the built dependencies `Alamofire.framework`, `SwiftyBluetooth.framework`, and`SwiftyJSON.framework` into your project.
54
+
You must also drag the built dependencies `Alamofire.framework`, `SwiftyBluetooth.framework`, `SwiftyJSON.framework`, and `SwiftProtobuf.framework` into your project.
55
55
56
56
## Single Device Usage
57
57
58
58
There are two ways to use this libary. If you intend to connect and reconnect to one Zorb peripheral device, use the following methods.
59
59
60
60
### Connecting
61
61
62
-
Before being able to communicate with a Zorb peripheral device, you must establish a Bluetooth LE connection with your device.
62
+
Before being able to communicate with a Zorb peripheral device, you must establish a Bluetooth LE connection with your device.
63
+
64
+
The `withVersion` parameter is used to specify which version of Zorb hardware you are using. If you are unsure which hardware you have, please [contact us](mailto:developers@somaticlabs.io).
63
65
64
66
```swift
65
67
importSwiftyZorb
66
68
67
-
SwiftyZorb.connect { result in
69
+
SwiftyZorb.connect(withVersion: .V2) { result in
68
70
switch result {
69
71
case .success:
70
72
// Connected succeeded
@@ -193,7 +195,7 @@ If you would like to manage connections with multiple Zorb peripheral devices, y
193
195
194
196
```swift
195
197
// Retrieves a list all available devices as an array of `ZorbDevice` objects.
196
-
SwiftyZorb.retrieveAvailableDevices { result in
198
+
SwiftyZorb.retrieveAvailableDevices(withVersion: .V2) { result in
Copy file name to clipboardExpand all lines: SwiftyZorb/Internal/BluetoothManager.swift
+20-9Lines changed: 20 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -49,14 +49,19 @@ final internal class BluetoothManager: NSObject {
49
49
/**
50
50
Called to initiate connection with Zorb peripheral, handles reconnection process based on this logical diagram: 
0 commit comments