我正在构建存折Web服务和后端。我使用PHP-Passbook生成传递文件。然后可以将创建的传递添加到Passbook。但是,它不会调用我的Web服务。我检查了我的代码并发现这是因为当我使用以下代码创建PKPass
对象时,除了webserviceUrl
之外的任何内容都可以在对象中导入,pass.webserviceUrl
始终是nil
PKPass *pass = [[PKPass alloc] initWithData:responseObject error:&error];
这是我的pass.json文件
{
"serialNumber": "90f9f133-cbd7-47b3-9b04-8a443f488495",
"description": "Event",
"formatVersion": 1,
"eventTicket": {
"primaryFields": [
{
"key": "event",
"label": "Event",
"value": "Test Event"
}
],
"secondaryFields": [
{
"key": "location",
"label": "Location",
"value": "Moscone West"
}
],
"auxiliaryFields": [
{
"key": "datetime",
"label": "Date & Time",
"value": "Tuesday 30th of July 2013 11:30:26 AM'"
}
]
},
"relevantDate": "2013-07-24T14:25-08:00",
"barcode": {
"format": "PKBarcodeFormatQR",
"message": "hello world",
"messageEncoding": "iso-8859-1"
},
"backgroundColor": "rgb(253,229,47)",
"logoText": "FDJ Event",
"authenticationToken": "72aa48d08db9a379f147e38fb23a3901",
"webServiceUrl": "http://www.test.com/passbook/index.php",
"passTypeIdentifier": "pass.test.passbooktest",
"teamIdentifier": "XXXXXXX",
"organizationName": "TEST"
}
我还在“开发人员”菜单中启用了“允许HTTP服务”。它也不起作用。
任何解决方案?