Apple钱包传递未显示的通知消息

时间:2016-08-24 11:16:23

标签: ios apple-push-notifications passbook notificationcenter

我为apple wallet创建了一个eventTicket传递。所有工作正常,传递添加到钱包,设备注册,我能够推送通知并成功更新通行证。唯一的问题是我没有显示更改消息,既没有将通知添加到通知中心。

这是传递pass.json的一个例子:

首次发送

{
  "formatVersion" : 1,
  "passTypeIdentifier": "pass.code.paq.test",
  "serialNumber": "14",
  "teamIdentifier": "TE4545WNZ9",
  "webServiceURL": "https://testdomain/applewallet/deviceservice/",
  "authenticationToken": "2344e35c-c348-345c-945b-32bce234bc12",
  "organizationName" : "Test"
  "description" : "testpass",
  "foregroundColor" : "rgb(255, 255, 255)",
  "eventTicket": {
    "primaryFields": [
      {
        "key": "member",
        "label": "MEMBER NAME",
        "value": "John Smith"
      }
    ],
    "secondaryFields": [
      {
        "key": "level",
        "label": "LEVEL",
        "value": "Black",
        "changeMessage": "Your Level just change to %@"
      }
    ],
    "auxiliaryFields": [
      {
        "key": "membershipNumber",
        "label": "NUMBER",
        "value": "3324234234234234"
      },
      {
        "key": "memberSince",
        "label": "MEMBER SINCE",
        "value": "2016-08-22"
      }
    ]
  }
}

更新了通行证

{
  "formatVersion" : 1,
  "passTypeIdentifier": "pass.code.paq.test",
  "serialNumber": "14",
  "teamIdentifier": "TE4545WNZ9",
  "webServiceURL": "https://testdomain/applewallet/deviceservice/",
  "authenticationToken": "2344e35c-c348-345c-945b-32bce234bc12",
  "organizationName" : "Test"
  "description" : "testpass",
  "foregroundColor" : "rgb(255, 255, 255)",
  "eventTicket": {
    "primaryFields": [
      {
        "key": "member",
        "label": "MEMBER NAME",
        "value": "John Smith"
      }
    ],
    "secondaryFields": [
      {
        "key": "level",
        "label": "LEVEL",
        "value": "Blue",
        "changeMessage": "Your Level just change to %@"
      }
    ],
    "auxiliaryFields": [
      {
        "key": "membershipNumber",
        "label": "NUMBER",
        "value": "3324234234234234"
      },
      {
        "key": "memberSince",
        "label": "MEMBER SINCE",
        "value": "2016-08-22"
      }
    ]
  }
}

我错过了什么吗?

0 个答案:

没有答案