12

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 ?

Community
  • 1
  • 1
the_critic
  • 12,720
  • 19
  • 67
  • 115

1 Answers1

2

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

Community
  • 1
  • 1
A.C. Wright
  • 921
  • 9
  • 21
  • It seems that `sqlite3.h` is not in Parse's public `.h` files anymore, but the problem is still there. `Searching for "sqlite3.h" in . ./Pods/Parse/Parse/Internal/LocalDataStore/SQLite/PFSQLiteDatabase.m:13:#import ./Pods/Parse/Parse/Internal/LocalDataStore/SQLite/PFSQLiteDatabaseResult.m:12:#import ./Pods/Parse/Parse/Internal/LocalDataStore/SQLite/PFSQLiteStatement.m:12:#import ./Pods/Parse/Parse/Internal/PFDateFormatter.m:12:#import ` – superarts.org Dec 19 '15 at 09:05
  • Good to know. Then I'm guessing that there may still be another Objective-C or C library being included in one of Parse's .h header files that is still causing the "include of non-modular header" error if you are still seeing this error. – A.C. Wright Dec 19 '15 at 16:33
  • Yes, and since it can be reproduced by starting from `pod lib create xxx`, I've created an issue in github for Parse's reference: https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/673 – superarts.org Dec 19 '15 at 23:05
  • really helpful answer save my time – Vijay Masal Dec 15 '17 at 11:04