diff --git a/android/gradle.properties b/android/gradle.properties index 0edfe29f..f584c99c 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,8 +1,8 @@ android.useAndroidX=true BitmovinPlayerReactNative_kotlinVersion=1.7.0 BitmovinPlayerReactNative_minSdkVersion=21 -BitmovinPlayerReactNative_targetSdkVersion=31 -BitmovinPlayerReactNative_compileSdkVersion=31 +BitmovinPlayerReactNative_targetSdkVersion=33 +BitmovinPlayerReactNative_compileSdkVersion=33 BitmovinPlayerReactNative_ndkversion=21.4.7075529 BitmovinPlayerReactNative_androidToolsVersion=7.4.2 BitmovinPlayerReactNative_ktlintVersion=11.6.0 diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 719f33f2..403035a8 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -689,7 +689,7 @@ SPEC CHECKSUMS: BitmovinAnalyticsCollector: b3bf447e609a87d41e51a7c029cb16a3bcb3404c BitmovinPlayer: 920ee8a7df47dc09a038a44a36b24b0c31427ad8 BitmovinPlayerCore: 0040c6c171079ae1a1342baab182c7956deaf6d8 - boost: 0ed1b9a58a27b2f7885dc9f279bc3b341f44512b + boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 234abba95e31cc2aada0cf3b97cdb11bc5b90575 FBLazyVector: 58c22987e2cd1eebb2e3bc9f7756d87b14c32d3c @@ -703,7 +703,7 @@ SPEC CHECKSUMS: Flipper-PeerTalk: c41cddbfcfa98abeebd9c8503eb94d204a145c01 FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6 fmt: 135c0c55547979f715b56dfa54037ececa96d07a - glog: a2ded9bf28f0cb2fce90ad21eb419299a500ff6c + glog: bac6d5aa2990176cc22d0432fb3e28805d580aeb google-cast-sdk: afeb1aac0744b1bc4f70bc3db8468e33fabbff38 GoogleAds-IMA-iOS-SDK: b01284e3bf3d64ba948de6692ffda531452c3713 GoogleAds-IMA-tvOS-SDK: 2dda9d3b34c43003222d3417315fecec22b698a1 diff --git a/integration_test/android/app/build.gradle b/integration_test/android/app/build.gradle index a5879185..e211b165 100644 --- a/integration_test/android/app/build.gradle +++ b/integration_test/android/app/build.gradle @@ -101,6 +101,9 @@ android { proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } + buildFeatures { + buildConfig true + } } dependencies { diff --git a/integration_test/android/build.gradle b/integration_test/android/build.gradle index 34ea7181..2b9a3e8f 100644 --- a/integration_test/android/build.gradle +++ b/integration_test/android/build.gradle @@ -19,3 +19,11 @@ buildscript { classpath("com.facebook.react:react-native-gradle-plugin") } } + +allprojects { + repositories { + google() + mavenCentral() + maven { url 'https://artifacts.bitmovin.com/artifactory/public-releases' } + } +} diff --git a/integration_test/ios/Podfile b/integration_test/ios/Podfile index 5a758a48..cbe9db61 100644 --- a/integration_test/ios/Podfile +++ b/integration_test/ios/Podfile @@ -1,43 +1,41 @@ -# Resolve react_native_pods.rb with node to allow for hoisting -require Pod::Executable.execute_command('node', ['-p', - 'require.resolve( - "react-native/scripts/react_native_pods.rb", - {paths: [process.argv[1]]}, - )', __dir__]).strip +require_relative '../node_modules/react-native/scripts/react_native_pods' +require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' source 'https://cdn.cocoapods.org' source 'https://github.com/bitmovin/cocoapod-specs.git' source 'https://github.com/react-native-tvos/react-native-tvos-podspecs.git' -platform :ios, 14.0 prepare_react_native_project! -# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. -# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded -# -# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` -# ```js -# module.exports = { -# dependencies: { -# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), -# ``` -flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled - -linkage = ENV['USE_FRAMEWORKS'] -if linkage != nil - Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green - use_frameworks! :linkage => linkage.to_sym -end +def setup os + inhibit_all_warnings! + platform os, '14.0' + + # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. + # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded + # + # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` + # ```js + # module.exports = { + # dependencies: { + # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), + # ``` + flipper_config = (ENV['NO_FLIPPER'] == "1" || os != :ios) ? FlipperConfiguration.disabled : FlipperConfiguration.enabled + linkage = ENV['USE_FRAMEWORKS'] + if linkage != nil + Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green + use_frameworks! :linkage => linkage.to_sym + end -target 'IntegrationTest' do config = use_native_modules! # Flags change depending on the env values. flags = get_default_flags() use_react_native!( - :path => config[:reactNativePath], # Hermes is now enabled by default. Disable by setting this flag to false. + # Upcoming versions of React Native may rely on get_default_flags(), but + # we make it explicit here to aid in the React Native upgrade process. :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], # Enables Flipper. @@ -45,17 +43,60 @@ target 'IntegrationTest' do # Note that if you have use_frameworks! enabled, Flipper will not work and # you should disable the next line. :flipper_configuration => flipper_config, + :path => config[:reactNativePath], # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) - post_install do |installer| - # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 - react_native_post_install( - installer, - config[:reactNativePath], - :mac_catalyst_enabled => false - ) - __apply_Xcode_12_5_M1_post_install_workaround(installer) + pod 'RNBitmovinPlayer', :path => '../..' +end + +target 'IntegrationTest' do + setup :ios +end + +post_install do |installer| + react_native_post_install( + installer, + # Set `mac_catalyst_enabled` to `true` in order to apply patches + # necessary for Mac Catalyst builds + :mac_catalyst_enabled => false + ) + __apply_Xcode_12_5_M1_post_install_workaround(installer) + fix_simulator_run(installer) + fix_deployment_target(installer) +end + +def fix_simulator_run(installer) + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" + config.build_settings["EXCLUDED_ARCHS[sdk=appletvsimulator*]"] = "i386" + end + end +end + +def fix_deployment_target(installer) + return if !installer + project = installer.pods_project + project_deployment_target_iOS = project.build_configurations.first.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] + project_deployment_target_tvOS = project.build_configurations.first.build_settings['TVOS_DEPLOYMENT_TARGET'] + + project.targets.each do |target| + target.build_configurations.each do |config| + old_target_iOS = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] + unless old_target_iOS.nil? + new_target_iOS = project_deployment_target_iOS + next if old_target_iOS.to_f >= new_target_iOS.to_f + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = new_target_iOS + end + + old_target_tvOS = config.build_settings['TVOS_DEPLOYMENT_TARGET'] + unless old_target_tvOS.nil? + new_target_tvOS = project_deployment_target_tvOS + next if old_target_tvOS.to_f >= new_target_tvOS.to_f + config.build_settings['TVOS_DEPLOYMENT_TARGET'] = new_target_tvOS + end + end end end diff --git a/integration_test/ios/Podfile.lock b/integration_test/ios/Podfile.lock index 5e08fd31..686ccbdd 100644 --- a/integration_test/ios/Podfile.lock +++ b/integration_test/ios/Podfile.lock @@ -712,6 +712,6 @@ SPEC CHECKSUMS: Yoga: f67f5769ce78049c5fe798bc735f04535c7bc1ac YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: afaa2640108ac92f896f56a73e10de24b4615bbf +PODFILE CHECKSUM: efb7f1c40473f922252918b9e92257abe9726124 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.2