Can I use Firebase callable functions with React Native?
I have successfully deployed an onCall function and it is visible in my dashboard.
I have initialized the functions using:
// Initialize Cloud Functions through Firebase
firebase.functions();
Then I am calling the function like so:
const func = firebase.functions().httpsCallable('funcName');
func({
param1: '',
param2: '',
param3: '',
param4: ''
}).then(res => {
console.log('success')
console.log(res)
})
However, every time I make the call, the promise is rejected with the message 'not-found'.
My current Firebase version is 7.6.1
Here is the code for my function:
export const funcName = functions.https.onCall((data, context) =>
{
return { message: 'success' }
})