Skip to content

Commit

Permalink
Releases/v3.4.1 (#212)
Browse files Browse the repository at this point in the history
## Improvements

* Add state check when dispatching viewend (#187)
* build: update version metadata



Co-authored-by: AJ Lauer Barinov <[email protected]>
  • Loading branch information
daytime-em and andrewjl-mux authored Oct 19, 2023
1 parent bbaae00 commit 870335d
Show file tree
Hide file tree
Showing 23 changed files with 150 additions and 86 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
uses: actions/checkout@v3
- name: "Baseline Unit Test Pass"
run: ./scripts/run-baseline-unit-test-pass.sh
- name: "Switch to Xcode 14.3.1"
run: sudo xcode-select -switch /Applications/Xcode_14.3.1.app
- name: "🔨 Build Dynamic XCFramework"
run: ".github/workflows/scripts/build.sh"
- name: "Upload xcframework artifact"
Expand Down Expand Up @@ -46,6 +48,8 @@ jobs:
run: brew install xcbeautify
- name: Checkout
uses: actions/checkout@v3
- name: "Switch to Xcode 14.3.1"
run: sudo xcode-select -switch /Applications/Xcode_14.3.1.app
- name: "🔨 Build Static XCFramework"
run: ".github/workflows/scripts/build-static.sh"
- name: "Upload xcframework artifact"
Expand Down
3 changes: 2 additions & 1 deletion MUXSDKStats.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"3.3.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.3.1/MUXSDKStats.xcframework.zip",
"3.3.2": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.3.2/MUXSDKStats.xcframework.zip",
"3.3.3": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.3.3/MUXSDKStats.xcframework.zip",
"3.4.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.4.0/MUXSDKStats.xcframework.zip"
"3.4.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.4.0/MUXSDKStats.xcframework.zip",
"3.4.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.4.1/MUXSDKStats.xcframework.zip"
}
48 changes: 31 additions & 17 deletions MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@
02EB9E3023E896F20007E1CD /* MUXSDKCustomerVideoDataStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 02EB9E2C23E896790007E1CD /* MUXSDKCustomerVideoDataStore.m */; };
1917D7BC2AB97FBC009654E8 /* MUXSDKStatsTvTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1917D7BB2AB97FBC009654E8 /* MUXSDKStatsTvTests.m */; };
1917D7C32AB97FC5009654E8 /* MUXSDKStats.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F41E09041DDA8E530028A296 /* MUXSDKStats.framework */; };
19CB357A2ABBD411002DF48C /* MuxCore in Frameworks */ = {isa = PBXBuildFile; productRef = 19CB35792ABBD411002DF48C /* MuxCore */; };
19CB357C2ABBD41D002DF48C /* MuxCore in Frameworks */ = {isa = PBXBuildFile; productRef = 19CB357B2ABBD41D002DF48C /* MuxCore */; };
195762172AD8EB1500128565 /* MuxCore in Frameworks */ = {isa = PBXBuildFile; productRef = 195762162AD8EB1500128565 /* MuxCore */; };
195762192AD8EB2600128565 /* MuxCore in Frameworks */ = {isa = PBXBuildFile; productRef = 195762182AD8EB2600128565 /* MuxCore */; };
19E4EA2C2AB984580068E1EE /* MUXSDKCore+Mock.m in Sources */ = {isa = PBXBuildFile; fileRef = 02EA754B23EA074800B06715 /* MUXSDKCore+Mock.m */; };
19E4EA2D2AB9845F0068E1EE /* MUXSDKPlayerBindingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0243A98423E9FFC600FBF5B4 /* MUXSDKPlayerBindingTests.m */; };
19E4EA2E2AB984860068E1EE /* MUXSDKStatsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F4DCAD0B1DCA892E0094D94C /* MUXSDKStatsTests.m */; };
19EE40772ADD9841007F596A /* MuxCore in Frameworks */ = {isa = PBXBuildFile; productRef = 19EE40762ADD9841007F596A /* MuxCore */; };
19EE40792ADD9860007F596A /* MuxCore in Frameworks */ = {isa = PBXBuildFile; productRef = 19EE40782ADD9860007F596A /* MuxCore */; };
F41E09081DDA8E530028A296 /* MUXSDKStatsTv.h in Headers */ = {isa = PBXBuildFile; fileRef = F41E09061DDA8E530028A296 /* MUXSDKStatsTv.h */; settings = {ATTRIBUTES = (Public, ); }; };
F41E099D1DDA8FB50028A296 /* MUXSDKStats.h in Headers */ = {isa = PBXBuildFile; fileRef = F4DCAD001DCA892E0094D94C /* MUXSDKStats.h */; settings = {ATTRIBUTES = (Public, ); }; };
F41E09E41DDA90DB0028A296 /* MUXSDKPlayerBinding.h in Headers */ = {isa = PBXBuildFile; fileRef = F4572FC11DDA2FC8003FE72B /* MUXSDKPlayerBinding.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -120,15 +122,17 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
19CB357C2ABBD41D002DF48C /* MuxCore in Frameworks */,
19EE40792ADD9860007F596A /* MuxCore in Frameworks */,
195762192AD8EB2600128565 /* MuxCore in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F4DCACF91DCA892E0094D94C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
19CB357A2ABBD411002DF48C /* MuxCore in Frameworks */,
19EE40772ADD9841007F596A /* MuxCore in Frameworks */,
195762172AD8EB1500128565 /* MuxCore in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -301,7 +305,8 @@
);
name = MUXSDKStatsTv;
packageProductDependencies = (
19CB357B2ABBD41D002DF48C /* MuxCore */,
195762182AD8EB2600128565 /* MuxCore */,
19EE40782ADD9860007F596A /* MuxCore */,
);
productName = MUXSDKStatsTv;
productReference = F41E09041DDA8E530028A296 /* MUXSDKStats.framework */;
Expand All @@ -322,7 +327,8 @@
);
name = MUXSDKStats;
packageProductDependencies = (
19CB35792ABBD411002DF48C /* MuxCore */,
195762162AD8EB1500128565 /* MuxCore */,
19EE40762ADD9841007F596A /* MuxCore */,
);
productName = MUXSDKStats;
productReference = F4DCACFD1DCA892E0094D94C /* MUXSDKStats.framework */;
Expand Down Expand Up @@ -382,7 +388,7 @@
);
mainGroup = F4DCACF31DCA892E0094D94C;
packageReferences = (
19CB35782ABBD411002DF48C /* XCRemoteSwiftPackageReference "stats-sdk-objc" */,
19EE40752ADD9841007F596A /* XCRemoteSwiftPackageReference "stats-sdk-objc" */,
);
productRefGroup = F4DCACFE1DCA892E0094D94C /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -569,7 +575,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.0;
MARKETING_VERSION = 3.4.1;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
Expand Down Expand Up @@ -598,7 +604,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.0;
MARKETING_VERSION = 3.4.1;
MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv;
PRODUCT_NAME = MUXSDKStats;
Expand Down Expand Up @@ -780,7 +786,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.0;
MARKETING_VERSION = 3.4.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -808,7 +814,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 3.4.0;
MARKETING_VERSION = 3.4.1;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -900,25 +906,33 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
19CB35782ABBD411002DF48C /* XCRemoteSwiftPackageReference "stats-sdk-objc" */ = {
19EE40752ADD9841007F596A /* XCRemoteSwiftPackageReference "stats-sdk-objc" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/muxinc/stats-sdk-objc";
requirement = {
kind = exactVersion;
version = 4.5.2;
version = 4.6.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
19CB35792ABBD411002DF48C /* MuxCore */ = {
195762162AD8EB1500128565 /* MuxCore */ = {
isa = XCSwiftPackageProductDependency;
package = 19CB35782ABBD411002DF48C /* XCRemoteSwiftPackageReference "stats-sdk-objc" */;
productName = MuxCore;
};
19CB357B2ABBD41D002DF48C /* MuxCore */ = {
195762182AD8EB2600128565 /* MuxCore */ = {
isa = XCSwiftPackageProductDependency;
package = 19CB35782ABBD411002DF48C /* XCRemoteSwiftPackageReference "stats-sdk-objc" */;
productName = MuxCore;
};
19EE40762ADD9841007F596A /* MuxCore */ = {
isa = XCSwiftPackageProductDependency;
package = 19EE40752ADD9841007F596A /* XCRemoteSwiftPackageReference "stats-sdk-objc" */;
productName = MuxCore;
};
19EE40782ADD9860007F596A /* MuxCore */ = {
isa = XCSwiftPackageProductDependency;
package = 19EE40752ADD9841007F596A /* XCRemoteSwiftPackageReference "stats-sdk-objc" */;
productName = MuxCore;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
6 changes: 5 additions & 1 deletion MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// SDK constants.
NSString *const MUXSDKPluginName = @"apple-mux";
NSString *const MUXSDKPluginVersion = @"3.4.0";
NSString *const MUXSDKPluginVersion = @"3.4.1";
NSString *const MUXSessionDataPrefix = @"io.litix.data.";

// Min number of seconds between timeupdate events. (100ms)
Expand Down Expand Up @@ -904,6 +904,10 @@ - (void)dispatchViewEnd {
if (![self isPlayerOK]) {
return;
}
if (_state == MUXSDKPlayerStateViewEnd) {
NSLog(@"MUXSDK-WARNING - Attempting to dispatch a viewend more than once before a new view is initialized");
return;
}
[self checkVideoData];
MUXSDKPlayerData *playerData = [self getPlayerData];
MUXSDKViewEndEvent *event = [[MUXSDKViewEndEvent alloc] init];
Expand Down
35 changes: 31 additions & 4 deletions MUXSDKStats/MUXSDKStats/MUXSDKStats.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,18 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerViewController:(nonnull AVPlaye
MUXSDKCustomerViewData *viewData = customerData.customerViewData;
MUXSDKCustomData *customData = customerData.customData;

// If customerData sets a custom playerSoftwareName use that
// If customerData playerSoftwareName is nil, use a default value
NSString *playerSoftwareName = customerData.customerPlayerData.playerSoftwareName ?: MuxPlayerSoftwareAVPlayerViewController;
// MUXSDKStats sets a nil for playerSoftwareVersion by default
// If customerData playerSoftware version is set, pass that along
// If unset, it is nil and this keeps the existing behavior as the fallback
NSString *playerSoftwareVersion = customerData.customerPlayerData.playerSoftwareVersion;
MUXSDKAVPlayerViewControllerBinding *newBinding = [[MUXSDKAVPlayerViewControllerBinding alloc] initWithPlayerName:name
softwareName:MuxPlayerSoftwareAVPlayerViewController
softwareName:playerSoftwareName
softwareVersion:playerSoftwareVersion
playerViewController:player];

[newBinding setAutomaticErrorTracking:automaticErrorTracking];
newBinding.playDispatchDelegate = _playerBindingManager;

Expand Down Expand Up @@ -395,8 +404,18 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayerLayer:(nonnull AVPlayerLayer *)
MUXSDKCustomerVideoData *videoData = customerData.customerVideoData;
MUXSDKCustomerViewData *viewData = customerData.customerViewData;
MUXSDKCustomData *customData = customerData.customData;

MUXSDKAVPlayerLayerBinding *newBinding = [[MUXSDKAVPlayerLayerBinding alloc] initWithName:name software:MuxPlayerSoftwareAVPlayerLayer andView:player];

// If customerData sets a custom playerSoftwareName use that
// If customerData playerSoftwareName is nil, use a default value
NSString *playerSoftwareName = customerData.customerPlayerData.playerSoftwareName ?: MuxPlayerSoftwareAVPlayerLayer;
// MUXSDKStats sets a nil for playerSoftwareVersion by default
// If customerData playerSoftware version is set, pass that along
// If unset, it is nil and this keeps the existing behavior as the fallback
NSString *playerSoftwareVersion = customerData.customerPlayerData.playerSoftwareVersion;
MUXSDKAVPlayerLayerBinding *newBinding = [[MUXSDKAVPlayerLayerBinding alloc] initWithPlayerName:name
softwareName:playerSoftwareName
softwareVersion:playerSoftwareVersion
playerLayer:player];
newBinding.playDispatchDelegate = _playerBindingManager;
[newBinding setAutomaticErrorTracking:automaticErrorTracking];
if (collectionDomain != nil && collectionDomain.length > 0) {
Expand Down Expand Up @@ -575,8 +594,16 @@ + (MUXSDKPlayerBinding *_Nullable)monitorAVPlayer:(nonnull AVPlayer *)player
MUXSDKCustomerViewData *viewData = customerData.customerViewData;
MUXSDKCustomData *customData = customerData.customData;

// If customerData sets a custom playerSoftwareName use that
// If customerData playerSoftwareName is nil, use a default value
NSString *playerSoftwareName = customerData.customerPlayerData.playerSoftwareName ?: MuxPlayerSoftwareAVPlayer;
// MUXSDKStats sets nil for playerSoftwareVersion by default
// If customerData playerSoftwareVersion is set, pass that along
// If unset, it is nil and this keeps the existing behavior as the fallback
NSString *playerSoftwareVersion = customerData.customerPlayerData.playerSoftwareVersion;
MUXSDKAVPlayerBinding *newBinding = [[MUXSDKAVPlayerBinding alloc] initWithPlayerName:name
softwareName:MuxPlayerSoftwareAVPlayer
softwareName:playerSoftwareName
softwareVersion:playerSoftwareVersion
fixedPlayerSize:fixedPlayerSize];
[newBinding setAutomaticErrorTracking:automaticErrorTracking];
newBinding.playDispatchDelegate = _playerBindingManager;
Expand Down
Loading

0 comments on commit 870335d

Please sign in to comment.