From 1181079df52aada4ed20173616317cde441f4e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= Date: Wed, 11 May 2022 15:49:48 -0700 Subject: [PATCH] Remove Pod::UI undefined symbol warning during Hermes build Summary: The `utils/build-apple-framework.sh` script uses the ruby runtime to load `hermes-engine.podspec`, and in the process it will load the Core CocoaPods gem to parse the podspec file. Since the podspec file uses Pod::UI to print logs, and the CoreUI gem is not loaded when `build-apple-framework.sh` accesses `hermes-engine.podspec`, we would get a warning due to Pod::UI not being defined. This change will only use Pod::UI when it is defined, therefore limiting it to only executing when `hermes-engine.podspec` is loaded as part of the normal `pod install` build process. Changelog: [Internal] Reviewed By: cortinico, neildhar Differential Revision: D36297856 fbshipit-source-id: ac1ab021f74f9dcaa7be2a2358482c73b827b756 --- sdks/hermes-engine/hermes-engine.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/hermes-engine/hermes-engine.podspec b/sdks/hermes-engine/hermes-engine.podspec index 3f6594d5a52..f98e0486bce 100644 --- a/sdks/hermes-engine/hermes-engine.podspec +++ b/sdks/hermes-engine/hermes-engine.podspec @@ -16,7 +16,7 @@ module HermesHelper BUILD_TYPE = :release end -Pod::UI.puts '[Hermes] Hermes needs to be compiled, installing hermes-engine may take a while...'.yellow +Pod::UI.puts '[Hermes] Hermes needs to be compiled, installing hermes-engine may take a while...'.yellow if Object.const_defined?("Pod::UI") Pod::Spec.new do |spec| spec.name = "hermes-engine"