Skip to content

Commit 84bfb3e

Browse files
authored
Explicitly set requiresMainQueueSetup
Fixes warning on startup: > Module RCTJPushModule 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.
1 parent bb713c3 commit 84bfb3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ios/RCTJPushModule/RCTJPushModule.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ - (dispatch_queue_t)methodQueue
227227
return dispatch_get_main_queue();
228228
}
229229

230+
+ (BOOL)requiresMainQueueSetup {
231+
return YES;
232+
}
233+
230234
- (void)didRegistRemoteNotification:(NSString *)token {
231235
[self.bridge.eventDispatcher sendAppEventWithName:@"didRegisterToken"
232236
body:token];

0 commit comments

Comments
 (0)