【问题标题】:React native Firebase iOS Production not working by sending noti to FCM single device通过向 FCM 单个设备发送通知来反应本机 Firebase iOS 生产无法正常工作
【发布时间】:2020-03-08 05:42:21
【问题描述】:

我正在做一个带有通知的 React 本机项目,使用 APNs 身份验证密钥 .它在 androidiOS dev 上运行良好。

但是当我将 ipa 导出为 adHoc 在设备上运行时,当我将通知发送到 使用 FCM 的单个设备时,应用程序停止接收通知。只有当我发送到所有 iOS 设备时它才有效。

【问题讨论】:

    标签: ios firebase react-native apple-push-notifications


    【解决方案1】:

    尝试通过邮递员为已发送的特定用户发送通知。我认为这个问题将是错误的user_key。

    发帖:https://fcm.googleapis.com/fcm/send

    标题: 授权:Key='YOUR_SERVER_KEY' 内容类型:application/json

    BODY:原始数据

    {
      "to": "User_key",
      "priority": "high",
      "data": {
        "title": "Hello world",
        "body": "Hello...",
        "image": "https://vortex.accuweather.com/adc2010/images/icons-numbered/01-l.png",
        
        "media_type": "image",
        "message": "message message message messagemessage message",
        "attachment": "https://vortex.accuweather.com/adc2010/images/icons-numbered/01-l.png"
      },
      "notification": {
        "android_channel_id": "news",
        "sound": "default",
        "title": "Hello world",
        "body": "Hello...",
        "image": "https://vortex.accuweather.com/adc2010/images/icons-numbered/01-l.png"
      }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-16
      • 2020-09-14
      • 1970-01-01
      • 1970-01-01
      • 2019-10-13
      相关资源
      最近更新 更多