8

This is a follow-up to this question: possible to have a CocoaPods have a search path that includes the main app

I'd like to add add a User Header Search Path to my .podspec so that it is added when I compile but I'm not sure how to do this so that it's effect is like this:

enter image description here

Community
  • 1
  • 1
timpone
  • 19,235
  • 36
  • 121
  • 211

1 Answers1

12

Add this code to your .podspec file:

s.xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '"${PROJECT_DIR}/.."' }

To set path recursive:

s.xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '"${PROJECT_DIR}/.."/**' }

I did Google and this issue on GitHub helped me.

Tong
  • 870
  • 10
  • 19
  • 4
    See https://guides.cocoapods.org/syntax/podspec.html#pod_target_xcconfig It seems attribute xcconfig has been deprecated, use pod_target_xcconfig instead. – makeroo Feb 01 '19 at 16:07