Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 '[email protected]: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 ?

like image 458
the_critic Avatar asked Oct 21 '15 14:10

the_critic


1 Answers

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

like image 70
A.C. Wright Avatar answered Sep 28 '22 10:09

A.C. Wright