Skip to content

Commit

Permalink
test(ios): ignore non-module errors during Xcode compile
Browse files Browse the repository at this point in the history
libevent is the *worst* at logspew
  • Loading branch information
mikehardy committed Sep 18, 2022
1 parent 20894e3 commit 0c63c9b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions example/ios/Podfile
Expand Up @@ -46,6 +46,15 @@ target 'example' do
config.build_settings["APPLICATION_EXTENSION_API_ONLY"] = "NO"
end
end

# quiet non-module warnings - only interested in our own warnings
installer.pods_project.targets.each do |target|
if !target.name.include? "react-native-device-info"
target.build_configurations.each do |config|
config.build_settings["GCC_WARN_INHIBIT_ALL_WARNINGS"] = "YES"
end
end
end
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Expand Up @@ -528,6 +528,6 @@ SPEC CHECKSUMS:
Yoga: 90dcd029e45d8a7c1ff059e8b3c6612ff409061a
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 7a025c4a2de1e1238f92f7c6a29b270b0563b10d
PODFILE CHECKSUM: ee202433a7e1aae29d4fab8c749862a7022ef062

COCOAPODS: 1.11.3
4 changes: 4 additions & 0 deletions refresh-example.sh
Expand Up @@ -58,6 +58,10 @@ yarn add \
sed -i -e $'s/^ target \'exampleTests\' do/ target \'example-app-extension\' do\\\n inherit! :complete\\\n end\\\n\\\n target \'exampleTests\' do/' ios/Podfile
rm -f ios/Podfile??

# React-native builds on iOS are very noisy with warnings in other packages that drown our warnings out. Reduce warnings to just our packages.
sed -i -e $'s/react_native_post_install(installer)/react_native_post_install(installer)\\\n\\\n # quiet non-module warnings - only interested in our module warnings\\\n installer.pods_project.targets.each do |target|\\\n if !target.name.include? "react-native-device-info"\\\n target.build_configurations.each do |config|\\\n config.build_settings["GCC_WARN_INHIBIT_ALL_WARNINGS"] = "YES"\\\n end\\\n end\\\n end/' ios/Podfile
rm -f ios/Podfile??

# We need to fix a compile problem with "sharedApplication" usage in iOS extensions
# https://stackoverflow.com/questions/52503400/sharedapplication-is-unavailable-not-available-on-ios-app-extension-use-v
sed -i -e $'s/react_native_post_install(installer)/react_native_post_install(installer)\\\n \\\n installer.pods_project.targets.each do |target|\\\n target.build_configurations.each do |config|\\\n # Fix sharedApplication is unavailable: not available on iOS App Extension - Use view controller based solutions where appropriate instead\\\n # https:\/\/stackoverflow.com\/questions\/52503400\/sharedapplication-is-unavailable-not-available-on-ios-app-extension-use-v\\\n config.build_settings["APPLICATION_EXTENSION_API_ONLY"] = "NO"\\\n end\\\n end/' ios/Podfile
Expand Down

0 comments on commit 0c63c9b

Please sign in to comment.