duanfan8360 2016-10-06 10:38
浏览 49

更新存折错误 - 无法读取传递,因为它无效

I'm trying to send a new pass json data to my device to update my pass in Apple Wallet following the part "Getting the Latest Version of a Pass" in this document.
The new json data is exactly the same the json data that I used for creating the pass successfully, except the backgroundColor is changed from #3e7cc8 to #000000 (for testing) but I got the "Invalid json data" error all the time.
Here are the successful creating json data

{
   "description":"description",
   "formatVersion":1,
   "organizationName":"organizationName",
   "passTypeIdentifier":"passTypeIdentifier",
   "serialNumber":"serialNumber",
   "teamIdentifier":"teamIdentifier",
   "foregroundColor":"#ffffff",
   "backgroundColor":"#3e7cc8",
   "labelColor":"#ffffff",
   "barcode":{
      "message":"d568866a45dfc010ac680a9d06e5a48feb9216a2",
      "messageEncoding":"utf-8",
      "format":"PKBarcodeFormatQR"
   },
   "logoText":"logoText",
   "storeCard":{
      "headerFields":[

      ],
      "primaryFields":[

      ],
      "secondaryFields":[
         {
            "key":"name",
            "label":"",
            "value":"Nick"
         },
         {
            "key":"points",
            "label":"",
            "value":"0 Points"
         }
      ],
      "auxiliaryFields":[

      ],
      "backFields":[
         {
            "key":"email",
            "label":"Email",
            "value":"hoangtrung.uit@gmail.com"
         },
         {
            "key":"phone",
            "label":"Phone",
            "value":"+841689984964"
         }
      ],
      "locations":[

      ]
   },
   "authenticationToken":"authenticationToken",
   "webServiceURL":"https://mydomain/passbook"
}

and the invalid updating json data

{
   "description":"description",
   "formatVersion":1,
   "organizationName":"organizationName",
   "passTypeIdentifier":"passTypeIdentifier",
   "serialNumber":"serialNumber",
   "teamIdentifier":"teamIdentifier",
   "foregroundColor":"#ffffff",
   "backgroundColor":"#000000",
   "labelColor":"#ffffff",
   "barcode":{
      "message":"d568866a45dfc010ac680a9d06e5a48feb9216a2",
      "messageEncoding":"utf-8",
      "format":"PKBarcodeFormatQR"
   },
   "logoText":"logoText",
   "storeCard":{
      "headerFields":[

      ],
      "primaryFields":[

      ],
      "secondaryFields":[
         {
            "key":"name",
            "label":"",
            "value":"Nick"
         },
         {
            "key":"points",
            "label":"",
            "value":"0 Points"
         }
      ],
      "auxiliaryFields":[

      ],
      "backFields":[
         {
            "key":"email",
            "label":"Email",
            "value":"hoangtrung.uit@gmail.com"
         },
         {
            "key":"phone",
            "label":"Phone",
            "value":"+841689984964"
         }
      ],
      "locations":[

      ]
   },
   "authenticationToken":"authenticationToken",
   "webServiceURL":"https://mydomain/passbook"
}

What's wrong with my updating json data? Please help.

  • 写回答

2条回答 默认 最新

  • duandao6414 2016-10-06 10:59
    关注

    I am not entirely sure, but the documentation states:

    Background color of the pass, specified as an CSS-style RGB triple. For example, rgb(23, 187, 82)

    You can try to follow the format given by the documentation.

    评论

报告相同问题?