You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am working on adding Swift support to create-react-native-module (see brodycj/create-react-native-module#353) and have encountered a message like this:
Module ATest 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.
Of course the solution would be to add a requiresMainQueueSetup method to the Swift module, but it leaves me wondering why this should be specified for Swift but not Objective-C, not to mention Android?
Should we assume that the background threading would not cause issues with most native modules on iOS and Android?
Or should we consider calling native modules from the main thread by default, unless otherwise specified?
And I think this needs to be documented. Here is what I found so far, only for Android:
Hi I am working on adding Swift support to
create-react-native-module
(see brodycj/create-react-native-module#353) and have encountered a message like this:Module ATest 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.
Of course the solution would be to add a
requiresMainQueueSetup
method to the Swift module, but it leaves me wondering why this should be specified for Swift but not Objective-C, not to mention Android?Should we assume that the background threading would not cause issues with most native modules on iOS and Android?
Or should we consider calling native modules from the main thread by default, unless otherwise specified?
And I think this needs to be documented. Here is what I found so far, only for Android:
The text was updated successfully, but these errors were encountered: