I am creating a pod that uses RestKit and a bunch of other pods.
When I am compiling my pod with the command :
pod repo push myCocoapodsRepo myPodspec.podspec --allow-warnings --verbose
The first error I get is
In file included from /var/folders/mx/cg3cmvh14wl2f3mnq0sc_cd00000gn/T/CocoaPods/Lint/Pods/RestKit/Code/ObjectMapping.h:21:
/var/folders/mx/cg3cmvh14wl2f3mnq0sc_cd00000gn/T/CocoaPods/Lint/Pods/RestKit/Code/ObjectMapping/RKObjectMapping.h:23:9: error: include of non-modular header inside framework module 'RestKit.RKObjectMapping' [-Werror,-Wnon-modular-include-in-framework-module]
#import "RKValueTransformers.h"
^
If I rely on other StackOverflow threads about this error, like
They will all say that setting CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES
to YES
and/or placing the problematic header file in the Public
section instead of the Project
section, it will solve the problem. But for me, it does not. Those threads also have in common the Swift language, but I do not use it. I'm still using only Objective-C, but I don't know if it has an impact on my problem.
I do not understand what the error means, therefore I have a lot of difficulty solving the problem. Does someone have another solution?
You should add the flag --use-libraries like this:
pod repo push myCocoapodsRepo myPodspec.podspec --allow-warnings --verbose --use-libraries
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With