Skip to content

Commit

Permalink
Merge branch 'release/9.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos committed Sep 12, 2023
2 parents c92014c + 28b7243 commit 5b42f33
Show file tree
Hide file tree
Showing 48 changed files with 781 additions and 669 deletions.
2 changes: 1 addition & 1 deletion Demo/Demo.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Version information
MARKETING_VERSION = 8.2.0
MARKETING_VERSION = 9.0.0

// Deployment targets
IPHONEOS_DEPLOYMENT_TARGET = 12.0
Expand Down
2 changes: 2 additions & 0 deletions Demo/SRGAnalytics-demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 6FD65C75233235A10016CCFE /* Demo.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "$(APP_ICONS_SOURCE)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_MODULES = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
Expand All @@ -459,6 +460,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 6FD65C75233235A10016CCFE /* Demo.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "$(APP_ICONS_SOURCE)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_MODULES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
"version": "1.3.2-srg6"
}
},
{
"package": "TagCommander SDK V5",
"repositoryURL": "https://github.com/CommandersAct/iOSV5.git",
"state": {
"branch": null,
"revision": "2e56e97db76d55657d0dc7d13e2fcd81ce4eaa6c",
"version": "5.3.3"
}
},
{
"package": "libextobjc",
"repositoryURL": "https://github.com/SRGSSR/libextobjc.git",
Expand Down Expand Up @@ -118,24 +127,6 @@
"version": "3.1.0"
}
},
{
"package": "TCCore",
"repositoryURL": "https://github.com/SRGSSR/TCCore-xcframework-apple.git",
"state": {
"branch": null,
"revision": "eb686883e63af28174472a09eda97acf07179c88",
"version": "4.5.4-srg5"
}
},
{
"package": "TCSDK",
"repositoryURL": "https://github.com/SRGSSR/TCSDK-xcframework-apple.git",
"state": {
"branch": null,
"revision": "c4becb0b250258b78cb46225af5e269da834db5a",
"version": "4.4.1-srg5"
}
},
{
"package": "UICKeyChainStore",
"repositoryURL": "https://github.com/kishikawakatsumi/UICKeyChainStore.git",
Expand Down
6 changes: 3 additions & 3 deletions Demo/Sources/Application/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[TCDebug setDebugLevel:TCLogLevel_Verbose];
[TCDebug setNotificationLog:YES];

SRGAnalyticsConfiguration *configuration = [[SRGAnalyticsConfiguration alloc] initWithBusinessUnitIdentifier:SRGAnalyticsBusinessUnitIdentifierRTS
container:10
siteName:@"rts-app-test-v"];
SRGAnalyticsConfiguration *configuration = [[SRGAnalyticsConfiguration alloc] initWithBusinessUnitIdentifier:SRGAnalyticsBusinessUnitIdentifierSRG
sourceKey:@"39ae8f94-595c-4ca4-81f7-fb7748bd3f04"
siteName:@"srg-app-analytics-apple"];
[SRGAnalyticsTracker.sharedTracker startWithConfiguration:configuration
dataSource:self
identityService:SRGIdentityService.currentIdentityService];
Expand Down
9 changes: 8 additions & 1 deletion Demo/Sources/Demos/DemosViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath

SRGMediaPlayerViewController *playerViewController = [[SRGMediaPlayerViewController alloc] init];
playerViewController.modalPresentationStyle = UIModalPresentationFullScreen;
playerViewController.allowsPictureInPicturePlayback = NO;
if (@available(tvOS 14.0, *)) {
playerViewController.allowsPictureInPicturePlayback = NO;
}
[playerViewController.controller playURL:URL atPosition:nil withSegments:nil analyticsLabels:labels userInfo:nil];
[self presentViewController:playerViewController animated:YES completion:nil];
break;
Expand Down Expand Up @@ -265,6 +267,11 @@ - (NSString *)srg_pageViewTitle
return @"demos";
}

- (NSString *)srg_pageViewType
{
return @"landing_page";
}

#pragma mark UI

- (void)reloadData
Expand Down
5 changes: 5 additions & 0 deletions Demo/Sources/Simple/SimpleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ - (NSString *)srg_pageViewTitle
return self.title;
}

- (NSString *)srg_pageViewType
{
return @"detail_page";
}

- (NSArray *)srg_pageViewLevels
{
return self.levels;
Expand Down
2 changes: 1 addition & 1 deletion Demo/Sources/SwiftUI/SwiftUIView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct SwiftUIView: View {
Button(action: { /* Nothing. Just to have something focusable on tvOS */}) {
Text("SwiftUI demo")
}
.tracked(withTitle: "swift-ui")
.tracked(withTitle: "swift-ui", type: "detail_page")
}
}

