From 4b48f75ae5e3b319d6243362bbf77f769d50990e Mon Sep 17 00:00:00 2001 From: Asaf Korem <55082339+asafkorem@users.noreply.github.com> Date: Wed, 20 Mar 2024 17:26:16 +0200 Subject: [PATCH] fix(playground): Xcode 15.3 compliance. (#7861) * fix(playground): add Xcode 15.3 compliance workaround on Podfile. See issue & resolution on React Native project repo: https://github.com/facebook/react-native/issues/43335 * fix(playground): remove obsolete (& redundant) team signing. * chore: bump `react-native-reanimated` version. * fix(playground): apply workaround for Xcode 15. See: https://github.com/facebook/react-native/issues/37748#issuecomment-1580589448 --- package.json | 4 +-- playground/ios/Podfile | 26 +++++++++++++++++++ .../ios/playground.xcodeproj/project.pbxproj | 5 ++-- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 379db470af..4710492823 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "react-native": "0.72.3", "react-native-fast-image": "^8.6.3", "react-native-gesture-handler": "^2.10.1", - "react-native-reanimated": "3.4.1", + "react-native-reanimated": "^3.8.1", "react-native-ui-lib": "7.3.6", "react-redux": "5.x.x", "react-test-renderer": "18.2.0", @@ -228,4 +228,4 @@ } } } -} \ No newline at end of file +} diff --git a/playground/ios/Podfile b/playground/ios/Podfile index b3cfcfd18b..57d344ef9d 100644 --- a/playground/ios/Podfile +++ b/playground/ios/Podfile @@ -38,7 +38,10 @@ def all_pods end post_install do |installer| + __apply_Xcode_15_3_flipper_post_install_workaround(installer) + react_native_post_install(installer, "../../node_modules/react-native", :mac_catalyst_enabled => false) + __apply_Xcode_12_5_M1_post_install_workaround(installer) # This is to resolve "'shared_timed_mutex' is unavailable: introduced in iOS 10.0" error @@ -49,6 +52,29 @@ post_install do |installer| end end +def __apply_Xcode_15_3_flipper_post_install_workaround(installer) + installer.pods_project.targets.each do |target| + if target.name == 'Flipper' + file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h' + contents = File.read(file_path) + unless contents.include?('#include ') + File.open(file_path, 'w') do |file| + file.puts('#include ') + file.puts(contents) + end + end + end + end +end + +def __apply_Xcode_15_unary_binary_error_workaround(installer) + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION'] + end + end +end + target 'playground' do all_pods end diff --git a/playground/ios/playground.xcodeproj/project.pbxproj b/playground/ios/playground.xcodeproj/project.pbxproj index c6348611bb..2e0284b4ab 100644 --- a/playground/ios/playground.xcodeproj/project.pbxproj +++ b/playground/ios/playground.xcodeproj/project.pbxproj @@ -569,7 +569,6 @@ }; E58D261A238587F4003F36BA = { CreatedOnToolsVersion = 11.2.1; - DevelopmentTeam = S3GLW74Y8N; ProvisioningStyle = Automatic; TestTargetID = 13B07F861A680F5B00A75B9A; }; @@ -1571,7 +1570,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = S3GLW74Y8N; + DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = NavigationTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1599,7 +1598,7 @@ CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = S3GLW74Y8N; + DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = NavigationTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0;