"Include non-modular header inside the frame module" when compiling pod

I am creating a module that uses RestKit and a bunch of other containers.

When I compile my module using 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, for example

They will all say that setting CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES to YES and / or placing the problem header file in the Public section instead of the Project section will solve the problem. But for me this is not so. These threads also have a common Swift language, but I do not use it. I still use only Objective-C, but I don't know if this affects my problem.

I don’t understand what a mistake is, so I have a lot of problems solving the problem. Does anyone have another solution?

+6
source share
1 answer

You should add the - use-libraries flag as follows:

 pod repo push myCocoapodsRepo myPodspec.podspec --allow-warnings --verbose --use-libraries 
+6
source

Source: https://habr.com/ru/post/987870/


All Articles