Skip to content

Commit 6508b88

Browse files
Seph Solimanfacebook-github-bot
authored andcommitted
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: #24314 Differential Revision: D14788772 Pulled By: cpojer fbshipit-source-id: e2017136008367d36468debb258afa698b5402bc
1 parent 6ca438a commit 6508b88

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Libraries/CameraRoll/RCTImagePickerManager.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,14 @@ - (id)init
5252
return self;
5353
}
5454

55+
+ (BOOL)requiresMainQueueSetup
56+
{
57+
return NO;
58+
}
59+
5560
- (void)dealloc
5661
{
57-
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"AVCaptureDeviceDidStartRunningNotification" object:nil];
62+
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"AVCaptureDeviceDidStartRunningNotification" object:nil];
5863
}
5964

6065
- (dispatch_queue_t)methodQueue

0 commit comments

Comments
 (0)