Skip to content

Commit e0f75e1

Browse files
committed
cleanup unused methods on ios
1 parent 6df6189 commit e0f75e1

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

ios/MMKVStorage.mm

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,10 @@ @implementation MMKVStorage
2020
NSString *rPath = @"";
2121
NSMutableDictionary *mmkvInstances;
2222

23-
static dispatch_queue_t RCTGetMethodQueue()
24-
{
25-
static dispatch_queue_t queue;
26-
static dispatch_once_t onceToken;
27-
dispatch_once(&onceToken, ^{
28-
queue = dispatch_queue_create("MMKVStorage.Queue", DISPATCH_QUEUE_SERIAL);
29-
});
30-
return queue;
31-
}
32-
3323
SecureStorage *secureStorage;
3424

3525
RCT_EXPORT_MODULE()
3626

37-
- (dispatch_queue_t)methodQueue
38-
{
39-
return RCTGetMethodQueue();
40-
}
4127

4228
+ (BOOL)requiresMainQueueSetup
4329
{
@@ -745,15 +731,14 @@ - (void)setBridge:(RCTBridge *)bridge
745731
{
746732
_bridge = bridge;
747733
_setBridgeOnMainQueue = RCTIsMainQueue();
748-
secureStorage = [[SecureStorage alloc]init];
749-
mmkvInstances = [NSMutableDictionary dictionary];
750-
734+
751735
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge;
752736
if (!cxxBridge.runtime) {
753737
return;
754738
}
755739

756-
740+
secureStorage = [[SecureStorage alloc]init];
741+
mmkvInstances = [NSMutableDictionary dictionary];
757742

758743
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
759744
NSString *libraryPath = (NSString *) [paths firstObject];

0 commit comments

Comments
 (0)