Skip to content

Commit cf422bd

Browse files
committed
Trying and failing to get macOS app to build
1 parent 823e5d8 commit cf422bd

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

Diff for: example/macos/Podfile

+21-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,24 @@ require "#{ws_dir}/node_modules/react-native-test-app/macos/test_app.rb"
66

77
workspace 'SafeAreaContextExample.xcworkspace'
88

9-
use_test_app!
9+
my_post_install_function = ->(installer) {
10+
puts "Running custom post_install with installer: #{installer}"
11+
installer.pods_project.targets.each do |target|
12+
case target.name
13+
when "react-native-safe-area-context"
14+
target.build_configurations.each do |config|
15+
# For some reason it gets set as 10.6 if we don't do this.
16+
config.build_settings[MACOSX_DEPLOYMENT_TARGET] = '10.15'
17+
end
18+
when /\AReact/, /\ARCT/
19+
target.build_configurations.each do |config|
20+
config.build_settings['CLANG_ENABLE_OBJC_WEAK'] = 'YES'
21+
config.build_settings['CLANG_ENABLE_OBJC_ARC'] = 'YES'
22+
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'C++20'
23+
end
24+
else
25+
end
26+
end
27+
}
28+
29+
use_test_app!({ post_install: my_post_install_function })

Diff for: example/macos/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,6 @@ SPEC CHECKSUMS:
12641264
SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9
12651265
Yoga: 0981416dc6fbb2dec0c45125877c6f1251e4fc09
12661266

1267-
PODFILE CHECKSUM: e8a85ab345b03128aa1bf55196a7fffe29cf0fba
1267+
PODFILE CHECKSUM: 03e3a5c42cd4bee8e11309360dd432fd5b160e62
12681268

12691269
COCOAPODS: 1.14.3

0 commit comments

Comments
 (0)