CocoaPods framework with dependencies - include of non-modular header inside framework module

家住魔仙堡 提交于 2019-12-23 07:03:29

问题


I am trying to build a private CocoaPods framework with other pod dependencies.

Among others, I added Parse as a dependency in the podspec file:

s.dependency 'Parse'

However, when I try to lint it,

pod lib lint MyPrivateSpec.podspec  --verbose --sources 'git@bitbucket.org:MY_BITBUCKET_NAME/specs.git,https://github.com/CocoaPods/Specs'

I get the following errors:

Target Support Files/Parse/Parse-umbrella.h:3:9: note: in file included from Target Support Files/Parse/Parse-umbrella.h:3:

ERROR | xcodebuild: Parse/Parse/Parse.h:12:9: error: include of non-modular header inside framework module 'Parse.Parse'

[and more of these types of errors in the following lines ...]

I looked at virtually every relevant question asked on SO and in github issues, but I could not find anything that worked for me. Has anybody experienced these issues, or is familiar with why this does not work ?


回答1:


This is unfortunately a problem with the Parse library itself. I ran into a similar situation a while back when I was trying to use the Parse library inside a framework I was building for iOS.

What the error means is that there is a header included in one of Parse's public .h files that does not belong to a module. In Parse's case this is <sqlite3.h> if I remember correctly. Without removing this from Parse's public headers it will not be possible to build a framework target that also includes Parse. This should be filed as a bug with Parse so they could work on an upgrade to support modular framework builds.

Due to the need for my project to build a framework target I had to pass on using Parse in my project as a result of the above.

Here is a reference to a similar problem with similar answer: https://stackoverflow.com/a/24728646/296708



来源:https://stackoverflow.com/questions/33261967/cocoapods-framework-with-dependencies-include-of-non-modular-header-inside-fra

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