Cocoapods: what for "inherit! :search_paths" ?

Created on 8 Mar 2017  路  6Comments  路  Source: CocoaPods/CocoaPods

i don't understand when should i use inherit! :search_paths ? or how can i check the difference between none / search_paths / complete ?

all i got is:

inheritance Symbol The inheritance mode to set.
Available Modes: + :complete The target inherits all behaviour from the parent. + :none The target inherits none of the behaviour from the parent. + :search_paths The target inherits the search paths of the parent only.

but when i test code:
target 'CocoaPodsTest' do pod 'Mantle', :configuration => 'Debug' target 'CocoaPodsTestTests' do inherit! :search_paths #none #search_paths # complete end end
when i use one of inherit! : #none #search_paths #complete , nothing different when i run unit test code:
````ObjC

import

import

@interface CocoaPodsTestTests : XCTestCase
@end
````

CocoaPods veriosn 1.1.1

Most helpful comment

@goodyboy6 you use inherit! search_paths for targets that you want to be able to use imports but not directly link dependencies. This is primarily used for test targets that use the app as the app host.

See this also http://stackoverflow.com/questions/37060065/what-does-inherit-search-paths-do

I am going to close this issue as its not a CocoaPods bug or enhancement.

All 6 comments

Can you please provide a full sample project?

Also what version of CocoaPods? Can you please try 1.2.1.beta.1?

can you close issue?

@dnkoutso my question is updated~

@goodyboy6 I still don't understand if there is an actual problem or are you asking a question?

@goodyboy6 you use inherit! search_paths for targets that you want to be able to use imports but not directly link dependencies. This is primarily used for test targets that use the app as the app host.

See this also http://stackoverflow.com/questions/37060065/what-does-inherit-search-paths-do

I am going to close this issue as its not a CocoaPods bug or enhancement.

Was this page helpful?
0 / 5 - 0 ratings