hiranpeiris / react-native-otp-auto-fill

Auto fill OTP library for React Native
MIT License
6 stars 8 forks source link

Enable requiresMainQueueSetup to remove warning #19

Open tanmoy-cloudly opened 6 months ago

tanmoy-cloudly commented 6 months ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native-otp-auto-fill@0.1.17 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-otp-auto-fill/ios/OtpAutoFillViewManager.m b/node_modules/react-native-otp-auto-fill/ios/OtpAutoFillViewManager.m
index e599367..395b760 100644
--- a/node_modules/react-native-otp-auto-fill/ios/OtpAutoFillViewManager.m
+++ b/node_modules/react-native-otp-auto-fill/ios/OtpAutoFillViewManager.m
@@ -9,4 +9,9 @@ @interface RCT_EXTERN_MODULE(OtpAutoFillViewManager, RCTViewManager)

 RCT_EXPORT_VIEW_PROPERTY(onComplete, RCTDirectEventBlock)

++ (BOOL)requiresMainQueueSetup
+{
+  return YES;
+}
+
 @end

This issue body was partially generated by patch-package.