【发布时间】:2020-06-25 03:00:00
【问题描述】:
当应用程序即将关闭时,我想从我的实时数据库中删除一些数据。
我是这样定义函数的(稍后会添加逻辑):
exports.removeAllAssignedTeams = functions.https.onCall((data, context) => {
const judgeId = data.judgeId;
console.log("Will unassign all teams assigned to judge id: ", judgeId);
});
我从我的应用程序委托中调用它:
func applicationWillTerminate(_ application: UIApplication) {
print("Application will terminate")
functions.httpsCallable("removeAllAssignedTeams").call(["judgeId": getUserPhoneNumber()]) { (_, _) in }
}
但在我的云函数控制台中,我从未看到此函数的任何日志,甚至没有看到函数开始执行的迹象。我做错了什么?
【问题讨论】:
标签: ios swift firebase firebase-realtime-database google-cloud-functions