Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatible with RN > 0.49 #17

Merged
merged 15 commits into from Jun 2, 2018
Merged

compatible with RN > 0.49 #17

merged 15 commits into from Jun 2, 2018

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.

None yet

6 participants