error: because it has overridable members that could not be loaded

Hey,


I'm getting this error inside "MyClass" and I can't find any info about it:

Cannot inherit from class 'MyOtherClass' because it has overridable members that could not be loaded.


MyOtherClass is a swift class that has an import to GoogleAnalytics pod, to which I manually added a .modulemap which creates a module GoogleAnalyticsSwift.


I found out that the error occurs only if I declare a method which has as one of the parameters something out of GoogleAnalyticsSwift.


If I remove the type, everything works, I can even use GoogleAnalyticsSwift types in the func body and it works. If I remove the inehrit between the classes everything works too.


Anyone knows the exact origin of the error?

Thanks

  • @s.borkin Hello, do you have a solution? could you share with us? Thanks

Add a Comment

Replies

Could you show the declarations of MyClass and MyOtherClass ?


When you declare the parameter out of GoogleAnalyticsSwift, do you prefix it by its class name ?

forgot to mention these 2 classes are in different frameworks:


//MyOtherClass

import GoogleAnalyticsSwift


@objc open class MyOtherClass: NSObject {

fileprivate func doSomething(tracker: GAITracker) { // this is the problematic area, if I remove the type GAITracker, it works

}

}


//MyClass

// the error occurs here

@objc public class MyClass: MyOtherClass {

}

Did you try prefixing GAITracker with its framework name ?

Did you get a resolution to this issue? I'm also seeing it when I try to subclass a class in my own private library in another module. This class A is in private library, and class B is in a separte module. Class B inherits from class A. I have declared class A to be open.

yes

Do you remember how you resolved it? Or any clues as to what causes the issue?


I'm also seeing it when I try to subclass a class in my own private library in another module. This class A is in private library, and class B is in a separte module. Class B inherits from class A. I have declared class A to be open.