Home weex - wxsdkmanager
Post
Cancel

weex - wxsdkmanager

sharedInstance

1
2
3
4
5
6
7
8
9
10
11
+ (WXSDKManager *)sharedInstance
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (!_sharedInstance) {
            _sharedInstance = [[self alloc] init];
            _sharedInstance.instanceDict = [[WXThreadSafeMutableDictionary alloc] init];
        }
    });
    return _sharedInstance;
}

instanceDict

1
@property (nonatomic, strong) WXThreadSafeMutableDictionary *instanceDict;

bridgeMgr

1
@property (nonatomic, strong) WXBridgeManager *bridgeMgr;
1
2
3
4
5
6
7
8
9
10
+ (WXBridgeManager *)bridgeMgr
{
    WXBridgeManager* result = [self sharedInstance].bridgeMgr;
    if (result == nil) {
        // devtool may invoke "unload" and set bridgeMgr to nil
        result = [WXBridgeManager sharedManager];
        [self sharedInstance].bridgeMgr = result;
    }
    return result;
}
This post is licensed under CC BY 4.0 by the author.