【问题标题】:How to test Push Notifications on the production environment for a macOS app?如何在 macOS 应用程序的生产环境中测试推送通知?
【发布时间】:2021-10-13 08:15:49
【问题描述】:

我想在生产 APNS 环境中测试我的应用,以确保推送通知在生产中正常工作。

通常,在 iOS 上,我会使用临时配置文件来执行此操作,它允许我将 com.apple.developer.aps-environment 设置为 production 值.

但是,在 macOS 上,这种类型的配置文件不存在,所以我能想到的测试生产环境的唯一方法是通过 testflight。

有没有办法在不使用 testflight 的情况下在 macOS 应用的 prod 环境中测试推送通知?

【问题讨论】:

    标签: macos push-notification apple-push-notifications


    【解决方案1】:

    macOS 也可以使用 Ad Hoc 配置文件,但我可能误解了您的问题。

    无论如何,您当然可以在没有 TestFlight 的情况下在生产环境中进行测试——因为它是 macOS,您可以选择任何方式分发应用程序。

    例如,您可以使用 Developer ID 证书来签署一个应用程序,该应用程序将在 App Store 之外运行而不会发出警告。因此,您可以导出应用程序的 Developer ID 版本并自行测试。由于 Developer ID 应用是生产环境,Xcode 在重新签名应用时会自动将推送通知设置为生产环境:https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_aps-environment?language=objc

    【讨论】:

      猜你喜欢
      • 2012-09-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-23
      • 1970-01-01
      • 2011-08-07
      • 2016-05-18
      相关资源
      最近更新 更多