How to inheritance Cocoapods Library to extend the functionality in the Xcode framework project

When building my iOS framework, I encountered a (fatal) module 'TrustKit' not found issue. I've marked the necessary classes as public (which is inherited from other library classes) for client applications, but I'm unsure how to resolve this error.

Example Code Snippet

import Foundation
import TrustKit

@objc
public class InheritanceTruskitFrameworkProjectClass: TrustKit {
    func extraFunctionality() {
        print("extraFunctionality executing...")
    }
}

Error while building the framework in the auto-generated Swift header file (ProjectName-Swift.h)

#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
# define SWIFT_IMPORT_STDLIB_SYMBOL 
#endif
#endif
#if defined(__OBJC__)
#if __has_feature(objc_modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import Foundation;
@import TrustKit; # -> error here `(fatal) module 'TrustKit' not found`
#endif

#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"

Please check this image to understand the error

Sample GitHub project https://github.com/vinaykumar0339/InheritanceTruskitFrameworkProject

  • I want a way to use inheritance for the dependencies project. Is this supported?

  • Looks Like it won't work with any modules like cocopod frameworks, internal module map etc?

What I have Tried

  • I have tried to install TrustKit with SPM also the same error throwing (fatal) module 'TrustKit' not found
How to inheritance Cocoapods Library to extend the functionality in the Xcode framework project
 
 
Q