7

我需要实现服务器端逻辑,以处理苹果 iOS 订阅状态​​的变化https://developer.apple.com/documentation/storekit/in-app_purchase/enabling_status_update_notifications

我的问题是:

  1. 我可以用firebase做到这一点吗?即我可以在firebase服务器上放置一些例如“node.js”代码来处理来自苹果服务器的消息吗?

  2. 当我测试firebase db服务器时nscurl --ats-diagnostics https://server.com,检查它是否与苹果ATS(https://developer.apple.com/documentation/security/preventing_insecure_network_connections)兼容,它仅在TLSv1.3的东西上失败,是否足以满足苹果ats的要求?

编辑 26/11/2020 - 顺便说一句,我成功地使用 Firebase 云功能实现了 iOS 订阅 - 所以 Firebase 是一种可行的方法。

4

1 回答 1

13

是的,这可以通过 Firebase 实现。您必须使用 Cloud Functions。我只在沙盒环境中使用过它,但看起来它们满足 Apple 的 ATS 要求,因为所有状态更新都按预期进行。

exports.iapStatusUpdate = functions.https.onRequest((req, res) => {
  //all receipt info will be in req.body
})

将其部署到云功能后,您必须进入 App Store Connect -> 我的应用程序 -> 您的应用程序 -> App Store -> 应用程序信息,然后在“订阅状态 URL”中输入 url,这将类似于https://us-central1-[your-project-id].cloudfunctions.net/iapStatusUpdate.

于 2019-06-25T17:43:08.640 回答