Expand Down
5 changes: 5 additions & 0 deletions Demo/Sources/WebTester/WebTesterViewController~ios.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ - (NSString *)srg_pageViewTitle
return @"web-tester";
}

- (NSString *)srg_pageViewType
{
return @"detail_page";
}

#pragma mark UITextFieldDelegate protocol

- (BOOL)textFieldShouldReturn:(UITextField *)textField
Expand Down
27 changes: 9 additions & 18 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
"version": "1.3.2-srg6"
}
},
{
"package": "TagCommander SDK V5",
"repositoryURL": "https://github.com/CommandersAct/iOSV5.git",
"state": {
"branch": null,
"revision": "2e56e97db76d55657d0dc7d13e2fcd81ce4eaa6c",
"version": "5.3.3"
}
},
{
"package": "libextobjc",
"repositoryURL": "https://github.com/SRGSSR/libextobjc.git",
Expand Down Expand Up @@ -118,24 +127,6 @@
"version": "3.1.0"
}
},
{
"package": "TCCore",
"repositoryURL": "https://github.com/SRGSSR/TCCore-xcframework-apple.git",
"state": {
"branch": null,
"revision": "eb686883e63af28174472a09eda97acf07179c88",
"version": "4.5.4-srg5"
}
},
{
"package": "TCSDK",
"repositoryURL": "https://github.com/SRGSSR/TCSDK-xcframework-apple.git",
"state": {
"branch": null,
"revision": "c4becb0b250258b78cb46225af5e269da834db5a",
"version": "4.4.1-srg5"
}
},
{
"package": "UICKeyChainStore",
"repositoryURL": "https://github.com/kishikawakatsumi/UICKeyChainStore.git",
Expand Down
12 changes: 8 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import PackageDescription

struct ProjectSettings {
static let marketingVersion: String = "8.2.0"
static let marketingVersion: String = "9.0.0"
}

let package = Package(
Expand Down Expand Up @@ -42,13 +42,17 @@ let package = Package(
.package(name: "SRGIdentity", url: "https://github.com/SRGSSR/srgidentity-apple.git", .upToNextMinor(from: "3.3.0")),
.package(name: "SRGLogger", url: "https://github.com/SRGSSR/srglogger-apple.git", .upToNextMinor(from: "3.1.0")),
.package(name: "SRGMediaPlayer", url: "https://github.com/SRGSSR/srgmediaplayer-apple.git", .upToNextMinor(from: "7.2.0")),
.package(name: "TCCore", url: "https://github.com/SRGSSR/TCCore-xcframework-apple.git", .exact("4.5.4-srg5")),
.package(name: "TCSDK", url: "https://github.com/SRGSSR/TCSDK-xcframework-apple.git", .exact("4.4.1-srg5"))
.package(name: "TagCommander", url: "https://github.com/CommandersAct/iOSV5.git", .upToNextMinor(from: "5.3.1"))
],
targets: [
.target(
name: "SRGAnalytics",
dependencies: ["ComScore", "SRGLogger", "TCCore", "TCSDK"],
dependencies: [
"ComScore",
"SRGLogger",
.product(name: "TCCore", package: "TagCommander"),
.product(name: "TCServerSide_noIDFA", package: "TagCommander")
],
cSettings: [
.define("MARKETING_VERSION", to: "\"\(ProjectSettings.marketingVersion)\""),
.define("NS_BLOCK_ASSERTIONS", to: "1", .when(configuration: .release))
Expand Down
20 changes: 0 additions & 20 deletions Sources/SRGAnalytics/NSBundle+SRGAnalytics.h

This file was deleted.

29 changes: 0 additions & 29 deletions Sources/SRGAnalytics/NSBundle+SRGAnalytics.m

This file was deleted.

40 changes: 6 additions & 34 deletions Sources/SRGAnalytics/SRGAnalyticsConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,17 @@

#import "SRGAnalyticsConfiguration.h"

#import "NSBundle+SRGAnalytics.h"

SRGAnalyticsBusinessUnitIdentifier const SRGAnalyticsBusinessUnitIdentifierRSI = @"rsi";
SRGAnalyticsBusinessUnitIdentifier const SRGAnalyticsBusinessUnitIdentifierRTR = @"rtr";
SRGAnalyticsBusinessUnitIdentifier const SRGAnalyticsBusinessUnitIdentifierRTS = @"rts";
SRGAnalyticsBusinessUnitIdentifier const SRGAnalyticsBusinessUnitIdentifierSRF = @"srf";
SRGAnalyticsBusinessUnitIdentifier const SRGAnalyticsBusinessUnitIdentifierSRG = @"srg";
SRGAnalyticsBusinessUnitIdentifier const SRGAnalyticsBusinessUnitIdentifierSWI = @"swi";

SRGAnalyticsEnvironment const SRGAnalyticsEnvironmentPreProduction = @"preprod";
SRGAnalyticsEnvironment const SRGAnalyticsEnvironmentProduction = @"prod";

@interface SRGAnalyticsConfiguration ()

@property (nonatomic, copy) SRGAnalyticsBusinessUnitIdentifier businessUnitIdentifier;
@property (nonatomic) NSInteger container;
@property (nonatomic, copy) NSString *sourceKey;
@property (nonatomic, copy) NSString *siteName;

@end
Expand All @@ -31,15 +26,14 @@ @implementation SRGAnalyticsConfiguration
#pragma mark Object lifecycle

- (instancetype)initWithBusinessUnitIdentifier:(SRGAnalyticsBusinessUnitIdentifier)businessUnitIdentifier
container:(NSInteger)container
sourceKey:(NSString *)sourceKey
siteName:(NSString *)siteName
{
if (self = [super init] ) {
self.businessUnitIdentifier = businessUnitIdentifier;
self.container = container;
self.sourceKey = sourceKey;
self.siteName = siteName;
self.centralized = YES;
self.environmentMode = SRGAnalyticsEnvironmentModeAutomatic;
}
return self;
}
Expand All @@ -63,37 +57,15 @@ - (NSInteger)site
return s_sites[businessUnitIdentifier].integerValue;
}

- (SRGAnalyticsEnvironment)environment
{
switch (self.environmentMode) {
case SRGAnalyticsEnvironmentModePreProduction: {
return SRGAnalyticsEnvironmentPreProduction;
break;
}

case SRGAnalyticsEnvironmentModeProduction: {
return SRGAnalyticsEnvironmentProduction;
break;
}

case SRGAnalyticsEnvironmentModeAutomatic:
default: {
return NSBundle.srg_isProductionVersion ? SRGAnalyticsEnvironmentProduction : SRGAnalyticsEnvironmentPreProduction;
break;
}
}
}

#pragma mark NSCopying protocol

- (id)copyWithZone:(NSZone *)zone
{
SRGAnalyticsConfiguration *configuration = [self.class allocWithZone:zone];
configuration.businessUnitIdentifier = self.businessUnitIdentifier;
configuration.container = self.container;
configuration.sourceKey = self.sourceKey;
configuration.siteName = self.siteName;
configuration.centralized = self.centralized;
configuration.environmentMode = self.environmentMode;
configuration.unitTesting = self.unitTesting;
return configuration;
}
Expand All @@ -102,12 +74,12 @@ - (id)copyWithZone:(NSZone *)zone

- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p; businessUnitIdentifier = %@; site = %@; container = %@; siteName = %@",
return [NSString stringWithFormat:@"<%@: %p; businessUnitIdentifier = %@; site = %@; sourceKey = %@; siteName = %@",
self.class,
self,
self.businessUnitIdentifier,
@(self.site),
@(self.container),
self.sourceKey,
self.siteName];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
// License information is available from the LICENSE file.
//

#import "SRGAnalyticsHiddenEventLabels.h"
#import "SRGAnalyticsEventLabels.h"

#import "NSMutableDictionary+SRGAnalytics.h"
#import "SRGAnalyticsLabels+Private.h"

@implementation SRGAnalyticsHiddenEventLabels
@implementation SRGAnalyticsEventLabels

#pragma mark Getters and setters

Expand Down Expand Up @@ -47,7 +47,7 @@ @implementation SRGAnalyticsHiddenEventLabels

- (id)copyWithZone:(NSZone *)zone
{
SRGAnalyticsHiddenEventLabels *labels = [super copyWithZone:zone];
SRGAnalyticsEventLabels *labels = [super copyWithZone:zone];
labels.type = self.type;
labels.value = self.value;
labels.source = self.source;
Expand Down
2 changes: 1 addition & 1 deletion Sources/SRGAnalytics/SRGAnalyticsLabels+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface SRGAnalyticsLabels (Private)

/**
* Dictionary containing the raw values which will be sent to TagCommander.
* Dictionary containing the raw values which will be sent to Commanders Act.
*/
@property (nonatomic, readonly) NSDictionary<NSString *, NSString *> *labelsDictionary;

Expand Down
Loading

0 comments on commit 5b42f33

Please sign in to comment.