Skip to content

Commit dec56f2

Browse files
authored
Merge pull request #17 from polydice/feature/comscore
Add ComScore SDK
2 parents c967174 + 425f712 commit dec56f2

File tree

7 files changed

+66
-2
lines changed

7 files changed

+66
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Update gems and migrate to GitHub Actions [#14](https://github.com/polydice/iCook-tvOS/pull/14)
1515
* Clean up tracking [#15](https://github.com/polydice/iCook-tvOS/pull/15)
1616
* Clean up Fastlane and CI [#16](https://github.com/polydice/iCook-tvOS/pull/16)
17+
* Add ComScore SDK [#17](https://github.com/polydice/iCook-tvOS/pull/17)
1718

1819
## v1.0.0
1920

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ bootstrap:
44
# pod install
55
bundle exec pod keys set BaseAPIURL "https://cdn.jsdelivr.net/gh/polydice/iCook-tvOS@gh-pages/demo/"
66
bundle exec pod keys set FacebookAppID "APP_ID"
7+
bundle exec pod keys set ComScorePublisherID "1000001"
78
bundle exec pod install
89
# mock Google Services plist
910
cp -n mock-GoogleService-Info.plist iCookTV/GoogleService-Info.plist

Podfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ target :iCookTV do
1414
pod "Hue", "5.0.0"
1515
pod "Kingfisher", "5.7.0"
1616
pod "FBSDKTVOSKit"
17+
pod "ComScore"
1718

1819
target :iCookTVTests do
1920
pod "SwiftLint", '0.34.0'
@@ -23,6 +24,6 @@ end
2324

2425
plugin "cocoapods-keys", {
2526
project: "iCookTV",
26-
keys: ["BaseAPIURL", "FacebookAppID"]
27+
keys: ["BaseAPIURL", "FacebookAppID", "ComScorePublisherID"]
2728
}
2829

Podfile.lock

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
PODS:
22
- Alamofire (4.8.2)
3+
- ComScore (6.3.1):
4+
- ComScore/Dynamic (= 6.3.1)
5+
- ComScore/Dynamic (6.3.1)
36
- FBSDKCoreKit (6.3.0):
47
- FBSDKCoreKit/Basics (= 6.3.0)
58
- FBSDKCoreKit/Core (= 6.3.0)
@@ -71,6 +74,7 @@ PODS:
7174

7275
DEPENDENCIES:
7376
- Alamofire (= 4.8.2)
77+
- ComScore
7478
- FBSDKTVOSKit
7579
- Firebase/Crashlytics
7680
- HCYoutubeParser
@@ -82,6 +86,7 @@ DEPENDENCIES:
8286
SPEC REPOS:
8387
trunk:
8488
- Alamofire
89+
- ComScore
8590
- FBSDKCoreKit
8691
- FBSDKLoginKit
8792
- FBSDKShareKit
@@ -109,6 +114,7 @@ EXTERNAL SOURCES:
109114

110115
SPEC CHECKSUMS:
111116
Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
117+
ComScore: 2d6206a44c233c08b1f1891e8f138e8f80c07503
112118
FBSDKCoreKit: 5d55c8f3007c9c49b793617b9102e46355fc7e17
113119
FBSDKLoginKit: d46aa04d9bb9990a4deb6441736fae24a8c94496
114120
FBSDKShareKit: cbd309f29d00e596bc28319724a7519940e804fa
@@ -131,6 +137,6 @@ SPEC CHECKSUMS:
131137
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
132138
SwiftLint: 79d48a17c6565dc286c37efb8322c7b450f95c67
133139

134-
PODFILE CHECKSUM: 9b9fc03aabefe478dda51a4e62057819ca211503
140+
PODFILE CHECKSUM: e3ad5972da41a88854e69330a4902ec177fe813e
135141

136142
COCOAPODS: 1.9.1

iCookTV.xcodeproj/project.pbxproj

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@
379379
B5F7BF461BA9C95F00A75099 /* Resources */,
380380
B51A95351CCDFFEB00E5ED97 /* Run Crashlytics Script */,
381381
AA754957F6C9D01CFBA353B7 /* [CP] Embed Pods Frameworks */,
382+
17C2904A7606B8FA298124FF /* [CP] Copy Pods Resources */,
382383
);
383384
buildRules = (
384385
);
@@ -398,6 +399,7 @@
398399
B5F7BF561BA9C95F00A75099 /* Frameworks */,
399400
B5F7BF571BA9C95F00A75099 /* Resources */,
400401
D98BF45783F7971E01068E78 /* [CP] Embed Pods Frameworks */,
402+
54944FE815FCB22C2F7808BC /* [CP] Copy Pods Resources */,
401403
);
402404
buildRules = (
403405
);
@@ -474,6 +476,24 @@
474476
/* End PBXResourcesBuildPhase section */
475477

476478
/* Begin PBXShellScriptBuildPhase section */
479+
17C2904A7606B8FA298124FF /* [CP] Copy Pods Resources */ = {
480+
isa = PBXShellScriptBuildPhase;
481+
buildActionMask = 2147483647;
482+
files = (
483+
);
484+
inputPaths = (
485+
"${PODS_ROOT}/Target Support Files/Pods-iCookTV/Pods-iCookTV-resources.sh",
486+
"${PODS_CONFIGURATION_BUILD_DIR}/ComScore/SCORBundle.bundle",
487+
);
488+
name = "[CP] Copy Pods Resources";
489+
outputPaths = (
490+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SCORBundle.bundle",
491+
);
492+
runOnlyForDeploymentPostprocessing = 0;
493+
shellPath = /bin/sh;
494+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iCookTV/Pods-iCookTV-resources.sh\"\n";
495+
showEnvVarsInLog = 0;
496+
};
477497
24D096314DA4D14E4EDFA5EB /* [CP] Check Pods Manifest.lock */ = {
478498
isa = PBXShellScriptBuildPhase;
479499
buildActionMask = 2147483647;
@@ -492,6 +512,24 @@
492512
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
493513
showEnvVarsInLog = 0;
494514
};
515+
54944FE815FCB22C2F7808BC /* [CP] Copy Pods Resources */ = {
516+
isa = PBXShellScriptBuildPhase;
517+
buildActionMask = 2147483647;
518+
files = (
519+
);
520+
inputPaths = (
521+
"${PODS_ROOT}/Target Support Files/Pods-iCookTV-iCookTVTests/Pods-iCookTV-iCookTVTests-resources.sh",
522+
"${PODS_CONFIGURATION_BUILD_DIR}/ComScore/SCORBundle.bundle",
523+
);
524+
name = "[CP] Copy Pods Resources";
525+
outputPaths = (
526+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SCORBundle.bundle",
527+
);
528+
runOnlyForDeploymentPostprocessing = 0;
529+
shellPath = /bin/sh;
530+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iCookTV-iCookTVTests/Pods-iCookTV-iCookTVTests-resources.sh\"\n";
531+
showEnvVarsInLog = 0;
532+
};
495533
9C2EB9E93A1775F7EBF52165 /* [CP] Check Pods Manifest.lock */ = {
496534
isa = PBXShellScriptBuildPhase;
497535
buildActionMask = 2147483647;
@@ -519,6 +557,7 @@
519557
"${PODS_ROOT}/Target Support Files/Pods-iCookTV/Pods-iCookTV-frameworks.sh",
520558
"${BUILT_PRODUCTS_DIR}/Keys/Keys.framework",
521559
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
560+
"${PODS_ROOT}/ComScore/ComScore/dynamic/tvOS/ComScore.framework",
522561
"${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework",
523562
"${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework",
524563
"${BUILT_PRODUCTS_DIR}/FBSDKShareKit/FBSDKShareKit.framework",
@@ -534,6 +573,7 @@
534573
outputPaths = (
535574
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Keys.framework",
536575
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
576+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ComScore.framework",
537577
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework",
538578
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework",
539579
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKShareKit.framework",
@@ -587,6 +627,7 @@
587627
"${PODS_ROOT}/Target Support Files/Pods-iCookTV-iCookTVTests/Pods-iCookTV-iCookTVTests-frameworks.sh",
588628
"${BUILT_PRODUCTS_DIR}/Keys/Keys.framework",
589629
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
630+
"${PODS_ROOT}/ComScore/ComScore/dynamic/tvOS/ComScore.framework",
590631
"${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework",
591632
"${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework",
592633
"${BUILT_PRODUCTS_DIR}/FBSDKShareKit/FBSDKShareKit.framework",
@@ -602,6 +643,7 @@
602643
outputPaths = (
603644
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Keys.framework",
604645
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
646+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ComScore.framework",
605647
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework",
606648
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework",
607649
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKShareKit.framework",

iCookTV/Helpers/Tracker.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
// SOFTWARE.
2525
//
2626

27+
import ComScore
2728
import FBSDKTVOSKit
2829
import Firebase
2930
import Foundation
@@ -35,6 +36,11 @@ enum Tracker {
3536
Settings.appID = iCookTVKeys.FacebookAppID
3637
ApplicationDelegate.initializeSDK(nil)
3738
FirebaseApp.configure()
39+
let comScoreConfiguration = SCORPublisherConfiguration { (configurationBuilder) in
40+
configurationBuilder?.publisherId = iCookTVKeys.ComScorePublisherID
41+
}
42+
SCORAnalytics.configuration().addClient(with: comScoreConfiguration)
43+
SCORAnalytics.start()
3844
#endif
3945
}
4046

iCookTV/iCookTVKeys.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,11 @@ struct iCookTVKeys {
3434
ICookTVKeys().baseAPIURL
3535
}()
3636

37+
static let FacebookAppID: String = {
38+
ICookTVKeys().facebookAppID
39+
}()
40+
41+
static let ComScorePublisherID: String = {
42+
ICookTVKeys().comScorePublisherID
43+
}()
3744
}

0 commit comments

Comments
 (0)