【发布时间】:2023-03-07 16:09:01
【问题描述】:
因此,我一直在浏览有关 Firestore 文档生存时间的堆栈溢出问题,并希望在我的 iOS 应用中实现该功能。我看到这个 Doug Stevenson 的博客反复出现的链接,展示了如何做到这一点,并按照步骤直到他声明了第一个函数,现在我的文档路径的问题是它是动态的并且所有这些变量和值在我的 Xcode 中的 Swift 文件中。
我在 VSC 中的 functions/index.js 文件中有这段代码,但我很头疼,想弄清楚如何将所有这些东西连接在一起以使其工作。
const functions = require("firebase-functions");
const admin = require("firebase-admin")
const { CloudTasksClient } = require("@google-cloud/tasks")
admin.initializeApp()
export const OnCreateGothereEvent = functions.firestore.document('school_users/[school_userDocID goes here]/events/[eventDocID goes here]').onCreate()
我不知道该怎么做,试图达到这一点已经足够令人困惑,但非常感谢一些额外的指导。我已经看过一些关于在 Swift 中使用 Cloud Functions 的文档,但我知道要设置实际的任务/功能,您需要使用 Node.js,所以我需要一些指导。提前致谢。
【问题讨论】:
标签: node.js swift google-app-engine google-cloud-firestore google-cloud-functions