iosobjective-cswiftxcodeobjective-c-swift-bridge

Xcode Pods functions not found in ModuleName-Swift.h


Because of a constraining library, I need to use Objective-C files in my Swift project.
So, I added the import module-Swift.h in my .m file.
It finds it without any issues.
The problem come from the auto-generated module-Swift.h" file.
I have a lot of errors, mainly from classes and protocols coming from Pods.
Image

Image

Image

Is there any config to fix this issue ?


Solution

  • Thanks to Kavitha Madhu, I found the solution !

    For those who encounter the same issue:

    If you want to use Swift classes and functions in you Objective-C code.
    But, some of you Swift functions use Pods protocols and delegates.
    You need to add in your Objective-C code the import of the pods headers that contain these protocols and delegates.

    For example, if your module-Swift.h doesn't find "SlideNavigationControllerDelegate", you need to add in the Objective-C file (which use "module-Swift.h") the line:
    #import <iOS_Slide_Menu/SlideNavigationController.h>