I've been looking for documents of reasons of why a singleton method definition in Objective-C class is not available on the Swift interface on Xcode.
The Objective-C class is defined like this
/**
* A general accessor across the sample App to remove the dependency of QPSLibraryManager from resusable components.
*/
@interface QPSSharedAccessor : NSObject
/**
* Required by QPSLibraryManager and some UI components.
*/
@property (nonatomic, strong) QPSApplicationConfiguration *qpsConfiguration;
/**
* Provides Commands to app
*/
@property (nonatomic, strong) id<QPSAppController> appController;;
/**
* Shared singleton.
*/
+ (instancetype)sharedAccessor;
/**
* Returns access to a configuration manager
*/
- (QPSConfigurationManager *)configurationManager;
@end
On Swift Interface, its defined like this
/**
* A general accessor across the sample App to remove the dependency of QPSLibraryManager from resusable components.
*/
open class QPSSharedAccessor : NSObject {
/**
* Required by QPSLibraryManager and some UI components.
*/
open var qpsConfiguration: QPSApplicationConfiguration!
/**
* Provides Commands to app
*/
open var appController: QPSAppController!
/**
* Returns access to a configuration manager
*/
open func configurationManager() -> QPSConfigurationManager!
}
I'm expected to see the sharedAccessor() singleton method on Swift but it is missing as you can see. Calling the said method on a separate swift file results in a compiler error, saying that the sharedAccessor() method doesn't exist. Converting everything to Swift is not viable btw. Advice on fixing this problem?