Skip to content

Commit

Permalink
fix(playground): Xcode 15.3 compliance. (#7861)
Browse files Browse the repository at this point in the history
* fix(playground): add Xcode 15.3 compliance workaround on Podfile.

See issue & resolution on React Native project repo:
facebook/react-native#43335

* fix(playground): remove obsolete (& redundant) team signing.

* chore: bump `react-native-reanimated` version.

* fix(playground): apply workaround for Xcode 15.

See:
facebook/react-native#37748 (comment)
  • Loading branch information
asafkorem committed Mar 20, 2024
1 parent 8a31c1f commit 4b48f75
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -228,4 +228,4 @@
}
}
}
}
}
26 changes: 26 additions & 0 deletions playground/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <functional>')
File.open(file_path, 'w') do |file|
file.puts('#include <functional>')
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
Expand Down
5 changes: 2 additions & 3 deletions playground/ios/playground.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,6 @@
};
E58D261A238587F4003F36BA = {
CreatedOnToolsVersion = 11.2.1;
DevelopmentTeam = S3GLW74Y8N;
ProvisioningStyle = Automatic;
TestTargetID = 13B07F861A680F5B00A75B9A;
};
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4b48f75

Please sign in to comment.