Skip to content

Commit

Permalink
Releases/v0.12.0 (#34)
Browse files Browse the repository at this point in the history
## Updates

* Track CSAI ad media failures (#33)

## Improvements

* Ima ads event data populated. (#30)
* fix: `adplay` and `adresponse` sent at incorrect time (#32)



Co-authored-by: Tomislav Kordic <32546640+tomkordic@users.noreply.github.com>
Co-authored-by: Emily Dixon <edixon@mux.com>
Co-authored-by: GitHub <noreply@github.com>
  • Loading branch information
3 people authored Apr 17, 2024
1 parent 2fbf09f commit 688f923
Show file tree
Hide file tree
Showing 75 changed files with 1,758 additions and 322 deletions.
34 changes: 28 additions & 6 deletions Example/DemoAppTests/MuxImaListener_Test.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,24 @@ @interface MuxMockImaAdEvent : IMAAdEvent {
enum IMAAdEventType type;
}
@property (nonatomic) enum IMAAdEventType type;
@property(nonatomic, copy, nullable) NSDictionary<NSString *, id> *adData;
@end

@implementation MuxMockImaAdEvent

@synthesize type;
@synthesize adData;

- (id)initWithType:(NSInteger)_type {
type = _type;
return self;
}

- (id)initWithType:(NSInteger)_type andAdData:(NSDictionary*)_adData {
type = _type;
adData = _adData;
return self;
}
@end

SpecBegin(InitialSpecs)
Expand Down Expand Up @@ -77,12 +85,6 @@ - (id)initWithType:(NSInteger)_type {
imaListener = [[MuxImaListener alloc] initWithPlayerBinding:playerBinding];
});

it(@"should dispatch the correct event for kIMAAdEvent_LOADED", ^{
MuxMockImaAdEvent *adEvent = [[MuxMockImaAdEvent alloc] initWithType:kIMAAdEvent_LOADED];
MUXSDKPlaybackEvent *playbackEvent = [imaListener dispatchEvent:adEvent];
expect(playbackEvent).to.beKindOf([MUXSDKAdPlayEvent class]);
});

it(@"should dispatch the correct event for kIMAAdEvent_STARTED", ^{
MuxMockImaAdEvent *adEvent = [[MuxMockImaAdEvent alloc] initWithType:kIMAAdEvent_STARTED];
MUXSDKPlaybackEvent *playbackEvent = [imaListener dispatchEvent:adEvent];
Expand Down Expand Up @@ -124,6 +126,26 @@ - (id)initWithType:(NSInteger)_type {
MUXSDKPlaybackEvent *playbackEvent = [imaListener dispatchEvent:adEvent];
expect(playbackEvent).to.beKindOf([MUXSDKAdPauseEvent class]);
});

it(@"should not dispatch aderror for LOG event *without* error info", ^{
MuxMockImaAdEvent *adEvent = [[MuxMockImaAdEvent alloc] initWithType:kIMAAdEvent_LOG];
MUXSDKPlaybackEvent *playbackEvent = [imaListener dispatchEvent:adEvent];
expect(playbackEvent).to.beNil();
});

it(@"should dispatch aderror for LOG event with error info", ^{
NSMutableDictionary *mockErrorData = [[NSMutableDictionary alloc] init];
[mockErrorData setObject:[NSNumber numberWithInt:110] forKey:@"errorCode"];
[mockErrorData setObject:@"mock message" forKey:@"errorMessage"];
[mockErrorData setObject:@"adPlayError" forKey:@"type"];
NSMutableDictionary *mockLogData = [[NSMutableDictionary alloc] init];
[mockLogData setObject:mockErrorData forKey:@"logData"];

MuxMockImaAdEvent *adEvent = [[MuxMockImaAdEvent alloc] initWithType:kIMAAdEvent_LOG andAdData:mockLogData];

MUXSDKPlaybackEvent *playbackEvent = [imaListener dispatchEvent:adEvent];
expect(playbackEvent).to.beKindOf([MUXSDKAdErrorEvent class]);
});

it(@"should not dispatch an event for kIMAAdEvent_TAPPED", ^{
MuxMockImaAdEvent *adEvent = [[MuxMockImaAdEvent alloc] initWithType:kIMAAdEvent_TAPPED];
Expand Down
20 changes: 10 additions & 10 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PODS:
- Expecta (1.0.6)
- GoogleAds-IMA-iOS-SDK (3.19.2)
- GoogleAds-IMA-iOS-SDK (3.20.0)
- GoogleAds-IMA-tvOS-SDK (4.9.1)
- Mux-Stats-AVPlayer (3.3.1):
- Mux-Stats-Core (~> 4.5.2)
- Mux-Stats-Core (4.5.2)
- Mux-Stats-Google-IMA (0.11.0):
- Mux-Stats-AVPlayer (3.5.1):
- Mux-Stats-Core (= 4.6.0)
- Mux-Stats-Core (4.6.0)
- Mux-Stats-Google-IMA (0.12.0):
- GoogleAds-IMA-iOS-SDK (~> 3.16)
- GoogleAds-IMA-tvOS-SDK (~> 4.6)
- Mux-Stats-AVPlayer (~> 3.2)
Expand All @@ -31,13 +31,13 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
GoogleAds-IMA-iOS-SDK: 0e817c05ab26f1b9285c80f4a75e1350a916d50b
GoogleAds-IMA-iOS-SDK: f9a6bd69e34f6c3a2d6b2f7cd56814b78fc680f9
GoogleAds-IMA-tvOS-SDK: 85e799c35051454693492480ef7e4ae2e701a05f
Mux-Stats-AVPlayer: 033434ccaffc9698d5566ce3563ac1d02bcbd0de
Mux-Stats-Core: b747ca415f883e2b2d9475d8cc0ac3079167bf6b
Mux-Stats-Google-IMA: 91c02f85386b84aa926594a7bca149b9b124fdb0
Mux-Stats-AVPlayer: 1b1a877e5d8b57ca22e0717fa0a4eefef7529c40
Mux-Stats-Core: 53902e414f077b2239ea10d909a4cf072c0d4d5c
Mux-Stats-Google-IMA: 713958837a4dece8ea14d425db548449af2c4fe1
Specta: b79d84043684b35ffdc2680df578dc318ec2efc2

PODFILE CHECKSUM: f1623162f4611830718c2a3afabe15d9f3efda6c

COCOAPODS: 1.12.1
COCOAPODS: 1.13.0
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 688f923

Please sign in to comment.