Skip to content

Commit

Permalink
Trying and failing to get macOS app to build
Browse files Browse the repository at this point in the history
  • Loading branch information
shirakaba committed Jul 24, 2024
1 parent 823e5d8 commit cf422bd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion example/macos/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
2 changes: 1 addition & 1 deletion example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,6 @@ SPEC CHECKSUMS:
SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9
Yoga: 0981416dc6fbb2dec0c45125877c6f1251e4fc09

PODFILE CHECKSUM: e8a85ab345b03128aa1bf55196a7fffe29cf0fba
PODFILE CHECKSUM: 03e3a5c42cd4bee8e11309360dd432fd5b160e62

COCOAPODS: 1.14.3

0 comments on commit cf422bd

Please sign in to comment.