I am working on a mobile application in React native (using Expo [SDK :~51.0.18]
)
Note : I am using Expo router to handle all routing in my project.
I am attempting to integrate this new SDK (Lean tech) into my app for bank connection (GCC region). This package uses react-native-webview
I have followed all the instructions in the tutorial as such :
import React, {useRef} from 'react';
import { View, StyleSheet, Text, Image } from 'react-native';
import { Button, useTheme} from 'react-native-paper';
// @ts-ignore
import LinkSDK from "lean-react-native";
const Screen: React.FC = () => {
const theme = useTheme();
const styles = createStyles(theme);
const Lean = useRef(null)
return (
<View style={styles.container}>
<LinkSDK
ref={Lean}
appToken="xxxxxx-6e5e-xxxx-xx58-bx6xd9fxxxxx"
version="@latest"
country="ArabEmirates"
sandbox
/>
<Button style={styles.button} mode="contained" textColor="#013511" onPress={() => Lean.current.connect({ customer_id: "xxxxxxx" })}>
Link Bank Account
</Button>
</View>
);
};
Whenever i click the button to create the connection, I get the following error :
I am posting this question to see if the issue is with me using Expo or if i need to do any additional setups (or linking) ? I did not follow the Pod install instruction as i am testing on an android device.
2
Answers
Here is the documentation that talks about webview crash issues on Android, hope it helps https://docs.leantech.me/v2.0-KSA/docs/react-native#webview-crashes-on-android
Do they have semi-open source lib you can look at? This looks like a problem with modal host view when it interacts with the webview component.
Second step is to reach out to them since there code looks closed source.
Also with react-native error messages, it’s better to post the console output instead of the redscreen/warning screens so we can see the full message.