How do I access to the shared instance of "SharedManager" declared in my Swift file from my Objective-C class?
Steps:
I have declared an object in a Swift file as following:
Swift Class Declaration:
From this [instructions][1] I did:
// Swift class
class SharedManager{
static let sharedInstance = SharedManager()
}
From Objective-C class:
In AppDelegate.m:
#import "ProjectName-Swift.h"
@class SharedManager;
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// How do I access to the shared instance of "SharedManager" ?
}
[1]: http://stackoverflow.com/questions/24024549/using-a-dispatch-once-singleton-model-in-swift