Fix #23755 ("RCTImagePickerManager requires main queue setup" warning) (#24314)

Summary:
Fix #23755 - Which is to remove the warning:
```
Module RCTImagePickerManager requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
```

General Fixed - Warning "RCTImagePickerManager requires main queue setup
Pull Request resolved: https://github.com/facebook/react-native/pull/24314

Differential Revision: D14788772

Pulled By: cpojer

fbshipit-source-id: e2017136008367d36468debb258afa698b5402bc
This commit is contained in:
Seph Soliman 2019-04-04 16:03:21 -07:00 committed by Mike Grabowski
parent d60a2fbb01
commit effb028ad5
1 changed files with 6 additions and 1 deletions

View File

@ -52,9 +52,14 @@ RCT_EXPORT_MODULE(ImagePickerIOS);
return self;
}
+ (BOOL)requiresMainQueueSetup
{
return NO;
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"AVCaptureDeviceDidStartRunningNotification" object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"AVCaptureDeviceDidStartRunningNotification" object:nil];
}
- (dispatch_queue_t)methodQueue