On my Objective-C header, I have the following class method declaration:
@interface WXMediaMessage : NSObject
+(WXMediaMessage *) message;
The problem is the name. Swift does not import factory constructors. It detects these by noticing that the name is the same as the end of the class name.
Change the message
method name to something like singletonMessage
and all will be well.
If the name is message
, you will see this:
But if I change the name to, say, messager
, it compiles just fine.
For an analogy, try this:
var thing : HeyHo = HeyHo.ho()
You will get the same error message.