Skip to content

Commit

Permalink
chore: fix flipper pod compilation with pika 15.3 toolchain (#11080)
Browse files Browse the repository at this point in the history
add pod post install script to include required import 
see more
facebook/flipper@b3dcdb8

facebook/react-native#43335 (comment)

NOTE: to install ios pods run `yarn pod:install`. It will execute `
bundle exec pod install --project-directory=ios` within the project root
directory.
Running  `pod install`  inside `ios` folder will error out
  • Loading branch information
joaoloureirop committed Sep 6, 2024
1 parent e54b3e6 commit 976e7f4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,26 @@ target 'MetaMask-Flask' do
end

post_install do |installer|
# fix flipper with pika 15.3 toolchain
installer.pods_project.targets.each do |target|
if target.name == 'Flipper'
file_path = 'ios/Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
system("chmod +w " + file_path)
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

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)
end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"watch": "./scripts/build.sh watcher watch",
"watch:clean": "./scripts/build.sh watcher clean",
"clean:ios": "rm -rf ios/build",
"pod:install": "command -v pod && (cd ios/ && bundle exec pod install && cd ..) || echo \"Skipping pod install\"",
"pod:install": "command -v pod && bundle exec pod install --project-directory=ios || echo \"pod command not found. Skipping pod install\"",
"clean:ppom": "rm -rf ppom/dist ppom/node_modules app/lib/ppom/ppom.html.js",
"clean:android": "rm -rf android/app/build",
"clean:node": "rm -rf node_modules && yarn --frozen-lockfile",
Expand Down

0 comments on commit 976e7f4

Please sign in to comment.