【问题标题】:Push Notification in Objective-cObjective-c 中的推送通知
【发布时间】:2018-05-07 07:11:59
【问题描述】:

我需要objective-c.中的推送通知程序

一步一步

在哪里编写代码通知请求并要求密钥?

我已经试过了,但是卡住了,不知道怎么解决

我在终结者中试过这个:

openssl pkcs12 -clcerts -nokeys -out cert.pen-in cert.p12

openssl pkcs12 -nocerts -out key.pen -in key.p12

Openssl rsa  -in key.pem  -out key.unencrypted.pem

Cat cert.pem  key.pem >ck.pem

【问题讨论】:

标签: ios objective-c push-notification terminator


【解决方案1】:

在终端中逐步执行以下 3 个命令

首先,输入您的 .cer 文件

1) openssl x509 -in aps.cer -inform der -out PushChatCert.pem

第二次,输入你的 .p12 文件并输入密码 4-5 次

2) openssl pkcs12 -nocerts -out PushChatKey.pem -in Certificates.p12

第三步,生成你的 .pem 文件并提供给服务器端。

3) cat PushChatCert.pem PushChatKey.pem > ckBRIDriver.pem

【讨论】:

    【解决方案2】:

    无需遵循这么长的步骤。只需在终端中执行这一行。

    openssl pkcs12 -in pushcert.p12 -out pushcert.pem -nodes -clcerts
    

    pushcert.p12

    Reference from

    【讨论】:

      【解决方案3】:

      我建议尝试使用 Google firebase,它们为端到端工作流程提供了出色的文档。您还可以在 Google 控制台的帮助下测试您的应用。

      步骤是:

      1. 集成 Firebase SDK
      2. 从 Apple 开发者帐户生成开发证书。
      3. 上传您的证书并输入您的 App Bundle ID。
      4. 从 google 控制台发送示例消息

      参考 Firebase:https://firebase.google.com/docs/ios/setup

      p12 证书:https://docs.telerik.com/platform/appbuilder/cordova/code-signing-your-app/configuring-code-signing-for-ios-apps/create-distribution-certificate

      【讨论】:

        猜你喜欢
        • 2014-02-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-02-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多