Skip to content

Commit

Permalink
Merge branch 'release/3.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos committed Oct 26, 2018
2 parents 2cff065 + a094a98 commit befb631
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "SRGSSR/srgdataprovider-ios" "6.3"
github "SRGSSR/srgdataprovider-ios" "6.3.1"
github "SRGSSR/SRGMediaPlayer-iOS" "2.5.2"
github "SRGSSR/tagcommander-ios" "4.1.5_4.1.3"
github "comScore/ComScore-iOS-SDK" "92f34897cd7659d56bb5a3e9e85b808cf3758bda"
2 changes: 1 addition & 1 deletion Cartfile.resolved.proprietary
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ github "SRGSSR/MAKVONotificationCenter" "1.0_srg2"
github "SRGSSR/SRGMediaPlayer-iOS" "2.5.2"
github "SRGSSR/libextobjc" "0.6_srg1"
github "SRGSSR/srgcontentprotection-ios" "1.1"
github "SRGSSR/srgdataprovider-ios" "6.3"
github "SRGSSR/srgdataprovider-ios" "6.3.1"
github "SRGSSR/srgdiagnostics-ios" "1.0"
github "SRGSSR/srglogger-ios" "1.0.7"
github "SRGSSR/srgnetwork-ios" "0.2.1"
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved.public
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ github "SRGSSR/MAKVONotificationCenter" "1.0_srg2"
github "SRGSSR/SRGMediaPlayer-iOS" "2.5.2"
github "SRGSSR/libextobjc" "0.6_srg1"
github "SRGSSR/srgcontentprotection-fake-ios" "1.1"
github "SRGSSR/srgdataprovider-ios" "6.3"
github "SRGSSR/srgdataprovider-ios" "6.3.1"
github "SRGSSR/srgdiagnostics-ios" "1.0"
github "SRGSSR/srglogger-ios" "1.0.7"
github "SRGSSR/srgnetwork-ios" "0.2.1"
Expand Down
22 changes: 15 additions & 7 deletions Framework/Sources/Core/SRGAnalyticsHiddenEventLabels.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,33 @@
NS_ASSUME_NONNULL_BEGIN

/**
* Additional hidden event labels.
* Additional hidden event labels. Data associated with a hidden event is generic (type, values and source) and
* therefore flexible. Your measurement team should provide you precise guidelines about which information must
* be sent in hidden events, and in which fields.
*/
@interface SRGAnalyticsHiddenEventLabels : SRGAnalyticsLabels

/**
* The event type (this concept is loosely defined, please discuss expected values for your application with your
* measurement team).
* The event type.
*/
@property (nonatomic, copy, nullable) NSString *type;

/**
* The event value (this concept is loosely defined, please discuss expected values for your application with your
* measurement team).
* The main value associated with the event.
*/
@property (nonatomic, copy, nullable) NSString *value;

/**
* The event source (this concept is loosely defined, please discuss expected values for your application with your
* measurement team).
* Additional values associated with the event.
*/
@property (nonatomic, copy, nullable) NSString *extraValue1;
@property (nonatomic, copy, nullable) NSString *extraValue2;
@property (nonatomic, copy, nullable) NSString *extraValue3;
@property (nonatomic, copy, nullable) NSString *extraValue4;
@property (nonatomic, copy, nullable) NSString *extraValue5;

/**
* The event source.
*/
@property (nonatomic, copy, nullable) NSString *source;

Expand Down
13 changes: 13 additions & 0 deletions Framework/Sources/Core/SRGAnalyticsHiddenEventLabels.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ @implementation SRGAnalyticsHiddenEventLabels
[dictionary srg_safelySetString:self.value forKey:@"event_value"];
[dictionary srg_safelySetString:self.source forKey:@"event_source"];

[dictionary srg_safelySetString:self.extraValue1 forKey:@"event_value_1"];
[dictionary srg_safelySetString:self.extraValue2 forKey:@"event_value_2"];
[dictionary srg_safelySetString:self.extraValue3 forKey:@"event_value_3"];
[dictionary srg_safelySetString:self.extraValue4 forKey:@"event_value_4"];
[dictionary srg_safelySetString:self.extraValue5 forKey:@"event_value_5"];

[dictionary addEntriesFromDictionary:[super labelsDictionary]];
return [dictionary copy];
}
Expand All @@ -44,6 +50,13 @@ - (id)copyWithZone:(NSZone *)zone
labels.type = self.type;
labels.value = self.value;
labels.source = self.source;

labels.extraValue1 = self.extraValue1;
labels.extraValue2 = self.extraValue2;
labels.extraValue3 = self.extraValue3;
labels.extraValue4 = self.extraValue4;
labels.extraValue5 = self.extraValue5;

return labels;
}

Expand Down
8 changes: 4 additions & 4 deletions SRGAnalytics.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.5;
MARKETING_VERSION = 3.5.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -1479,7 +1479,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.5;
MARKETING_VERSION = 3.5.1;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -1815,7 +1815,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.5;
MARKETING_VERSION = 3.5.1;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -1865,7 +1865,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MARKETING_VERSION = 3.5;
MARKETING_VERSION = 3.5.1;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand Down
2 changes: 1 addition & 1 deletion Tests/Sources/ComScoreDataProviderTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

static NSURL *ServiceTestURL(void)
{
return [NSURL URLWithString:@"http://il.srgssr.ch"];
return SRGIntegrationLayerProductionServiceURL();
}

@interface ComScoreDataProviderTestCase : AnalyticsTestCase
Expand Down
4 changes: 2 additions & 2 deletions Tests/Sources/DataProviderTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

