feat: add new arch#557
Conversation
|
@dtroupe-plaid for some reason the newest commits were not applied to the previous PR so here is another one. Could you test if it works correctly? |
|
@dtroupe-plaid is there a chance that it can be reviewed and merged somehow? |
|
I temporarily added |
Yes. Sorry for the delay I was OOO and prior to that we had a packed roadmap. I will have time to look at this tomorrow in the hopes we can merge it next week 🤞 can you resolve any conflicts and merge master (this change will only be supported in V11.x) 🙏 |
There was a problem hiding this comment.
@WoLewicki I reviewed the PR and don't have many comments on the code. However, I do have some concerns about the example applications. Both examples work on iOS, but I was unable to get either example to run successfully on Android.
- For the existing example app
npm run androidfails with a compiler error. - For the Fabric example the app appears to crash or freeze immediately upon opening. (see attached screen recording).
- I tested android using a Pixel 7 API 34
Once the issues with the example applications are resolved I can approve this 🙏
Additionally, the fabric example will need a simple README similar to the existing example (not a blocker on this PR).
Let me know if you have any questions or concerns.
Screen.Recording.2024-02-02.at.11.53.54.mov
| private const val LINK_TOKEN_PREFIX = "link" | ||
|
|
||
| const val TAG = "PlaidAndroid" | ||
| const val NAME = "PlaidAndroid" |
| override fun continueFromRedirectUriString(redirectUriString: String?) { | ||
| Log.e("PlaidModule", "continueFromRedirectUriString is not available on Android") | ||
| } | ||
|
|
||
| override fun create(token: String, noLoadingState: Boolean) { | ||
| Log.e("PlaidModule", "create is not available on Android") | ||
| } | ||
|
|
||
| override fun open(fullScreen: Boolean, onSuccess: Callback?, onExit: Callback?) { | ||
| Log.e("PlaidModule", "open is not available on Android") | ||
| } | ||
|
|
||
| override fun dismiss() { | ||
| Log.e("PlaidModule", "dismiss is not available on Android") | ||
| } |
There was a problem hiding this comment.
Guessing we need to have these methods to support iOS?
There was a problem hiding this comment.
We have to implement the methods of the interface
| - (void)continueFromRedirectUriString:(NSString *)redirectUriString { | ||
| RCTLogError(@"continueFromRedirectUriString is not supported on iOS"); | ||
| } |
There was a problem hiding this comment.
If this isn't supported on iOS or Android should be remove this method?
There was a problem hiding this comment.
Yeah, I left it since it was present in JS but I can remove it everywhere 🚀
| "typescript": "^4.9.5" | ||
| }, | ||
| "dependencies": { | ||
| "react-native-plaid-link-sdk": "^10.4.0" |
There was a problem hiding this comment.
| "react-native-plaid-link-sdk": "^10.4.0" | |
| "react-native-plaid-link-sdk": "^11.5.0" |
|
@dtroupe-plaid could you check again if everything builds correctly and there are no more crashes? And if so, could we get it merged and released? 🚀 |
|
@dtroupe-plaid @WoLewicki I would also love to see this get merged :) |
|
I am open to merging the newest |
|
I should have time to review this next week. If everything works we can merge it 😄 |
|
@dtroupe-plaid I resolved conflicts and migrated the new view to new arch also. Could you review it and test that the view behaves correctly so we can merge it? |
dtroupe-plaid
left a comment
There was a problem hiding this comment.
The current Android example still does not work. I can't approve this until the example applications work.
I apologize for the delay - Please test the Android example app and ensure it works before requesting another review 🙏
| import com.facebook.react.viewmanagers.PLKEmbeddedViewManagerDelegate | ||
| import com.facebook.react.viewmanagers.PLKEmbeddedViewManagerInterface |
There was a problem hiding this comment.
The changes in this file prevent the current example from compiling for Android.
file:///Users/dtroupe/plaid/client/link/react-native/react-native-plaid-link-sdk/example/node_modules/react-native-plaid-link-sdk/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt:8:40 Unresolved reference: PLKEmbeddedViewManagerDelegate
Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
e: file:///Users/dtroupe/plaid/client/link/react-native/react-native-plaid-link-sdk/example/node_modules/react-native-plaid-link-sdk/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt:11:3 Unresolved reference: PLKEmbeddedViewManagerInterface
e: file:///Users/dtroupe/plaid/client/link/react-native/react-native-plaid-link-sdk/example/node_modules/react-native-plaid-link-sdk/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt:15:16 Unresolved reference: PLKEmbeddedViewManagerDelegate
e: file:///Users/dtroupe/plaid/client/link/react-native/react-native-plaid-link-sdk/example/node_modules/react-native-plaid-link-sdk/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt:27:3 'setToken' overrides nothing
e: file:///Users/dtroupe/plaid/client/link/react-native/react-native-plaid-link-sdk/example/node_modules/react-native-plaid-link-sdk/android/src/main/java/com/plaid/PLKEmbeddedViewManager.kt:31:3 'setIOSPresentationStyle' overrides nothing FAILURE: Build failed with an exception
dtroupe-plaid
left a comment
There was a problem hiding this comment.
The current Android example app doesn't compile I can't approve this until the example application works.
I apologize for the delay - I would like to get this merged to help, but I don't get a lot of time allocated to this. Please test the current Android example locally to resolve these issues before requesting another review 🙏
You can test local changes with yalc like this:
tsc && yalc publish && cd example && yalc add react-native-plaid-link-sdk && npm install && npm run android
|
@dtroupe-plaid could you check again? I added missing files. |
dtroupe-plaid
left a comment
There was a problem hiding this comment.
Retested everything looks 👌
Summary
PR adding new arch to the library. It should no longer be needed to do any autolinking since it is done automatically and TurboModule is used when they are enabled in the project.
Motivation
It makes the library compatible with new architecture, so users can take advantage of it.
📝 Checklist
💚 Testing
You can run FabricExample app in order to see that it also works correctly on new arch
Documentation
Select one: