Skip to content

Commit

Permalink
fix(playground): add Xcode 15.3 compliance workaround on Podfile.
Browse files Browse the repository at this point in the history
See issue & resolution on React Native project repo:
facebook/react-native#43335
  • Loading branch information
asafkorem committed Mar 20, 2024
1 parent 8a31c1f commit a21bc66
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 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,21 @@ 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

target 'playground' do
all_pods
end
Expand Down

0 comments on commit a21bc66

Please sign in to comment.