Skip to content
This repository was archived by the owner on Jul 21, 2020. It is now read-only.

Commit 25441c3

Browse files
committed
Added a user agent header to the constellation client
1 parent 8abd70a commit 25441c3

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

BeamAPI.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "BeamAPI"
3-
s.version = "1.2.8"
3+
s.version = "1.2.9"
44
s.summary = "An interface to communicate with Beam's backend."
55
s.homepage = "https://github.com/WatchBeam/beam-client-swift"
66
s.license = "MIT"
@@ -9,7 +9,7 @@ Pod::Spec.new do |s|
99
s.requires_arc = true
1010
s.ios.deployment_target = "8.2"
1111
s.tvos.deployment_target = "9.0"
12-
s.source = { :git => "https://github.com/WatchBeam/beam-client-swift.git", :tag => "1.2.8" }
12+
s.source = { :git => "https://github.com/WatchBeam/beam-client-swift.git", :tag => "1.2.9" }
1313
s.source_files = "Pod/Classes/**/*"
1414

1515
s.dependency "Starscream", "~> 1.1"

Example/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- BeamAPI (1.2.4):
2+
- BeamAPI (1.2.8):
33
- Starscream (~> 1.1)
44
- SwiftyJSON (~> 2.3)
55
- Starscream (1.1.3)
@@ -13,7 +13,7 @@ EXTERNAL SOURCES:
1313
:path: "../"
1414

1515
SPEC CHECKSUMS:
16-
BeamAPI: 9afef11be931a2a12a0a6190da7a026fa72de02e
16+
BeamAPI: d9e989f852d647429438038d253ca1700ac504f6
1717
Starscream: d662732354b40dd19ed1ece3e3c44c80b536b83c
1818
SwiftyJSON: 04ccea08915aa0109039157c7974cf0298da292a
1919

Pod/Classes/Clients/ConstellationClient.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class ConstellationClient: WebSocketDelegate {
3939

4040
socket = WebSocket(url: NSURL(string: "wss://constellation.beam.pro")!)
4141
socket?.delegate = self
42+
socket?.headers["User-Agent"] = "BeamApp/\(BeamRequest.version) (iOS; \(BeamRequest.deviceName()))"
4243
socket?.connect()
4344
}
4445

Pod/Classes/Utilities/BeamRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public class BeamRequest {
174174

175175
:returns: The name of the device being used.
176176
*/
177-
private class func deviceName() -> String {
177+
internal class func deviceName() -> String {
178178
var systemInfo = utsname()
179179
uname(&systemInfo)
180180
let machineMirror = Mirror(reflecting: systemInfo.machine)

0 commit comments

Comments
 (0)