diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index 69466d24..00000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,24 +0,0 @@ -steps: - - command: ".buildkite/unit-tests.sh" - label: "Unit Tests" - agents: - queue: "iOS" - - wait - - command: ".buildkite/build.sh" - label: ":hammer: Build" - artifact_paths: - - "MUXSDKStats.xcframework.zip" - agents: - queue: "iOS" - - wait - - command: "apps/DemoApp/run-tests.sh" - label: "Tests" - agents: - queue: "iOS" - - wait - - command: ".buildkite/build-static.sh" - label: ":hammer: Build Static" - artifact_paths: - - "MUXSDKStats-static.xcframework.zip" - agents: - queue: "iOS" diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 631708b4..2e38f373 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -6,7 +6,7 @@ on: jobs: build: name: Run unit tests and build the SDK - runs-on: macos-10.15 + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 @@ -17,9 +17,9 @@ jobs: echo "Creating symlink of the iOS 14.1 runtime..." sudo ln -s /Applications/Xcode_12.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 14.1.simruntime - name: "Unit Tests" - run: ".buildkite/unit-tests.sh" + run: ".github/workflows/scripts/unit-tests.sh" - name: "🔨 Build" - run: ".buildkite/build.sh" + run: ".github/workflows/scripts/build.sh" - name: "Upload framework artifact" uses: actions/upload-artifact@v2 with: @@ -28,7 +28,7 @@ jobs: tests: name: Test the SDK with a Demo App needs: build - runs-on: macos-10.15 + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 @@ -46,7 +46,7 @@ jobs: run: "apps/DemoApp/run-tests.sh" build-static: name: Build static SDK - runs-on: macos-10.15 + runs-on: macos-12 steps: - name: Checkout uses: actions/checkout@v2 @@ -57,7 +57,7 @@ jobs: echo "Creating symlink of the iOS 14.1 runtime..." sudo ln -s /Applications/Xcode_12.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS\ 14.1.simruntime - name: "🔨 Build Static" - run: ".buildkite/build-static.sh" + run: ".github/workflows/scripts/build-static.sh" - name: "Upload framework artifact" uses: actions/upload-artifact@v2 with: diff --git a/.buildkite/build-static.sh b/.github/workflows/scripts/build-static.sh similarity index 100% rename from .buildkite/build-static.sh rename to .github/workflows/scripts/build-static.sh diff --git a/.buildkite/build.sh b/.github/workflows/scripts/build.sh similarity index 100% rename from .buildkite/build.sh rename to .github/workflows/scripts/build.sh diff --git a/.buildkite/unit-tests.sh b/.github/workflows/scripts/unit-tests.sh similarity index 75% rename from .buildkite/unit-tests.sh rename to .github/workflows/scripts/unit-tests.sh index 82e358c0..95c0519b 100755 --- a/.buildkite/unit-tests.sh +++ b/.github/workflows/scripts/unit-tests.sh @@ -10,4 +10,4 @@ PROJECT=MUXSDKStats/MUXSDKStats.xcworkspace xcodebuild clean test \ -workspace $PROJECT \ -scheme MUXSDKStats \ - -destination 'platform=iOS Simulator,name=iPhone 11,OS=14.1' \ + -destination 'platform=iOS Simulator,OS=16.0,name=iPhone 14 Pro Max' diff --git a/MUXSDKStats.json b/MUXSDKStats.json index c0caa00d..1d034a8e 100644 --- a/MUXSDKStats.json +++ b/MUXSDKStats.json @@ -4,5 +4,6 @@ "2.12.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.12.1/MUXSDKStats.xcframework.zip", "2.13.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.13.0/MUXSDKStats.xcframework.zip", "2.13.1": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.13.1/MUXSDKStats.xcframework.zip", - "2.13.2": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.13.2/MUXSDKStats.xcframework.zip" + "2.13.2": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v2.13.2/MUXSDKStats.xcframework.zip", + "3.0.0": "https://github.com/muxinc/mux-stats-sdk-avplayer/releases/download/v3.0.0/MUXSDKStats.xcframework.zip" } diff --git a/MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj b/MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj index 92c2f0a6..7072674a 100644 --- a/MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj +++ b/MUXSDKStats/MUXSDKStats.xcodeproj/project.pbxproj @@ -79,6 +79,7 @@ 02EB9E2C23E896790007E1CD /* MUXSDKCustomerVideoDataStore.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MUXSDKCustomerVideoDataStore.m; sourceTree = ""; }; 0E83ED48E98E5C3BB2EFEA8E /* libPods-MUXSDKStatsTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MUXSDKStatsTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 19014A7CD740B7E3AC1FEACE /* Pods-MUXSDKStatsTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MUXSDKStatsTests.release.xcconfig"; path = "Target Support Files/Pods-MUXSDKStatsTests/Pods-MUXSDKStatsTests.release.xcconfig"; sourceTree = ""; }; + 350F766328FDCD8D008F520F /* MUXSDKStats+Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MUXSDKStats+Internal.h"; sourceTree = ""; }; 6F30D4F978B53C0CE033EBB7 /* Pods-MUXSDKStats.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MUXSDKStats.debug.xcconfig"; path = "Target Support Files/Pods-MUXSDKStats/Pods-MUXSDKStats.debug.xcconfig"; sourceTree = ""; }; 7A31A9BB4AB17C7F23036EBB /* Pods-MUXSDKStatsTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MUXSDKStatsTests.debug.xcconfig"; path = "Target Support Files/Pods-MUXSDKStatsTests/Pods-MUXSDKStatsTests.debug.xcconfig"; sourceTree = ""; }; 83CD318BE8A3940DA9B8905C /* Pods-MUXSDKStats.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MUXSDKStats.release.xcconfig"; path = "Target Support Files/Pods-MUXSDKStats/Pods-MUXSDKStats.release.xcconfig"; sourceTree = ""; }; @@ -223,6 +224,7 @@ F4DCAD0A1DCA892E0094D94C /* MUXSDKStatsTests */ = { isa = PBXGroup; children = ( + 350F766328FDCD8D008F520F /* MUXSDKStats+Internal.h */, 02729E1A23E8F31B0037F0E9 /* Utils */, F4DCAD0B1DCA892E0094D94C /* MUXSDKStatsTests.m */, F4DCAD0D1DCA892E0094D94C /* Info.plist */, @@ -316,7 +318,7 @@ F4DCAD021DCA892E0094D94C /* Sources */, F4DCAD031DCA892E0094D94C /* Frameworks */, F4DCAD041DCA892E0094D94C /* Resources */, - F5876A42AC3B9F00CB932EB4 /* [CP] Embed Pods Frameworks */, + 3AA3507C3DDFD40977FB6B6C /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -419,29 +421,25 @@ 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"; showEnvVarsInLog = 0; }; - BC82C7A77B5183ED420EE64C /* [CP] Check Pods Manifest.lock */ = { + 3AA3507C3DDFD40977FB6B6C /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MUXSDKStatsTests/Pods-MUXSDKStatsTests-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Mux-Stats-Core/MuxCore.framework/MuxCore", ); + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-MUXSDKStats-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MuxCore.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MUXSDKStatsTests/Pods-MUXSDKStatsTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - C88DCF5B1174B9ED42D57612 /* [CP] Check Pods Manifest.lock */ = { + BC82C7A77B5183ED420EE64C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -456,29 +454,33 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-MUXSDKStatsTv-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-MUXSDKStats-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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"; showEnvVarsInLog = 0; }; - F5876A42AC3B9F00CB932EB4 /* [CP] Embed Pods Frameworks */ = { + C88DCF5B1174B9ED42D57612 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-MUXSDKStatsTests/Pods-MUXSDKStatsTests-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Mux-Stats-Core/MuxCore.framework/MuxCore", + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MuxCore.framework", + "$(DERIVED_FILE_DIR)/Pods-MUXSDKStatsTv-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MUXSDKStatsTests/Pods-MUXSDKStatsTests-frameworks.sh\"\n"; + 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"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -554,7 +556,7 @@ INFOPLIST_FILE = MUXSDKStatsTv/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2.13.2; + MARKETING_VERSION = 3.0.0; MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap"; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv; @@ -562,7 +564,7 @@ SDKROOT = appletvos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 11.0; }; name = Debug; }; @@ -581,14 +583,14 @@ INFOPLIST_FILE = MUXSDKStatsTv/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2.13.2; + MARKETING_VERSION = 3.0.0; MODULEMAP_FILE = "$(SRCROOT)/MUXSDKStatsTv/module.modulemap"; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.tvos.MUXSDKStatsTv; PRODUCT_NAME = MUXSDKStats; SDKROOT = appletvos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 11.0; }; name = Release; }; @@ -756,9 +758,9 @@ ); INFOPLIST_FILE = MUXSDKStats/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2.13.2; + MARKETING_VERSION = 3.0.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -781,9 +783,9 @@ "GCC_PREPROCESSOR_DEFINITIONS[sdk=appletvos*]" = "TVOS=1"; INFOPLIST_FILE = MUXSDKStats/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 2.13.2; + MARKETING_VERSION = 3.0.0; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.MUXSDKStats; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m b/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m index cd0e64b2..42ee1e08 100644 --- a/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m +++ b/MUXSDKStats/MUXSDKStats/MUXSDKPlayerBinding.m @@ -12,7 +12,7 @@ // SDK constants. NSString *const MUXSDKPluginName = @"apple-mux"; -NSString *const MUXSDKPluginVersion = @"2.13.2"; +NSString *const MUXSDKPluginVersion = @"3.0.0"; NSString *const MUXSessionDataPrefix = @"io.litix.data."; // Min number of seconds between timeupdate events. (100ms) @@ -237,6 +237,7 @@ - (void) calculateBandwidthMetricFromAccessLog:(AVPlayerItemAccessLog *) log { loadData.requestBytesLoaded = [NSNumber numberWithLong: event.numberOfBytesTransferred - _lastTransferredBytes]; loadData.requestResponseHeaders = nil; loadData.requestHostName = [self getHostName:event.URI]; + loadData.requestUrl = event.URI; loadData.requestCurrentLevel = nil; loadData.requestMediaStartTime = nil; loadData.requestMediaDuration = nil; diff --git a/MUXSDKStats/MUXSDKStats/MUXSDKStats.m b/MUXSDKStats/MUXSDKStats/MUXSDKStats.m index 9fd31ae2..bfd73e1d 100644 --- a/MUXSDKStats/MUXSDKStats/MUXSDKStats.m +++ b/MUXSDKStats/MUXSDKStats/MUXSDKStats.m @@ -108,41 +108,56 @@ + (MUXSDKViewerData *)buildViewerData { } else if (bundleVersion) { [viewerData setViewerApplicationVersion:bundleVersion]; } - [viewerData setViewerDeviceManufacturer:@"Apple"]; - [viewerData setMuxViewerDeviceManufacturer:@"Apple"]; + NSString *systemDeviceCategory = @"unknown"; + NSString *systemOsFamily = @"unknown"; struct utsname systemInfo; uname(&systemInfo); - [viewerData setViewerDeviceModel:[NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]]; - [viewerData setMuxViewerDeviceModel:[NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]]; - NSString *deviceCategory = @"unknown"; - NSString *osFamily = @"unknown"; + NSString *systemDeviceModel = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; + NSString *systemOsVersion = [[UIDevice currentDevice] systemVersion]; switch ([[UIDevice currentDevice] userInterfaceIdiom]) { case UIUserInterfaceIdiomTV: - deviceCategory = @"tv"; - osFamily = @"tvOS"; + systemDeviceCategory = @"tv"; + systemOsFamily = @"tvOS"; break; case UIUserInterfaceIdiomPad: - deviceCategory = @"tablet"; - osFamily = @"iOS"; + systemDeviceCategory = @"tablet"; + systemOsFamily = @"iOS"; break; case UIUserInterfaceIdiomPhone: - deviceCategory = @"phone"; - osFamily = @"iOS"; + systemDeviceCategory = @"phone"; + systemOsFamily = @"iOS"; break; case UIUserInterfaceIdiomCarPlay: - deviceCategory = @"car"; - osFamily = @"CarPlay"; + systemDeviceCategory = @"car"; + systemOsFamily = @"CarPlay"; break; default: break; } - [viewerData setViewerDeviceCategory:deviceCategory]; - [viewerData setViewerOsFamily:osFamily]; - [viewerData setViewerOsVersion:[[UIDevice currentDevice] systemVersion]]; - [viewerData setMuxViewerDeviceCategory:deviceCategory]; - [viewerData setMuxViewerOsFamily:osFamily]; - [viewerData setMuxViewerOsVersion:[[UIDevice currentDevice] systemVersion]]; + // Detected values for device metadata + [viewerData setMuxViewerDeviceModel:systemDeviceModel]; + [viewerData setMuxViewerDeviceCategory:systemDeviceCategory]; + [viewerData setMuxViewerOsFamily:systemOsFamily]; + [viewerData setMuxViewerOsVersion:systemOsVersion]; + [viewerData setMuxViewerDeviceManufacturer:@"Apple"]; + + // Overridden values for device metadata + if(_customerViewerData.viewerDeviceModel) { + [viewerData setViewerDeviceModel:_customerViewerData.viewerDeviceModel]; + } + if(_customerViewerData.viewerDeviceCategory) { + [viewerData setViewerDeviceCategory:_customerViewerData.viewerDeviceCategory]; + } + if(_customerViewerData.viewerOsFamily) { + [viewerData setViewerOsFamily:_customerViewerData.viewerOsFamily]; + } + if(_customerViewerData.viewerOsVersion) { + [viewerData setViewerOsVersion:_customerViewerData.viewerOsVersion]; + } + if(_customerViewerData.viewerDeviceManufacturer) { + [viewerData setViewerDeviceManufacturer:_customerViewerData.viewerDeviceManufacturer]; + } return viewerData; } @@ -678,4 +693,5 @@ + (void)dispatchError:(nonnull NSString *)code withMessage:(nonnull NSString *)m if (!player) return; [player dispatchError:code withMessage:message]; } + @end diff --git a/MUXSDKStats/MUXSDKStatsTests/MUXSDKStats+Internal.h b/MUXSDKStats/MUXSDKStatsTests/MUXSDKStats+Internal.h new file mode 100644 index 00000000..62489590 --- /dev/null +++ b/MUXSDKStats/MUXSDKStatsTests/MUXSDKStats+Internal.h @@ -0,0 +1,23 @@ +// +// MUXSDKStats+PropertyGetters.h +// MUXSDKStats +// +// Declares a project-level class extension that allows tests to get values under test out of the SDK +// +// Created by Emily Dixon on 10/17/22. +// Copyright © 2022 Mux, Inc. All rights reserved. +// + +#ifndef MUXSDKStats_PropertyGetters_h +#define MUXSDKStats_PropertyGetters_h + +#import "MUXSDKStats.h" + +@interface MUXSDKStats() + +// Expose buildViewerData for tests ++ (MUXSDKViewerData *)buildViewerData; + +@end + +#endif /* MUXSDKStats_PropertyGetters_h */ diff --git a/MUXSDKStats/MUXSDKStatsTests/MUXSDKStatsTests.m b/MUXSDKStats/MUXSDKStatsTests/MUXSDKStatsTests.m index 80f9e74e..c87a80da 100644 --- a/MUXSDKStats/MUXSDKStatsTests/MUXSDKStatsTests.m +++ b/MUXSDKStats/MUXSDKStatsTests/MUXSDKStatsTests.m @@ -8,6 +8,7 @@ #import #import "MUXSDKStats.h" +#import "MUXSDKStats+Internal.h" #import "MUXSDKCore+Mock.h" #import "MUXSDKPlayerBindingConstants.h" #if __has_feature(modules) @@ -890,4 +891,79 @@ - (void) testDispatchError { [MUXSDKStats destroyPlayer:playName]; } + +-(void)testOverrideAllDeviceMetadata { + NSString *customerOsVersion = @"1.2.3-dev"; + NSString *customerOsFamily = @"OS/2"; + NSString *customerDeviceModel = @"PS/2"; + NSString *customerDeviceManufacturer = @"IBM"; + NSString *customDeviceCategory = @"Personal Computer"; + + MuxMockAVPlayerLayer *controller = [[MuxMockAVPlayerLayer alloc] init]; + MUXSDKCustomerPlayerData *customerPlayerData = [[MUXSDKCustomerPlayerData alloc] initWithEnvironmentKey:@"YOUR_COMPANY_NAME"]; + MUXSDKCustomerVideoData *customerVideoData = [[MUXSDKCustomerVideoData alloc] init]; + + MUXSDKCustomerViewerData *customerViewerData = [[MUXSDKCustomerViewerData alloc] init]; + customerViewerData.viewerOsVersion = customerOsVersion; + customerViewerData.viewerOsFamily = customerOsFamily; + customerViewerData.viewerDeviceModel = customerDeviceModel; + customerViewerData.viewerDeviceManufacturer = customerDeviceManufacturer; + customerViewerData.viewerDeviceCategory = customDeviceCategory; + + MUXSDKCustomerData *customerData = [[MUXSDKCustomerData alloc] initWithCustomerPlayerData:customerPlayerData + videoData:customerVideoData + viewData:nil + customData:[[MUXSDKCustomData alloc] init] + viewerData:customerViewerData + ]; + + NSString *playerName = @"Player"; + [MUXSDKStats monitorAVPlayerLayer:controller withPlayerName:playerName customerData:customerData]; + + MUXSDKViewerData *finalViewerData = [MUXSDKStats buildViewerData]; + XCTAssertEqual(finalViewerData.viewerOsVersion, customerOsVersion); + XCTAssertEqual(finalViewerData.viewerOsFamily, customerOsFamily); + XCTAssertEqual(finalViewerData.viewerDeviceModel, customerDeviceModel); + XCTAssertEqual(finalViewerData.viewerDeviceManufacturer, customerDeviceManufacturer); + XCTAssertEqual(finalViewerData.viewerDeviceCategory, customDeviceCategory); + + [MUXSDKStats destroyPlayer:playerName]; +} + +-(void)testOverrideSomeDeviceMetadata { + NSString *customerOsVersion = @"1.2.3-dev"; + NSString *customerOsFamily = @"OS/2"; + NSString *customerDeviceModel = @"PS/2"; + NSString *customerDeviceManufacturer = @"IBM"; + NSString *customDeviceCategory = @"Personal Computer"; + + MuxMockAVPlayerLayer *controller = [[MuxMockAVPlayerLayer alloc] init]; + MUXSDKCustomerPlayerData *customerPlayerData = [[MUXSDKCustomerPlayerData alloc] initWithEnvironmentKey:@"YOUR_COMPANY_NAME"]; + MUXSDKCustomerVideoData *customerVideoData = [[MUXSDKCustomerVideoData alloc] init]; + + MUXSDKCustomerViewerData *customerViewerData = [[MUXSDKCustomerViewerData alloc] init]; + customerViewerData.viewerOsVersion = customerOsVersion; + customerViewerData.viewerOsFamily = customerOsFamily; + customerViewerData.viewerDeviceModel = customerDeviceModel; + + MUXSDKCustomerData *customerData = [[MUXSDKCustomerData alloc] initWithCustomerPlayerData:customerPlayerData + videoData:customerVideoData + viewData:nil + customData:[[MUXSDKCustomData alloc] init] + viewerData:customerViewerData + ]; + + NSString *playerName = @"Player"; + [MUXSDKStats monitorAVPlayerLayer:controller withPlayerName:playerName customerData:customerData]; + + MUXSDKViewerData *finalViewerData = [MUXSDKStats buildViewerData]; + XCTAssertEqual(finalViewerData.viewerOsVersion, customerOsVersion); + XCTAssertEqual(finalViewerData.viewerOsFamily, customerOsFamily); + XCTAssertEqual(finalViewerData.viewerDeviceModel, customerDeviceModel); + XCTAssertNotEqual(finalViewerData.viewerDeviceManufacturer, customerDeviceManufacturer); + XCTAssertNotEqual(finalViewerData.viewerDeviceCategory, customDeviceCategory); + + [MUXSDKStats destroyPlayer:playerName]; +} + @end diff --git a/MUXSDKStats/Podfile b/MUXSDKStats/Podfile index 69931ea6..55b3807f 100644 --- a/MUXSDKStats/Podfile +++ b/MUXSDKStats/Podfile @@ -5,12 +5,12 @@ target 'MUXSDKStats' do # Uncomment the next line if you're using Swift or would like to use dynamic frameworks # use_frameworks! # Pods for MUXSDKStats - pod 'Mux-Stats-Core', '~>3.12' + pod 'Mux-Stats-Core', '~>4.0' target 'MUXSDKStatsTests' do inherit! :search_paths # Pods for testing - pod 'Mux-Stats-Core', '~>3.12' + pod 'Mux-Stats-Core', '~>4.0' end end @@ -20,5 +20,5 @@ target 'MUXSDKStatsTv' do # Uncomment the next line if you're using Swift or would like to use dynamic frameworks # use_frameworks! # Pods for MUXSDKStatsTv - pod 'Mux-Stats-Core', '~>3.12' + pod 'Mux-Stats-Core', '~>4.0' end diff --git a/MUXSDKStats/Podfile.lock b/MUXSDKStats/Podfile.lock index 43c0db9e..8bd32227 100644 --- a/MUXSDKStats/Podfile.lock +++ b/MUXSDKStats/Podfile.lock @@ -1,16 +1,16 @@ PODS: - - Mux-Stats-Core (3.14.0) + - Mux-Stats-Core (4.0.0) DEPENDENCIES: - - Mux-Stats-Core (~> 3.12) + - Mux-Stats-Core (~> 4.0) SPEC REPOS: trunk: - Mux-Stats-Core SPEC CHECKSUMS: - Mux-Stats-Core: 222a9b4607728d6a770f81e061669f706f90a2e4 + Mux-Stats-Core: 619b7da5505ef3420560577ec8bb4cab258ba30d -PODFILE CHECKSUM: b91679b298bd9cd5ce8c4be2ffda66512e28b3bd +PODFILE CHECKSUM: 9b0f698a352fb490aa50c00f65e736593f04ae49 COCOAPODS: 1.11.3 diff --git a/Mux-Stats-AVPlayer.podspec b/Mux-Stats-AVPlayer.podspec index 3dabec60..33428b10 100644 --- a/Mux-Stats-AVPlayer.podspec +++ b/Mux-Stats-AVPlayer.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Mux-Stats-AVPlayer' - s.version = '2.13.2' + s.version = '3.0.0' s.source = { :git => 'https://github.com/muxinc/mux-stats-sdk-avplayer.git', :tag => "v#{s.version}" } @@ -14,13 +14,13 @@ Pod::Spec.new do |s| s.license = 'Apache 2.0' s.author = { 'Mux' => 'ios-sdk@mux.com' } - s.dependency 'Mux-Stats-Core', '~>3.12' + s.dependency 'Mux-Stats-Core', '~>4.0' - s.ios.deployment_target = '9.0' + s.ios.deployment_target = '11.0' s.ios.vendored_frameworks = 'XCFramework/MUXSDKStats.xcframework' s.ios.frameworks = 'AVKit', 'AVFoundation' - s.tvos.deployment_target = '9.0' + s.tvos.deployment_target = '11.0' s.tvos.vendored_frameworks = 'XCFramework/MUXSDKStats.xcframework' s.tvos.frameworks = 'AVKit', 'AVFoundation' end diff --git a/XCFramework/MUXSDKStats.xcframework/Info.plist b/XCFramework/MUXSDKStats.xcframework/Info.plist index 793b1386..a4272a1b 100644 --- a/XCFramework/MUXSDKStats.xcframework/Info.plist +++ b/XCFramework/MUXSDKStats.xcframework/Info.plist @@ -6,7 +6,7 @@ LibraryIdentifier - tvos-arm64_x86_64-simulator + ios-arm64_x86_64-maccatalyst LibraryPath MUXSDKStats.framework SupportedArchitectures @@ -15,41 +15,40 @@ x86_64 SupportedPlatform - tvos + ios SupportedPlatformVariant - simulator + maccatalyst LibraryIdentifier - ios-arm64_armv7 + tvos-arm64_x86_64-simulator LibraryPath MUXSDKStats.framework SupportedArchitectures arm64 - armv7 + x86_64 SupportedPlatform - ios + tvos + SupportedPlatformVariant + simulator LibraryIdentifier - ios-arm64_x86_64-maccatalyst + tvos-arm64 LibraryPath MUXSDKStats.framework SupportedArchitectures arm64 - x86_64 SupportedPlatform - ios - SupportedPlatformVariant - maccatalyst + tvos LibraryIdentifier - tvos-arm64 + ios-arm64 LibraryPath MUXSDKStats.framework SupportedArchitectures @@ -57,17 +56,16 @@ arm64 SupportedPlatform - tvos + ios LibraryIdentifier - ios-arm64_i386_x86_64-simulator + ios-arm64_x86_64-simulator LibraryPath MUXSDKStats.framework SupportedArchitectures arm64 - i386 x86_64 SupportedPlatform diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h similarity index 100% rename from XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h rename to XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Headers/MUXSDKStats.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h similarity index 100% rename from XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Headers/MUXSDKStats.h rename to XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Headers/MUXSDKStats.h diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Info.plist new file mode 100644 index 00000000..fe8f3557 Binary files /dev/null and b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Info.plist differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/MUXSDKStats new file mode 100755 index 00000000..c3084942 Binary files /dev/null and b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Modules/module.modulemap b/XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Modules/module.modulemap similarity index 100% rename from XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Modules/module.modulemap rename to XCFramework/MUXSDKStats.xcframework/ios-arm64/MUXSDKStats.framework/Modules/module.modulemap diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/MUXSDKStats deleted file mode 100755 index d3582314..00000000 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/MUXSDKStats and /dev/null differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Info.plist deleted file mode 100644 index 2dbee818..00000000 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Info.plist and /dev/null differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats deleted file mode 100755 index bdfc7ceb..00000000 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats and /dev/null differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/MUXSDKStats index 01170ec4..69894ab5 100755 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/MUXSDKStats and b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Resources/Info.plist b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Resources/Info.plist index 6ac531f8..10064187 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Resources/Info.plist +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-maccatalyst/MUXSDKStats.framework/Versions/A/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 19H1922 + 21G115 CFBundleDevelopmentRegion en CFBundleExecutable @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.13.2 + 3.0.0 CFBundleSupportedPlatforms MacOSX @@ -27,19 +27,19 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 12D4e + 14A400 DTPlatformName macosx DTPlatformVersion - 11.1 + 12.3 DTSDKBuild - 20C63 + 21E226 DTSDKName - macosx11.1 + macosx12.3 DTXcode - 1240 + 1401 DTXcodeBuild - 12D4e + 14A400 LSMinimumSystemVersion 10.15 UIDeviceFamily diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h similarity index 100% rename from XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h rename to XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKPlayerBinding.h diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h similarity index 100% rename from XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h rename to XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Headers/MUXSDKStats.h diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist similarity index 54% rename from XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Info.plist rename to XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist index 44653fd6..230ed68e 100644 Binary files a/XCFramework/MUXSDKStats.xcframework/ios-arm64_armv7/MUXSDKStats.framework/Info.plist and b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats new file mode 100755 index 00000000..a1702613 Binary files /dev/null and b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Modules/module.modulemap b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Modules/module.modulemap similarity index 100% rename from XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/Modules/module.modulemap rename to XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/Modules/module.modulemap diff --git a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources similarity index 90% rename from XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources rename to XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources index 94de40c3..4895cac6 100644 --- a/XCFramework/MUXSDKStats.xcframework/ios-arm64_i386_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources +++ b/XCFramework/MUXSDKStats.xcframework/ios-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources @@ -14,7 +14,7 @@ Info.plist - MyVgyxaoe227Y9G2YEMTsAC9Aq0= + sCTQxTL9iRHGQfh/xNtsN0Mj9CM= Modules/module.modulemap @@ -25,10 +25,6 @@ Headers/MUXSDKPlayerBinding.h - hash - - HxFqa1bh8d4u7co2exZq0ZGg2I4= - hash2 7eb8SKafqdT0KCZoH+9Uf15jYiHWwpDgzengf/KZZwE= @@ -36,10 +32,6 @@ Headers/MUXSDKStats.h - hash - - gL3TQD7YDBFt5IoFykpHpruUeTg= - hash2 WPI1/4ZxroUaGYRc8x7nKs1evl1NuiKQ0IVqexFL6Ps= @@ -47,10 +39,6 @@ Modules/module.modulemap - hash - - IESP2GX3Ai9sY2p3OzZ3x0ol/QE= - hash2 +xzGA88a1wfApPKwkvEme72T8sTUASCcwPTFvm+PIUg= diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Info.plist index 40710cb0..5697070b 100644 Binary files a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Info.plist and b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/Info.plist differ diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/MUXSDKStats index a6c1a227..f90e968d 100755 Binary files a/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/MUXSDKStats and b/XCFramework/MUXSDKStats.xcframework/tvos-arm64/MUXSDKStats.framework/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist index ce757b68..8de44f49 100644 Binary files a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist and b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/Info.plist differ diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats index 95e2b649..da67f0b9 100755 Binary files a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats and b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/MUXSDKStats differ diff --git a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources index 09e4c4b9..30499978 100644 --- a/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources +++ b/XCFramework/MUXSDKStats.xcframework/tvos-arm64_x86_64-simulator/MUXSDKStats.framework/_CodeSignature/CodeResources @@ -18,7 +18,7 @@ Info.plist - k7I8Oy4zKdj45zgm5aIxiz5vZrY= + yu1GtJrZSwFDY99MvMZEZE06JtU= Modules/module.modulemap @@ -29,10 +29,6 @@ Headers/MUXSDKPlayerBinding.h - hash - - HxFqa1bh8d4u7co2exZq0ZGg2I4= - hash2 7eb8SKafqdT0KCZoH+9Uf15jYiHWwpDgzengf/KZZwE= @@ -40,10 +36,6 @@ Headers/MUXSDKStats.h - hash - - gL3TQD7YDBFt5IoFykpHpruUeTg= - hash2 WPI1/4ZxroUaGYRc8x7nKs1evl1NuiKQ0IVqexFL6Ps= @@ -51,10 +43,6 @@ Headers/MUXSDKStatsTv.h - hash - - 9jQFHCiHb0gNzWtO9VWZNNkPt8w= - hash2 zCuTtKIn5WBcmRN+vCvhfKT4U3uzmjhCc/x8j59mo7Q= @@ -62,10 +50,6 @@ Modules/module.modulemap - hash - - GolHymijCSRIAcWrFdTEgt7XShQ= - hash2 fNC6fIja2dOeeaaQ/oViqUsi9KrWOgHF1vsRxxcVEhg= diff --git a/apps/DemoApp/DemoApp.xcodeproj/project.pbxproj b/apps/DemoApp/DemoApp.xcodeproj/project.pbxproj index ce4c293d..bf02da8d 100644 --- a/apps/DemoApp/DemoApp.xcodeproj/project.pbxproj +++ b/apps/DemoApp/DemoApp.xcodeproj/project.pbxproj @@ -8,7 +8,7 @@ /* Begin PBXBuildFile section */ 0218F2562548B9A3009DF1FF /* DemoAppUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0218F2552548B9A3009DF1FF /* DemoAppUITests.m */; }; - ACED1B9DF69E20ADF4DC0DB0 /* Pods_DemoApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B9F04C443A0E9FA70864D2E /* Pods_DemoApp.framework */; }; + D05D1652B8B85A869D1B14B1 /* Pods_DemoApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A6191B4E7D0AFC77BEED1D7E /* Pods_DemoApp.framework */; }; F444D43D1DDB8EBF00FE804F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F444D43C1DDB8EBF00FE804F /* main.m */; }; F444D4401DDB8EBF00FE804F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F444D43F1DDB8EBF00FE804F /* AppDelegate.m */; }; F444D4431DDB8EBF00FE804F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F444D4421DDB8EBF00FE804F /* ViewController.m */; }; @@ -31,9 +31,9 @@ 0218F2532548B9A3009DF1FF /* DemoAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DemoAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 0218F2552548B9A3009DF1FF /* DemoAppUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoAppUITests.m; sourceTree = ""; }; 0218F2572548B9A3009DF1FF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 116BD73FDFF6D8885DBD1730 /* Pods-DemoApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoApp.debug.xcconfig"; path = "Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig"; sourceTree = ""; }; - 3B9F04C443A0E9FA70864D2E /* Pods_DemoApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DemoApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 75523201F3E61DF178B965DC /* Pods-DemoApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoApp.release.xcconfig"; path = "Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig"; sourceTree = ""; }; + 17BB048DD724CC104E7A90EB /* Pods-DemoApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoApp.release.xcconfig"; path = "Target Support Files/Pods-DemoApp/Pods-DemoApp.release.xcconfig"; sourceTree = ""; }; + 24DD1E3B6D7925EF8B81E33A /* Pods-DemoApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoApp.debug.xcconfig"; path = "Target Support Files/Pods-DemoApp/Pods-DemoApp.debug.xcconfig"; sourceTree = ""; }; + A6191B4E7D0AFC77BEED1D7E /* Pods_DemoApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DemoApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F444D4381DDB8EBF00FE804F /* DemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; F444D43C1DDB8EBF00FE804F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; F444D43E1DDB8EBF00FE804F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -59,7 +59,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ACED1B9DF69E20ADF4DC0DB0 /* Pods_DemoApp.framework in Frameworks */, + D05D1652B8B85A869D1B14B1 /* Pods_DemoApp.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -78,8 +78,8 @@ D4FC223FD5BBFE596F4A0787 /* Pods */ = { isa = PBXGroup; children = ( - 116BD73FDFF6D8885DBD1730 /* Pods-DemoApp.debug.xcconfig */, - 75523201F3E61DF178B965DC /* Pods-DemoApp.release.xcconfig */, + 24DD1E3B6D7925EF8B81E33A /* Pods-DemoApp.debug.xcconfig */, + 17BB048DD724CC104E7A90EB /* Pods-DemoApp.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -132,7 +132,7 @@ isa = PBXGroup; children = ( F444D4521DDBB14400FE804F /* MUXSDKStats.framework */, - 3B9F04C443A0E9FA70864D2E /* Pods_DemoApp.framework */, + A6191B4E7D0AFC77BEED1D7E /* Pods_DemoApp.framework */, ); name = Frameworks; sourceTree = ""; @@ -162,11 +162,11 @@ isa = PBXNativeTarget; buildConfigurationList = F444D44F1DDB8EBF00FE804F /* Build configuration list for PBXNativeTarget "DemoApp" */; buildPhases = ( - 3C0230B3C4D130BF8733606A /* [CP] Check Pods Manifest.lock */, + 2D26E4D78D0DEFAAD24C3554 /* [CP] Check Pods Manifest.lock */, F444D4341DDB8EBF00FE804F /* Sources */, F444D4351DDB8EBF00FE804F /* Frameworks */, F444D4361DDB8EBF00FE804F /* Resources */, - FDCB3C673F337318E0C9F5B2 /* [CP] Embed Pods Frameworks */, + B5DDC7CB860566E050B8C7F8 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -240,7 +240,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3C0230B3C4D130BF8733606A /* [CP] Check Pods Manifest.lock */ = { + 2D26E4D78D0DEFAAD24C3554 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -262,22 +262,22 @@ 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"; showEnvVarsInLog = 0; }; - FDCB3C673F337318E0C9F5B2 /* [CP] Embed Pods Frameworks */ = { + B5DDC7CB860566E050B8C7F8 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-DemoApp/Pods-DemoApp-frameworks.sh", - "${PODS_ROOT}/GoogleAds-IMA-iOS-SDK/GoogleInteractiveMediaAds.framework", "${BUILT_PRODUCTS_DIR}/Mux-Stats-Google-IMA/Mux_Stats_Google_IMA.framework", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAds-IMA-iOS-SDK/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds", "${PODS_XCFRAMEWORKS_BUILD_DIR}/Mux-Stats-AVPlayer/MUXSDKStats.framework/MUXSDKStats", "${PODS_XCFRAMEWORKS_BUILD_DIR}/Mux-Stats-Core/MuxCore.framework/MuxCore", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleInteractiveMediaAds.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mux_Stats_Google_IMA.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleInteractiveMediaAds.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MUXSDKStats.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MuxCore.framework", ); @@ -492,7 +492,7 @@ }; F444D4501DDB8EBF00FE804F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 116BD73FDFF6D8885DBD1730 /* Pods-DemoApp.debug.xcconfig */; + baseConfigurationReference = 24DD1E3B6D7925EF8B81E33A /* Pods-DemoApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = UH7BDR2X9D; @@ -501,7 +501,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = DemoApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.DemoApp22; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -510,7 +510,7 @@ }; F444D4511DDB8EBF00FE804F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 75523201F3E61DF178B965DC /* Pods-DemoApp.release.xcconfig */; + baseConfigurationReference = 17BB048DD724CC104E7A90EB /* Pods-DemoApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = GFDDVAVUVC; @@ -519,7 +519,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = DemoApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mux.stats.ios.DemoApp; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/apps/DemoApp/DemoAppUITests/DemoAppUITests.m b/apps/DemoApp/DemoAppUITests/DemoAppUITests.m index 3209ff94..9002d305 100644 --- a/apps/DemoApp/DemoAppUITests/DemoAppUITests.m +++ b/apps/DemoApp/DemoAppUITests/DemoAppUITests.m @@ -109,7 +109,14 @@ - (void)testAVQueuePlayer { [element tap]; // Forward the video near the end - XCUIElement *slider = app.sliders.firstMatch; + // Starting on iOS 16, the slider is some custom view with a label + NSString *systemVer = [[UIDevice currentDevice] systemVersion]; + XCUIElement *slider; + if([systemVer containsString:@"16"]) { + slider = app.otherElements[@"Current position"]; + } else { + slider = app.sliders.firstMatch; + } XCUICoordinate *start = [slider coordinateWithNormalizedOffset:CGVectorMake(0, 0)]; XCUICoordinate *finish = [slider coordinateWithNormalizedOffset:CGVectorMake(0.99, 0)]; [start pressForDuration:1 thenDragToCoordinate:finish]; @@ -183,7 +190,14 @@ - (void)testUISeek { [element tap]; // Seek - XCUIElement *slider = app.sliders.firstMatch; + // Starting on iOS 16, the slider is some custom view with a label + NSString *systemVer = [[UIDevice currentDevice] systemVersion]; + XCUIElement *slider; + if([systemVer containsString:@"16"]) { + slider = app.otherElements[@"Current position"]; + } else { + slider = app.sliders.firstMatch; + } XCUICoordinate *start = [slider coordinateWithNormalizedOffset:CGVectorMake(0, 0)]; XCUICoordinate *finish = [slider coordinateWithNormalizedOffset:CGVectorMake(0.25, 0)]; [start pressForDuration:1 thenDragToCoordinate:finish]; diff --git a/apps/DemoApp/Podfile b/apps/DemoApp/Podfile index 82d255a9..ce49b478 100644 --- a/apps/DemoApp/Podfile +++ b/apps/DemoApp/Podfile @@ -1,9 +1,10 @@ #Uncomment the next line to define a global platform for your project -platform :ios, '10.0' +platform :ios, '12.0' target 'DemoApp' do use_frameworks! pod 'Mux-Stats-AVPlayer', :path => '../../' pod 'GoogleAds-IMA-iOS-SDK', '~> 3.14' - pod 'Mux-Stats-Google-IMA', '~> 0.6' + #pod 'Mux-Stats-Google-IMA', '~> 0.9' + pod 'Mux-Stats-Google-IMA', :path => '../../../mux-stats-google-ima' end diff --git a/apps/DemoApp/Podfile.lock b/apps/DemoApp/Podfile.lock index ff359acb..d3a07a38 100644 --- a/apps/DemoApp/Podfile.lock +++ b/apps/DemoApp/Podfile.lock @@ -1,34 +1,35 @@ PODS: - - GoogleAds-IMA-iOS-SDK (3.14.3) - - Mux-Stats-AVPlayer (2.12.1): - - Mux-Stats-Core (~> 3.12.0) - - Mux-Stats-Core (3.12.0) - - Mux-Stats-Google-IMA (0.7.0): - - GoogleAds-IMA-iOS-SDK (~> 3.13) - - GoogleAds-IMA-tvOS-SDK (~> 4.3) - - Mux-Stats-AVPlayer (~> 2.10) + - GoogleAds-IMA-iOS-SDK (3.16.3) + - Mux-Stats-AVPlayer (3.0.0): + - Mux-Stats-Core (~> 4.0) + - Mux-Stats-Core (4.0.0) + - Mux-Stats-Google-IMA (0.9.0): + - GoogleAds-IMA-iOS-SDK (~> 3.16) + - GoogleAds-IMA-tvOS-SDK (~> 4.6) + - Mux-Stats-AVPlayer (~> 3.0) DEPENDENCIES: - GoogleAds-IMA-iOS-SDK (~> 3.14) - Mux-Stats-AVPlayer (from `../../`) - - Mux-Stats-Google-IMA (~> 0.6) + - Mux-Stats-Google-IMA (from `../../../mux-stats-google-ima`) SPEC REPOS: trunk: - GoogleAds-IMA-iOS-SDK - Mux-Stats-Core - - Mux-Stats-Google-IMA EXTERNAL SOURCES: Mux-Stats-AVPlayer: :path: "../../" + Mux-Stats-Google-IMA: + :path: "../../../mux-stats-google-ima" SPEC CHECKSUMS: - GoogleAds-IMA-iOS-SDK: 2a9b7b14bda4993306f05287f952dce41b5be4ad - Mux-Stats-AVPlayer: db7a03063704342068b6ee6321acdd7acb6b1256 - Mux-Stats-Core: 47e36730a0b7e094b68c73737c0ce6cfefc3c3a6 - Mux-Stats-Google-IMA: 9caecd2ca73f357f9077fe0c3d35766df9bee884 + GoogleAds-IMA-iOS-SDK: 1aba71fa5b58dc463cc5b752f06e970ec7c739c1 + Mux-Stats-AVPlayer: c738d1c42ec8f3c5e155bfcfcb694b0f20768c17 + Mux-Stats-Core: 619b7da5505ef3420560577ec8bb4cab258ba30d + Mux-Stats-Google-IMA: aa21aa5509fca6707d7615fee5d3c8d68f62057c -PODFILE CHECKSUM: 7a53c423287576c674f81707a4bcf502e5102ad9 +PODFILE CHECKSUM: 4e6a95470d661fcd51eb8fd38957cde60b52433a COCOAPODS: 1.11.3 diff --git a/apps/DemoApp/run-tests-big-sur.sh b/apps/DemoApp/run-tests-big-sur.sh index 1cdd3ada..9f224fa9 100755 --- a/apps/DemoApp/run-tests-big-sur.sh +++ b/apps/DemoApp/run-tests-big-sur.sh @@ -1,6 +1,8 @@ #!/bin/bash set -euo pipefail +brew install xcbeautify + # Delete the old stuff rm -Rf XCFramework # reset simulators @@ -13,10 +15,13 @@ then buildkite-agent artifact download "MUXSDKStats.xcframework.zip" . --step ".buildkite/build.sh" fi +echo "========= test xcode version" +xcodebuild -version + unzip MUXSDKStats.xcframework.zip cd apps/DemoApp pod deintegrate && pod update xcodebuild -workspace DemoApp.xcworkspace \ -scheme "DemoApp" \ - -destination 'platform=iOS Simulator,name=iPhone 12,OS=15.2' \ + -destination 'id=367F9736-5C05-4524-B7DA-6AB5245D0044' \ test diff --git a/apps/DemoApp/run-tests.sh b/apps/DemoApp/run-tests.sh index 87f2431b..3bad74c3 100755 --- a/apps/DemoApp/run-tests.sh +++ b/apps/DemoApp/run-tests.sh @@ -1,22 +1,24 @@ #!/bin/bash set -euo pipefail +brew install xcbeautify + # Delete the old stuff rm -Rf XCFramework # reset simulators xcrun -v simctl shutdown all xcrun -v simctl erase all -# Fetch artifact if running via buildkite (GitHub Actions fetches the artifact in a prior step) -if command -v buildkite-agent > /dev/null 2>&1; -then - buildkite-agent artifact download "MUXSDKStats.xcframework.zip" . --step ".buildkite/build.sh" -fi +echo "test xcode version" +xcodebuild -version unzip MUXSDKStats.xcframework.zip + cd apps/DemoApp pod deintegrate && pod update + xcodebuild -workspace DemoApp.xcworkspace \ -scheme "DemoApp" \ - -destination 'platform=iOS Simulator,name=iPhone 11,OS=14.1' \ - test + -destination 'id=7EDC75D2-89BC-4138-88C2-F5538F273DFF' \ + test \ + | xcbeautify diff --git a/apps/TvDemoApp/Podfile.lock b/apps/TvDemoApp/Podfile.lock index eec6de7e..ddfddb3e 100644 --- a/apps/TvDemoApp/Podfile.lock +++ b/apps/TvDemoApp/Podfile.lock @@ -1,12 +1,12 @@ PODS: - GoogleAds-IMA-tvOS-SDK (4.4.2) - - Mux-Stats-AVPlayer (2.10.0): - - Mux-Stats-Core (~> 3.8) - - Mux-Stats-Core (3.8.0) - - Mux-Stats-Google-IMA (0.6.0): + - Mux-Stats-AVPlayer (2.13.2): + - Mux-Stats-Core (~> 4.0) + - Mux-Stats-Core (4.0.0) + - Mux-Stats-Google-IMA (0.7.0): - GoogleAds-IMA-iOS-SDK (~> 3.13) - GoogleAds-IMA-tvOS-SDK (~> 4.3) - - Mux-Stats-AVPlayer (~> 2.0) + - Mux-Stats-AVPlayer (~> 2.10) DEPENDENCIES: - GoogleAds-IMA-tvOS-SDK (~> 4.2) @@ -25,10 +25,10 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: GoogleAds-IMA-tvOS-SDK: ab4419ba59b75c77b329e86ce408cb81ac117fe4 - Mux-Stats-AVPlayer: 9f7452ce201a8d4af500027a7d9b5746e25eea5c - Mux-Stats-Core: cb72e59db58a12f04a54a7634567f20f16b9453a - Mux-Stats-Google-IMA: 688a43ff921bd467f92072479af0160ec9090e0b + Mux-Stats-AVPlayer: 329301b01ffab78e99e1d6628a5c26ff946e4903 + Mux-Stats-Core: 619b7da5505ef3420560577ec8bb4cab258ba30d + Mux-Stats-Google-IMA: 9caecd2ca73f357f9077fe0c3d35766df9bee884 PODFILE CHECKSUM: 1f0672e773ef98935dc981d2ce2016e85d598e45 -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3