Closed nandorojo closed 1 year ago
I updated my issue with a minimal reproduction.
Here is the repo: https://github.com/nandorojo/plaid-bug-repro
yarn
npx pod-install
npm i -g expo-cli
(if you don't have expo installed)expo run:ios
expo start --dev-client
.Very much appreciate the repro repo! I've got it reproing consistently and am looking into a fix now. Thank you a ton :)
Great thanks!
Our next release won't be until roughly January 15, but to unblock you, you can remove all the import lines in RNLinkSdk.h
to just
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
Sounds good! Thanks for the quick patch.
If I could offer some quick feedback coming from the Web library: I’m using React Native + React Native Web. It would be nice if the APIs matched. The RN lib uses camelcase, where web uses snake case for the same calls.
It would also be nice to have a unified usePlaidLink
the way Web has, rather than only documenting the TouchableOpacity. I ended up looking in the source code and implementing my own wrapper for usePlaidLink
in native files.
Even better, this lib could export the same hook for Web and native to offer parity for both. I ended up doing that myself, but I figured it would be useful for other users too.
Hope that’s helpful.
100% appreciate the feedback! We've heard the same issue about our mismatched types previously, and are trying to get this roadmapped for next year. The teams managing our mobile SDKs and React SDKs are completely different currently, and we would like to collaborate more to bring parity across those.
If you could share those implementations as PRs, we would love to take a look and integrate those!
Thank you again for the thorough feedback
Here's what I'm doing to map usePlaidLink
from web onto native. I still need to try it out with your patch, I'll likely do that today.
use-plaid-link/index.ts
use-plaid-link/index.web.ts
use-plaid-link/types.ts
I've been getting a separate build error since patching this library.
This is my RNLinksdk.h
patch:
diff --git a/node_modules/react-native-plaid-link-sdk/ios/RNLinksdk.h b/node_modules/react-native-plaid-link-sdk/ios/RNLinksdk.h
index 2e927ca..0b3fce6 100644
--- a/node_modules/react-native-plaid-link-sdk/ios/RNLinksdk.h
+++ b/node_modules/react-native-plaid-link-sdk/ios/RNLinksdk.h
@@ -1,11 +1,6 @@
-#if __has_include("RCTBridgeModule.h")
-#import "RCTBridgeModule.h"
-#import "RCTEventEmitter.h"
-#else
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
-#endif
@interface RNLinksdk : RCTEventEmitter <RCTBridgeModule>
I'm seeing this error now. It seems related to Expo modules, although I don't believe it was happening before this patch. I can try uninstalling plaid to be sure.
Disregard the error from the above comment; it's an expo bug which I can't reproduce in the plaid repro.
+1 on this issue. I'm also seeing this bug and the fix lgtm. any idea if this will fix will be out soon? thank you!!
@amytang0 Any updates here? You mentioned new release would be roughly January 15. Thanks!
if you use expo run:ios (which creates ios folder), it's not managed expo workflow anymore
expo-dev-client works with custom plugins
So, could anyone describe why we should use expo-dev-client if we still use expo run:ios?
That’s not exactly true. The custom dev client with config plugins is the new version of the managed workflow. The only difference is you can use any library. A custom dev client is simply your own Expo Go app.
If you gitignore ios
and android
folders, then expo run:ios is functionally a managed project.
The problem
Hey, I'm having trouble building my iOS app after installing this. I'm using Expo with a custom development client, meaning you can add custom code.
I'm getting this error: declaration of 'RCTEventEmitter' must be imported from module 'React.RCTEventEmitter' before it is required
Thanks for your help! Let me know if you need any more info. Really appreciate it.
Environment
Steps to Reproduce
I installed
react-native-plaid-link-sdk
at version 7.2.0, addedpod 'Plaid', '~> 2.3.1'
to my Podfile, ranpod install
, tried to rebuild the app, and then it's breaking.Expected Result
I expected the build to work as expected. For context, I built the app using
expo run:ios -d
, which creates a custom development client using your native code for you.Screenshots
n/a
Logs
Code To Reproduce Issue
Reproduction
Here is the repo: https://github.com/nandorojo/plaid-bug-repro
yarn
npx pod-install
npm i -g expo-cli
(if you don't have expo installed)expo run:ios
expo start --dev-client
.Steps
I'll create a repro shortly! In the meantime, this should let you reproduce the issue:
(To start up the dev server again, just run
expo start --dev-client
.)