Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matamegger committed Mar 1, 2024
1 parent f5b5c96 commit 648d52f
Show file tree
Hide file tree
Showing 18 changed files with 148 additions and 227 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-ios-tvos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3'
xcode-version: '15.2'

- name: Install dependencies
run: brew bundle install
Expand All @@ -69,7 +69,7 @@ jobs:

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3'
xcode-version: '15.2'

- name: Install node_modules
run: yarn install --frozen-lockfile
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3'
xcode-version: '15.2'

- name: Install node_modules
run: yarn install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');
const pak = require('../package.json');

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['@react-native/babel-preset'],
plugins: [
[
'module-resolver',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
buildPhases = (
5E3559E12AFFB82ED8822C46 /* [CP] Check Pods Manifest.lock */,
A8979BB02ADD2D9500821960 /* SwiftLint */,
A86B2E732B0E17CB00927859 /* Start Packager */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
Expand All @@ -182,7 +181,6 @@
buildPhases = (
3D81CB9D0E05C6D400C2E01A /* [CP] Check Pods Manifest.lock */,
A8979BB12ADD2DB500821960 /* SwiftLint */,
A86B2E742B0E17F300927859 /* Start Packager */,
4CE382EA28BFD10C002DDF82 /* Sources */,
4CE382EB28BFD10C002DDF82 /* Frameworks */,
4CE382EC28BFD10C002DDF82 /* Resources */,
Expand Down Expand Up @@ -281,7 +279,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
shellScript = "set -e\n\nexport SKIP_BUNDLING=true\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
showEnvVarsInLog = 0;
};
2C9AF44BCA3409CD3FDD5056 /* [CP] Embed Pods Frameworks */ = {
Expand Down Expand Up @@ -354,7 +352,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
shellScript = "set -e\n\nexport SKIP_BUNDLING=true\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
};
5E3559E12AFFB82ED8822C46 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -452,44 +450,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-BitmovinPlayerReactNativeExample/Pods-BitmovinPlayerReactNativeExample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
A86B2E732B0E17CB00927859 /* Start Packager */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Start Packager";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
};
A86B2E742B0E17F300927859 /* Start Packager */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Start Packager";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
};
A8979BB02ADD2D9500821960 /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
Expand Down Expand Up @@ -571,7 +531,7 @@
baseConfigurationReference = A8DB69412B31B5DB00BAD718 /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
Expand Down Expand Up @@ -599,7 +559,7 @@
baseConfigurationReference = A8DB69422B31B5DB00BAD718 /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
Expand Down Expand Up @@ -628,7 +588,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
Expand Down Expand Up @@ -665,7 +625,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
Expand Down
13 changes: 5 additions & 8 deletions example/ios/BitmovinPlayerReactNativeExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
Expand Down
13 changes: 0 additions & 13 deletions example/patches/react-native+0.73.4-0.patch

This file was deleted.

18 changes: 10 additions & 8 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export type RootStackParamsList = {
navigation: NativeStackNavigationProp<RootStackParamsList>;
};
SubtitlePlayback: undefined;
ProgrammaticTrackSelection: undefined;
CustomPlaybackForm: undefined;
OfflinePlayback: undefined;
CustomPlayback: {
Expand All @@ -56,9 +57,10 @@ export type RootStackParamsList = {
navigation: NativeStackNavigationProp<RootStackParamsList>;
};
Casting: undefined;
SystemUI: undefined;
};

const RootStack = createNativeStackNavigator();
const RootStack = createNativeStackNavigator<RootStackParamsList>();

const isTVOS = Platform.OS === 'ios' && Platform.isTV;

Expand All @@ -81,31 +83,31 @@ export default function App() {
data: [
{
title: 'Basic playback',
routeName: 'BasicPlayback',
routeName: 'BasicPlayback' as keyof RootStackParamsList,
},
{
title: 'Basic Analytics',
routeName: 'BasicAnalytics',
routeName: 'BasicAnalytics' as keyof RootStackParamsList,
},
{
title: 'Basic Drm playback',
routeName: 'BasicDrmPlayback',
routeName: 'BasicDrmPlayback' as keyof RootStackParamsList,
},
{
title: 'Subtitle and captions',
routeName: 'SubtitlePlayback',
routeName: 'SubtitlePlayback' as keyof RootStackParamsList,
},
{
title: 'Basic Picture in Picture',
routeName: 'BasicPictureInPicture',
routeName: 'BasicPictureInPicture' as keyof RootStackParamsList,
},
{
title: 'Basic Ads',
routeName: 'BasicAds',
routeName: 'BasicAds' as keyof RootStackParamsList,
},
{
title: 'Programmatic Track Selection',
routeName: 'ProgrammaticTrackSelection',
routeName: 'ProgrammaticTrackSelection' as keyof RootStackParamsList,
},
],
};
Expand Down
5 changes: 4 additions & 1 deletion example/src/screens/CustomPlaybackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ const initialFormState = {
playDisabled: true,
};

type CustomPlaybackFormProps = NativeStackScreenProps<RootStackParamsList>;
type CustomPlaybackFormProps = NativeStackScreenProps<
RootStackParamsList,
'CustomPlaybackForm'
>;

const CustomPlaybackForm: React.FC<CustomPlaybackFormProps> = ({
navigation,
Expand Down
1 change: 1 addition & 0 deletions example/src/screens/ExamplesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const ExamplesList: React.FC<ExamplesListProps> = ({ route, navigation }) => (
<ExampleItem
title={item.title}
onPress={() => {
// @ts-ignore
navigation.navigate(item.routeName);
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.app.Application;

import com.bitmovin.player.reactnative.integrationtest.BuildConfig;
import com.bitmovin.player.reactnative.integrationtest.ReactNativeFlipper;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
Expand Down
2 changes: 1 addition & 1 deletion integration_test/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');
const pak = require('../package.json');

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['@react-native/babel-preset'],
plugins: [
[
'module-resolver',
Expand Down
26 changes: 4 additions & 22 deletions integration_test/ios/IntegrationTest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "IntegrationTest" */;
buildPhases = (
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
FD10A7F022414F080027D42C /* Start Packager */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
Expand Down Expand Up @@ -241,25 +240,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IntegrationTest/Pods-IntegrationTest-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FD10A7F022414F080027D42C /* Start Packager */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Start Packager";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -388,7 +368,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
Expand All @@ -406,6 +386,7 @@
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
Expand Down Expand Up @@ -461,7 +442,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
Expand All @@ -478,6 +459,7 @@
"-DFOLLY_NO_CONFIG",
"-DFOLLY_MOBILE=1",
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
Expand Down
13 changes: 5 additions & 8 deletions integration_test/ios/IntegrationTest/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
Expand Down
4 changes: 2 additions & 2 deletions integration_test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/metro-config": "^0.73.5",
"@types/cavy": "^3.2.7",
"@types/cavy": "^3.2.9",
"babel-plugin-module-resolver": "^5.0.0",
"cavy-cli": "^3.0.0",
"@react-native/babel-preset": "0.73.18",
Expand All @@ -39,6 +39,6 @@
"node": ">=18"
},
"resolutions": {
"@types/react": "~17.0.21"
"@types/react": "^18.0.0"
}
}
Loading

0 comments on commit 648d52f

Please sign in to comment.