Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

spaceid support #114

Merged
merged 1 commit into from
Apr 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PlayerControls
2 changes: 1 addition & 1 deletion VerizonVideoPartnerSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'VerizonVideoPartnerSDK'
s.version = '1.4.2'
s.version = '1.5.0'
s.summary = 'Verizon Video Partner SDK'
s.license = { type: 'MIT', file: 'LICENSE' }
s.swift_version = '4.2'
Expand Down
3 changes: 2 additions & 1 deletion sources/VVPSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ public struct VVPSDK {
vcdn: native.vcdn,
apid: native.apid,
mpid: native.mpid,
vcid: native.vcid
vcid: native.vcid,
spaceId: native.spaceId
)

let reporter = TrackingPixels.Reporter(
Expand Down
12 changes: 11 additions & 1 deletion sources/config/Context.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,15 @@ extension VVPSDK {
public var renderers: [Renderer.Descriptor]
}

public struct RapidConfig {
public var spaceId: String?
}

public var client: Client
public var device: Device
public var sdk: SDK
public var extra: JSON
public var rapidConfig: RapidConfig

public static var current: Context {
let mainInfo = Bundle.main.infoDictionary!
Expand Down Expand Up @@ -56,7 +61,8 @@ extension VVPSDK {
version: VVPSDK.backendVersion,
renderers: Renderer.Repository.shared.availableRenderers
),
extra: [:])
extra: [:],
rapidConfig: RapidConfig(spaceId: nil))
}

var json: JSON {
Expand Down Expand Up @@ -95,6 +101,10 @@ extension VVPSDK {
context["extra"] = extra
}

if let spaceId = rapidConfig.spaceId {
context["rapidConfig"] = [ "spaceId" : spaceId ]
}

return ["context": context]
}
}
Expand Down
16 changes: 16 additions & 0 deletions sources/metrics/tracking pixels/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Tracking Pixels Code Generation

1. Modify `TrackingPixelsGenerator.swift.erb` with path to YAML file with tracking pixels.
```
path = "your-path-to-tracking-pixels.yaml"
```

This file is located in [here](https://git.ouroath.com/O2/verizon-video-partner-sdk-evolution/blob/master/definitions/tracking%20pixels/tracking-pixels.yaml).

2. Run following command in terminal:

```
erb TrackingPixelsGenerator.swift.erb > TrackingPixelsGenerator.swift
```

3. Done - `TrackingPixelsGenerator.swift` is updated!
Loading