Closed endarea closed 3 years ago
Is there a tutorial on how to properly call a cloud function?
I set up my function like this:
exports.IsAppleSubscriptionActive = functions.https.onCall(async (data, context) => {});
and deployed it like this:
firebase deploy --only functions
and got and url like this:
https://[region]-[project-id].cloudfunctions.net/IsAppleSubscriptionActive
On the client I installed the nuget and I try calling:
var result = await CloudFunctions.DefaultInstance.HttpsCallable("IsAppleSubscriptionActive").CallAsync(payloadToSend);
where payloadToSend is a NSDictionary. I get
Foundation.NSErrorException: Error Domain=com.firebase.functions Code=13 "INTERNAL" UserInfo={NSLocalizedDescription=INTERNAL}
What am I missing? I feel like the native tutorials aren't helping either. Is there something else I need to set up first?
Ok, so there was nothing wrong with the code, I just wasn't giving the proper permissions to the proper user (I was using Secret Manager in my cloud function)
Is there a tutorial on how to properly call a cloud function?
I set up my function like this:
and deployed it like this:
and got and url like this:
On the client I installed the nuget and I try calling:
where payloadToSend is a NSDictionary. I get
What am I missing? I feel like the native tutorials aren't helping either. Is there something else I need to set up first?