possible to have a CocoaPods have a search path that includes the main app

两盒软妹~` 提交于 2019-12-04 07:27:23

If what you are looking for is a way to access some header file(for config data) in your MainApp project from any Pod project, than the issue is just about providing proper path variable in pods project.

Just add

"$(PROJECT_DIR)/.."

along with the quotes to the User Header Search Paths entry build settings, and don't forget to select recursive.

This will allow the header search visibility of Pod to be extend to main project without changing the podfile.

Sample:

If you just want to read values for a configuration probably the best way is to have some plist file and then check from the pod if that exist in the bundle or default to the one in the pod.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!