I have read multiple tutorials on how to use swift classes in objective-c classes, and it seems straightforward enough, but I still can't get it to work.
I have a test class for swift called UserDefaultsFactory.swift containing this:
class UserDefaultFactory {
    func a() {
        print("🐹HELLO")
    }
}
And in my objective-c class I have imported the project name-swift like this: #import "NetPBXMobile-Swift.h". This works without any errors, and if I access the file I can see that it's full with references to swift classes. But for some reason it doesn't contain my own class UserDefaultsFactory. 
I have cleaned and build the code, but still nothing. As far as I understand the NetPBXMobile-Swift.h is created automatically, as I can see that it contains my own swift functions from other classes I have previously created. 
I have tried initiating an object like this:
UserDefaultFactory a = [[UserDefaultFactory alloc] init]; 
But I get the error message that it's an undeclared identifier.
Im' I using the right approach or is there another way to do this?