From cf422bdb43206aab09a88ccac72b7730b7ff4e9c Mon Sep 17 00:00:00 2001 From: shirakaba <14055146+shirakaba@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:03:07 +0900 Subject: [PATCH] Trying and failing to get macOS app to build --- example/macos/Podfile | 22 +++++++++++++++++++++- example/macos/Podfile.lock | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/example/macos/Podfile b/example/macos/Podfile index 78495e8..a9ec924 100644 --- a/example/macos/Podfile +++ b/example/macos/Podfile @@ -6,4 +6,24 @@ require "#{ws_dir}/node_modules/react-native-test-app/macos/test_app.rb" workspace 'SafeAreaContextExample.xcworkspace' -use_test_app! +my_post_install_function = ->(installer) { + puts "Running custom post_install with installer: #{installer}" + installer.pods_project.targets.each do |target| + case target.name + when "react-native-safe-area-context" + target.build_configurations.each do |config| + # For some reason it gets set as 10.6 if we don't do this. + config.build_settings[MACOSX_DEPLOYMENT_TARGET] = '10.15' + end + when /\AReact/, /\ARCT/ + target.build_configurations.each do |config| + config.build_settings['CLANG_ENABLE_OBJC_WEAK'] = 'YES' + config.build_settings['CLANG_ENABLE_OBJC_ARC'] = 'YES' + config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'C++20' + end + else + end + end +} + +use_test_app!({ post_install: my_post_install_function }) \ No newline at end of file diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock index f21b84d..160c2de 100644 --- a/example/macos/Podfile.lock +++ b/example/macos/Podfile.lock @@ -1264,6 +1264,6 @@ SPEC CHECKSUMS: SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9 Yoga: 0981416dc6fbb2dec0c45125877c6f1251e4fc09 -PODFILE CHECKSUM: e8a85ab345b03128aa1bf55196a7fffe29cf0fba +PODFILE CHECKSUM: 03e3a5c42cd4bee8e11309360dd432fd5b160e62 COCOAPODS: 1.14.3