Skip to content

Conversation

alzalabany
Copy link

RN > 0.49 requires to implement requiresMainQueueSetup.
this fix and suppress that yellow box warning

Module RNFetchBlob 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.

catalinmiron and others added 15 commits October 12, 2017 22:55
Fix example links for Download and Multipart/form-data
RN > 0.49 requires to implement requiresMainQueueSetup.
this fix and suppress that yellow box warning

```
Module RNFetchBlob 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.
```
@Traviskn
Copy link

We are currently expecting pull requests with bugfixes to be applied to the 0.10.9 branch.

We merged another pull request #10 on that branch that implemented requiresMainQueueSetup, but returns YES instead of NO. Can you give any details on why we should not require main queue setup?

@wedneyyuri
Copy link

requiresMainQueueSetup must return true when it requires being set up on the main queue. That can be for various reasons, like accessing UIKit API or doing some other, thread-aware actions.
https://twitter.com/grabbou/status/941309557082640384

If a module overrides constantsToExport and doesn't implement requiresMainQueueSetup, then react-native must assume that it must be called on the main thread, because it may need to access UIKit.
https://github.com/facebook/react-native/blob/b9e7006cc6dc2b0801ea0c776ba00cdea2204151/React/Base/RCTModuleData.mm#L41

@Traviskn
Copy link

Traviskn commented Jun 2, 2018

@wedneyyuri Thanks for the additional info!

@Traviskn Traviskn merged commit 614ef56 into joltup:0.10.9 Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants