From effb028ad5010e7ce6dc01f7758de2fa507d719a Mon Sep 17 00:00:00 2001 From: Seph Soliman Date: Thu, 4 Apr 2019 16:03:21 -0700 Subject: [PATCH] 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 --- Libraries/CameraRoll/RCTImagePickerManager.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/CameraRoll/RCTImagePickerManager.m b/Libraries/CameraRoll/RCTImagePickerManager.m index b8e570cfc..9ccc24845 100644 --- a/Libraries/CameraRoll/RCTImagePickerManager.m +++ b/Libraries/CameraRoll/RCTImagePickerManager.m @@ -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