【问题标题】:iOS subscriptions server_to_server notifications using firebaseiOS 使用 firebase 订阅 server_to_server 通知
【发布时间】:2019-11-07 05:45:44
【问题描述】:

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

我的问题是:

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

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

2020 年 11 月 26 日编辑 - 顺便说一句,我成功地使用 Firebase 云功能实现了 iOS 订阅 - 所以 Firebase 是一条可行的路。

【问题讨论】:

    标签: ios firebase subscription server-to-server


    【解决方案1】:

    是的,这可以通过 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

    【讨论】:

      猜你喜欢
      • 2012-01-28
      • 2019-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-25
      • 1970-01-01
      • 2021-08-27
      • 1970-01-01
      相关资源
      最近更新 更多