Trying to build a Cocoapod library which is dependant of other published Cocoapod library I own, got the project in XCode to build OK, but running pod lib lint
command for checking pod validity fails with
error: include of non-modular header inside framework module
on the header files of the library (pod) I'm depending on. All source is Obj-C not Swift.
I did try the following, according to the recommendations found here
- Setting the header files of the dependant library as
public
instead ofproject
- Setting
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
for each target - verifying that the relevant headers in build phases are under
public
.
but problem persists, I cannot publish the pod nor test it.
Update
when I comment out the
s.dependency 'OldPodIDependOn'
line in my podspec file of my new pod then error disappears but the dependent headers are not found. if I do not include the pod I depend on in the Podfile
under the ./Example
folder, like so:
target 'NewPod', :exclusive => true do
pod "NewPod", :path => "../"
pod "OldPodIDependOn", :path => "../../OldPodIDependOn/"
end
then project will just not build in XCode since the OldPodIDependOn
files are not part of the project. Got a bit of a chicken-or-the-egg problem.
Update 2
Also tried removing the :path => "../../OldPodIDependOn/"
component to reference the pod that has been published instead of a local one - doesn't help.
Worth mentioning that this pod will include a UI hence a storyboard will be included and referenced, I added s.resources = 'Pod/Classes/UI/NewPod.storyboard'
line to the podspec file, and removed the storyboard from the pod target compile sources (otherwise xcode won't build). I don't think that this has something to do with the problem but worth mentioning, maybe I'm doing something wrong in there.
What am I doing wrong? Any help will be greatly appreciated!