Skip to content

Commit

Permalink
Merge pull request #443 from THEOplayer/maintenance/e2e_tvos
Browse files Browse the repository at this point in the history
Maintenance/e2e tvos
  • Loading branch information
tvanlaerhoven authored Nov 20, 2024
2 parents 70f71f0 + 75ee69e commit 9764e72
Show file tree
Hide file tree
Showing 7 changed files with 130 additions and 11 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pr_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@ on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
paths:
- .github/workflows/pr_android.yml
- example/**
- e2e/**
- package.json
- src/**
- android/**

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [ 34 ]
name: Build for API Level ${{ matrix.api-level }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/pr_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
paths:
- .github/workflows/pr_ios.yml
- example/**
- e2e/**
- package.json
- src/**
- ios/**

jobs:
build:
strategy:
matrix:
xcode_version: [ '15.4.0' ]
platform: [iOS, tvOS]
runs-on: macos-latest
name: Build for ${{ matrix.platform }} using XCode version ${{ matrix.xcode_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -52,12 +61,13 @@ jobs:
- name: Start iOS simulator
uses: futureware-tech/simulator-action@v4
with:
model: 'iPhone 15'
model: ${{ matrix.platform == 'iOS' && 'iPhone 15' || 'Apple TV' }}
os: ${{ matrix.platform }}
os_version: '>=14.0'

- name: Run e2e tests
working-directory: e2e
run: npm run test:e2e:ios
run: npm run test:e2e:${{ matrix.platform == 'iOS' && 'ios' || 'tvos' }}

- name: Summarize results
working-directory: e2e
Expand Down
32 changes: 32 additions & 0 deletions e2e/ios/PodConfig.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
def nielsen_source
source 'https://github.com/NielsenDigitalSDK/nielsenappsdk-ios-specs-dynamic.git'
end

def google_cast_redirect
pod 'react-native-google-cast', :git => 'https://github.com/Danesz/react-native-google-cast.git', branch: 'feature/guestmode_apple_silicon'
end

def nielsen_post_install(installer, targetName)
# modify XCFramework configuration files to update NielsenAppApi.framework -> NielsenTVAppApi.framework
installer.pods_project.targets.each do |target|
if target.name == targetName
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
puts "post_install: Found #{File.basename(xcconfig_path)}"
xcconfig = File.read(xcconfig_path)
new_xcconfig = xcconfig.sub('-framework "NielsenAppApi"', '-framework "NielsenTVAppApi"')
File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
puts "post_install: Updated #{File.basename(xcconfig_path)} file with a value: NielsenTVAppApi.framework"
end
# update Pods-ReactNativeTHEOplayer-tvOS-frameworks.sh file
frameworksh_path = "Pods/Target Support Files/#{target.name}/#{target.name}-frameworks.sh"
if File.exist?(frameworksh_path)
puts "post_install: Found #{File.basename(frameworksh_path)}"
text = File.read(frameworksh_path)
new_contents = text.gsub('NielsenAppApi.framework', 'NielsenTVAppApi.framework')
File.open(frameworksh_path, "w") {|file| file.puts new_contents}
puts "post_install: Updated #{File.basename(frameworksh_path)} file with a value: NielsenTVAppApi.framework"
end
end
end
end
8 changes: 5 additions & 3 deletions e2e/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative './PodConfig'

source 'https://github.com/react-native-tvos/react-native-tvos-podspecs.git'
source 'https://github.com/NielsenDigitalSDK/nielsenappsdk-ios-specs-dynamic.git'
source 'https://cdn.cocoapods.org/'
nielsen_source

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Expand All @@ -24,8 +25,8 @@ target 'ReactNativeTHEOplayer' do
)

pod 'react-native-theoplayer', :path => '../..'
pod 'react-native-google-cast', :git => 'https://github.com/Danesz/react-native-google-cast.git', branch: 'feature/guestmode_apple_silicon'

google_cast_redirect
target 'ReactNativeTHEOplayerTests' do
inherit! :complete
# Pods for testing
Expand Down Expand Up @@ -54,4 +55,5 @@ end

post_install do |installer|
react_native_post_install(installer)
nielsen_post_install(installer, "Pods-ReactNativeTHEOplayer-tvOS")
end
56 changes: 51 additions & 5 deletions e2e/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ PODS:
- ComScore/Dynamic (6.10.2)
- ConvivaSDK (4.0.51)
- DoubleConversion (1.1.6)
- DSFRegex (3.3.1)
- FBLazyVector (0.75.4-0)
- fmt (9.1.0)
- glog (0.3.5)
- google-cast-sdk-dynamic-xcframework (4.8.0)
- GoogleAds-IMA-iOS-SDK (3.23.0)
- GoogleAds-IMA-tvOS-SDK (4.9.1)
- hermes-engine (0.75.4-0):
- hermes-engine/Pre-built (= 0.75.4-0)
- hermes-engine/Pre-built (0.75.4-0)
Expand Down Expand Up @@ -1253,9 +1256,12 @@ PODS:
- react-native-google-cast/RNGoogleCast (4.6.2):
- PromisesObjC
- React
- react-native-theoplayer (8.5.0):
- react-native-theoplayer (8.8.1):
- React-Core
- THEOplayerSDK-core (~> 8.0)
- THEOplayer-Connector-SideloadedSubtitle (~> 8.3)
- THEOplayer-Integration-GoogleCast (~> 8.3)
- THEOplayer-Integration-GoogleIMA (~> 8.3)
- THEOplayerSDK-core (~> 8.3)
- react-native-theoplayer-comscore (1.7.1):
- React-Core
- react-native-theoplayer
Expand Down Expand Up @@ -1533,6 +1539,10 @@ PODS:
- RNSVG (13.14.1):
- React-Core
- SocketRocket (0.7.0)
- Swifter (1.5.0)
- SwiftSubtitles (0.9.1):
- DSFRegex (~> 3.3.1)
- TinyCSV (~> 0.6.1)
- THEOplayer-Connector-Comscore (8.3.0):
- ComScore (~> 6.10.0)
- THEOplayerSDK-core (~> 8)
Expand All @@ -1544,10 +1554,28 @@ PODS:
- NielsenAppSDK-XC (= 9.0.0.0)
- THEOplayer-Connector-Utilities (>= 8.0.0, ~> 8.0)
- THEOplayerSDK-core (~> 8)
- THEOplayer-Connector-SideloadedSubtitle (8.4.0):
- Swifter (= 1.5.0)
- SwiftSubtitles (= 0.9.1)
- THEOplayerSDK-core (~> 8)
- THEOplayer-Connector-Utilities (8.3.0):
- ConvivaSDK (~> 4.0.30)
- THEOplayerSDK-core (~> 8)
- THEOplayer-Integration-GoogleCast (8.4.1):
- THEOplayer-Integration-GoogleCast/Base (= 8.4.1)
- THEOplayer-Integration-GoogleCast/Dependencies (= 8.4.1)
- THEOplayer-Integration-GoogleCast/Base (8.4.1)
- THEOplayer-Integration-GoogleCast/Dependencies (8.4.1):
- google-cast-sdk-dynamic-xcframework (~> 4.8)
- THEOplayer-Integration-GoogleIMA (8.4.1):
- THEOplayer-Integration-GoogleIMA/Base (= 8.4.1)
- THEOplayer-Integration-GoogleIMA/Dependencies (= 8.4.1)
- THEOplayer-Integration-GoogleIMA/Base (8.4.1)
- THEOplayer-Integration-GoogleIMA/Dependencies (8.4.1):
- GoogleAds-IMA-iOS-SDK (~> 3.18)
- GoogleAds-IMA-tvOS-SDK (~> 4.8)
- THEOplayerSDK-core (8.3.0)
- TinyCSV (0.6.1)
- Yoga (0.0.0)

DEPENDENCIES:
Expand Down Expand Up @@ -1629,14 +1657,23 @@ SPEC REPOS:
trunk:
- ComScore
- ConvivaSDK
- DSFRegex
- google-cast-sdk-dynamic-xcframework
- GoogleAds-IMA-iOS-SDK
- GoogleAds-IMA-tvOS-SDK
- PromisesObjC
- SocketRocket
- Swifter
- SwiftSubtitles
- THEOplayer-Connector-Comscore
- THEOplayer-Connector-Conviva
- THEOplayer-Connector-Nielsen
- THEOplayer-Connector-SideloadedSubtitle
- THEOplayer-Connector-Utilities
- THEOplayer-Integration-GoogleCast
- THEOplayer-Integration-GoogleIMA
- THEOplayerSDK-core
- TinyCSV

EXTERNAL SOURCES:
boost:
Expand Down Expand Up @@ -1790,10 +1827,13 @@ SPEC CHECKSUMS:
ComScore: 3669769a26adf769adddc51ffa34e48ee51a8661
ConvivaSDK: c5d877bf5a830a8dd0b0696c538a11fc96208ec5
DoubleConversion: 00143ab27d470b28035933623e1a3ea37e68889c
DSFRegex: 8493187c71ac199695245eb9ec98bad4f87a2f0b
FBLazyVector: e06894178a2469b6da988d1d4de56aca5a3f90d1
fmt: 1568fa7b2f242362c45c42d4a15e9dd4b2e621b3
glog: 4d211b5b727f9d4542418484bf9945f28b8cb4a5
google-cast-sdk-dynamic-xcframework: d1323732742c979b2d7e5b061cbe665915981f3d
GoogleAds-IMA-iOS-SDK: ee2a68ed7a1a17c7bb81bdb1b81590b35a3fc8f3
GoogleAds-IMA-tvOS-SDK: 85e799c35051454693492480ef7e4ae2e701a05f
hermes-engine: ac68d6c3169772a7a7f9eeb25dbb5ff87930034f
NielsenAppSDK-XC: 8877317bed8261bc6bdcb7d8655f5ba314ba9610
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
Expand Down Expand Up @@ -1827,7 +1867,7 @@ SPEC CHECKSUMS:
React-Mapbuffer: d9594fa247e7866b44249d5e04a68ace76af2841
React-microtasksnativemodule: a3489ca37b515f6f685ec1a86c8df364343ac578
react-native-google-cast: d7bdfd1a0eeba84afde03b9722351ec29543e74c
react-native-theoplayer: 17d8a46df5e3e6e75f9afb96f5d409e5e0384d3d
react-native-theoplayer: 2cab87e2bd4c90083512426b7642612ea7da23c2
react-native-theoplayer-comscore: 8a191ac8ed445b0c36780905e3c03ade036c1afe
react-native-theoplayer-conviva: f68b57dd9158653c0643d3b1c4b8b94b314fe380
react-native-theoplayer-nielsen: d65a269d9245326b8eb4ed6fc6ba76f79bf464f1
Expand Down Expand Up @@ -1860,13 +1900,19 @@ SPEC CHECKSUMS:
RNDeviceInfo: 59344c19152c4b2b32283005f9737c5c64b42fba
RNSVG: af3907ac5d4fa26a862b75a16d8f15bc74f2ceda
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Swifter: e71dd674404923d7f03ebb03f3f222d1c570bc8e
SwiftSubtitles: c659af19d710a2946779015464c0577d07fe4666
THEOplayer-Connector-Comscore: add7f663d556cbe803570a6d3e776d9a076a6375
THEOplayer-Connector-Conviva: 4e7fbfa2859045926ff0dc6e0412c8e7d51b1569
THEOplayer-Connector-Nielsen: cb2d511f62f212d8e7a20660c4a6bfb8508d00a5
THEOplayer-Connector-SideloadedSubtitle: 4b6339abf312f84a5e67bd442ef80b83b8d2f95f
THEOplayer-Connector-Utilities: 0106ae6ea7867d32e83a94c8f4fd3f0c30b22c79
THEOplayer-Integration-GoogleCast: 1b28e5279198d9fabe4131d2a69ff3ef05327e55
THEOplayer-Integration-GoogleIMA: 6c6f0f188b7ded3ed6bcf77b2dbf8028541f51a5
THEOplayerSDK-core: 03e55ca6dfe3f16d52fdc9e4bdc6bff150d63531
Yoga: 07ebe50bd234e51e5e3e07befa14a3078a0fcbbd
TinyCSV: fd6228edbcf1c07466ac34b76dac5e052143eaba
Yoga: 1eb8c4882b3018c344a2ff61c5f2e5c6b1711d82

PODFILE CHECKSUM: f44eee13563fe347754d375fbbe1036dbf27c1d1
PODFILE CHECKSUM: c27acb041e8dae53d7a7bf2fbfef5ffd6f7d6fa0

COCOAPODS: 1.15.2
20 changes: 20 additions & 0 deletions e2e/ios/ReactNativeTHEOplayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -516,15 +516,19 @@
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeTHEOplayer-tvOS/Pods-ReactNativeTHEOplayer-tvOS-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/ComScore/Dynamic/ComScore.framework/ComScore",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/NielsenAppSDK-XC/NielsenAppApi.framework/NielsenAppApi",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayer-Integration-GoogleIMA/Base/THEOplayerGoogleIMAIntegration.framework/THEOplayerGoogleIMAIntegration",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayerSDK-core/THEOplayerSDK.framework/THEOplayerSDK",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAds-IMA-tvOS-SDK/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ComScore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NielsenAppApi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerGoogleIMAIntegration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerSDK.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleInteractiveMediaAds.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -561,15 +565,21 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeTHEOplayer-ReactNativeTHEOplayerTests/Pods-ReactNativeTHEOplayer-ReactNativeTHEOplayerTests-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/ComScore/Dynamic/ComScore.framework/ComScore",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAds-IMA-iOS-SDK/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/NielsenAppSDK-XC/NielsenAppApi.framework/NielsenAppApi",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayer-Integration-GoogleCast/Base/THEOplayerGoogleCastIntegration.framework/THEOplayerGoogleCastIntegration",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayer-Integration-GoogleIMA/Base/THEOplayerGoogleIMAIntegration.framework/THEOplayerGoogleIMAIntegration",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayerSDK-core/THEOplayerSDK.framework/THEOplayerSDK",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/google-cast-sdk-dynamic-xcframework/GoogleCast.framework/GoogleCast",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ComScore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleInteractiveMediaAds.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NielsenAppApi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerGoogleCastIntegration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerGoogleIMAIntegration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerSDK.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleCast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
Expand All @@ -588,15 +598,19 @@
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeTHEOplayer-tvOS-ReactNativeTHEOplayer-tvOSTests/Pods-ReactNativeTHEOplayer-tvOS-ReactNativeTHEOplayer-tvOSTests-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/ComScore/Dynamic/ComScore.framework/ComScore",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/NielsenAppSDK-XC/NielsenAppApi.framework/NielsenAppApi",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayer-Integration-GoogleIMA/Base/THEOplayerGoogleIMAIntegration.framework/THEOplayerGoogleIMAIntegration",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayerSDK-core/THEOplayerSDK.framework/THEOplayerSDK",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAds-IMA-tvOS-SDK/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ComScore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NielsenAppApi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerGoogleIMAIntegration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerSDK.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleInteractiveMediaAds.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -749,15 +763,21 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ReactNativeTHEOplayer/Pods-ReactNativeTHEOplayer-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/ComScore/Dynamic/ComScore.framework/ComScore",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAds-IMA-iOS-SDK/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/NielsenAppSDK-XC/NielsenAppApi.framework/NielsenAppApi",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayer-Integration-GoogleCast/Base/THEOplayerGoogleCastIntegration.framework/THEOplayerGoogleCastIntegration",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayer-Integration-GoogleIMA/Base/THEOplayerGoogleIMAIntegration.framework/THEOplayerGoogleIMAIntegration",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/THEOplayerSDK-core/THEOplayerSDK.framework/THEOplayerSDK",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/google-cast-sdk-dynamic-xcframework/GoogleCast.framework/GoogleCast",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ComScore.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleInteractiveMediaAds.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NielsenAppApi.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerGoogleCastIntegration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerGoogleIMAIntegration.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/THEOplayerSDK.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleCast.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
Expand Down
3 changes: 2 additions & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"start": "npx react-native start",
"test:e2e:android": "npx cavy run-android --terminal bash --mode release",
"test:e2e:ios": "npx cavy run-ios --terminal bash",
"test:e2e:ios": "npx cavy run-ios --terminal bash --scheme ReactNativeTHEOplayer",
"test:e2e:tvos": "npx cavy run-ios --terminal bash --scheme ReactNativeTHEOplayer-tvOS",
"lint": "eslint \"**/*.{ts,tsx}\"",
"postinstall": "patch-package"
},
Expand Down

0 comments on commit 9764e72

Please sign in to comment.