File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -20,24 +20,10 @@ @implementation MMKVStorage
2020NSString *rPath = @" " ;
2121NSMutableDictionary *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-
3323SecureStorage *secureStorage;
3424
3525RCT_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 ];
You can’t perform that action at this time.
0 commit comments