static NSURL *ServiceTestURL(void)
{
return [NSURL URLWithString:@"http://il.srgssr.ch"];
return SRGIntegrationLayerProductionServiceURL();
}

static NSURL *MMFTestURL(void)
{
return [NSURL URLWithString:@"http://play-mmf.herokuapp.com"];
return [NSURL URLWithString:@"https://play-mmf.herokuapp.com/integrationlayer"];
}

@interface DataProviderTestCase : AnalyticsTestCase
Expand Down
35 changes: 34 additions & 1 deletion Tests/Sources/HiddenEventLabelsTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,21 @@ - (void)testNonEmpty
labels.type = @"type";
labels.value = @"value";
labels.source = @"source";
labels.extraValue1 = @"extra_value1";
labels.extraValue2 = @"extra_value2";
labels.extraValue3 = @"extra_value3";
labels.extraValue4 = @"extra_value4";
labels.extraValue5 = @"extra_value5";
labels.customInfo = @{ @"key" : @"value" };

NSDictionary *labelsDictionary = @{ @"event_type" : @"type",
@"event_value" : @"value",
@"event_source" : @"source",
@"event_value_1" : @"extra_value1",
@"event_value_2" : @"extra_value2",
@"event_value_3" : @"extra_value3",
@"event_value_4" : @"extra_value4",
@"event_value_5" : @"extra_value5",
@"key" : @"value" };
XCTAssertEqualObjects(labels.labelsDictionary, labelsDictionary);
}
Expand All @@ -40,43 +50,64 @@ - (void)testEquality
labels1.type = @"type";
labels1.value = @"value";
labels1.source = @"source";
labels1.extraValue1 = @"extra_value1";
labels1.extraValue2 = @"extra_value2";
labels1.customInfo = @{ @"key" : @"value" };
XCTAssertEqualObjects(labels1, labels1);

SRGAnalyticsHiddenEventLabels *labels2 = [[SRGAnalyticsHiddenEventLabels alloc] init];
labels2.type = @"type";
labels2.value = @"value";
labels2.source = @"source";
labels2.extraValue1 = @"extra_value1";
labels2.extraValue2 = @"extra_value2";
labels2.customInfo = @{ @"key" : @"value" };
XCTAssertEqualObjects(labels1, labels2);

SRGAnalyticsHiddenEventLabels *labels3 = [[SRGAnalyticsHiddenEventLabels alloc] init];
labels3.type = @"other_type";
labels3.value = @"value";
labels3.source = @"source";
labels3.extraValue1 = @"extra_value1";
labels3.extraValue2 = @"extra_value2";
labels3.customInfo = @{ @"key" : @"value" };
XCTAssertNotEqualObjects(labels1, labels3);

SRGAnalyticsHiddenEventLabels *labels4 = [[SRGAnalyticsHiddenEventLabels alloc] init];
labels4.type = @"type";
labels4.value = @"other_value";
labels4.source = @"source";
labels4.extraValue1 = @"extra_value1";
labels4.extraValue2 = @"extra_value2";
labels4.customInfo = @{ @"key" : @"value" };
XCTAssertNotEqualObjects(labels1, labels4);

SRGAnalyticsHiddenEventLabels *labels5 = [[SRGAnalyticsHiddenEventLabels alloc] init];
labels5.type = @"type";
labels5.value = @"value";
labels5.source = @"other_source";
labels5.extraValue1 = @"extra_value1";
labels5.extraValue2 = @"extra_value2";
labels5.customInfo = @{ @"key" : @"value" };
XCTAssertNotEqualObjects(labels1, labels5);

SRGAnalyticsHiddenEventLabels *labels6 = [[SRGAnalyticsHiddenEventLabels alloc] init];
labels6.type = @"type";
labels6.value = @"value";
labels6.extraValue1 = @"other_extra_value1";
labels6.extraValue2 = @"extra_value2";
labels6.source = @"source";
labels6.customInfo = @{ @"other_key" : @"other_value" };
labels6.customInfo = @{ @"key" : @"value" };
XCTAssertNotEqualObjects(labels1, labels6);

SRGAnalyticsHiddenEventLabels *labels7 = [[SRGAnalyticsHiddenEventLabels alloc] init];
labels7.type = @"type";
labels7.value = @"value";
labels7.source = @"source";
labels7.extraValue1 = @"extra_value1";
labels7.extraValue2 = @"extra_value2";
labels7.customInfo = @{ @"other_key" : @"other_value" };
XCTAssertNotEqualObjects(labels1, labels7);
}

- (void)testCopy
Expand All @@ -85,6 +116,8 @@ - (void)testCopy
labels.type = @"type";
labels.value = @"value";
labels.source = @"source";
labels.extraValue1 = @"extra_value1";
labels.extraValue2 = @"extra_value2";
labels.customInfo = @{ @"key" : @"value" };

SRGAnalyticsHiddenEventLabels *labelsCopy = [labels copy];
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ The number of URL schemes an application declares is limited to 50. Please conta

### Working with the library

To learn about how the library can be used, have a look at the [getting started guide](Getting-started.md).
To learn about how the library can be used, have a look at the [getting started guide](GETTING_STARTED.md).

### Logging

Expand All @@ -192,7 +192,7 @@ To test what the library is capable of, run the associated demo.

## Migration from previous major versions

For information about migration from older major library versions, please read the [migration guide](Migration-guide.md).
For information about migration from older major library versions, please read the [migration guide](MIGRATION_GUIDE.md).

## License

Expand Down

0 comments on commit befb631

Please sign in to comment.