Skip to content

Commit

Permalink
Fix MacCatalyst archiving for stand-alone pod (#1585)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1585

When used alone, yoga has no visibility over the USE_FRAMEWORKS variable set by React Native.

In this case, there is no other way to know whether the current target that will install the spec is using use_framewors or not. As a failsafe, condition, let's always add the `"$(PODS_TARGET_SRCROOT)"` to the search paths to make sure that archiving won't fail.

Whe used in other context, that should not be a problem: search paths are just directory Xcode uses to find headers that are needed.

Reviewed By: NickGerleman

Differential Revision: D54417386

fbshipit-source-id: aa2ae41c077e4346c0417c73291a37c992a06b58
  • Loading branch information
cipolleschi authored and NickGerleman committed Mar 5, 2024
1 parent efbebb4 commit 59fb251
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Yoga.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ Pod::Spec.new do |spec|
spec.module_name = 'yoga'
spec.requires_arc = false
spec.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES'
}.merge!(ENV['USE_FRAMEWORKS'] != nil ? {
'HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)"'
} : {})
'DEFINES_MODULE' => 'YES',
'HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)"',
}

spec.compiler_flags = [
'-fno-omit-frame-pointer',
Expand Down

0 comments on commit 59fb251

Please sign in to comment.