I am working on a bare React Native app and I’m using the RN plugin for the in-app-payments SDK. Right now, I’m trying to set up the SDK on the Android side by following the Github guide. I’ve made sure the app is meeting the Android requirements, minSdkVersion = 28
, but the current code:
useEffect(() => {
async function loadSQIP() {
try {
await SQIPCore.setSquareApplicationId('sq0idp-sSi1P1fOod4Knedfhvr-XA')
} catch (e) {
console.warn(e)
console.log('HELLO?')
}
}
loadSQIP()
}, [])
is throwing the error [TypeError: Cannot read property 'setApplicationId' of null]
on initial render.
And when I try to call onStartCardEntry()
, I get TypeError: Cannot read property 'startCardEntryFlow' of null
.
Appreciate any help!
3 posts - 2 participants