.pkpass 번들을 살펴본 결과 pass.json
파일에 잘못된 JSON이 포함되어있는 것이 문제입니다.
장치 콘솔 로그를 보여줍니다 패스 추가 할 때 다음
Feb 12 00:31:58 pfr MobileSafari[236] <Warning>: Invalid data error reading pass
/var/mobile/Applications/AF19C13B-113D-44B9-9067-1228253C82ED/Library/Caches/com.apple.mobilesafari/com.apple.Passbook/5BE44BA0-7E7F-4DFA-92ED-D5E41A984F82.pkpass/pass.json.
Could not read json from URL file:///var/mobile/Applications/AF19C13B-113D-44B9-9067-1228253C82ED/Library/Caches/com.apple.mobilesafari/com.apple.Passbook/5BE44BA0-7E7F-4DFA-92ED-D5E41A984F82.pkpass/pass.json:
Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)"
(Badly formed object around character 221.) UserInfo=0x148cca010 {NSDebugDescription=Badly formed object around character 221.}
가 뒤에 쉼표를 추가
"foregroundColor": "rgb(255,111,15)"
및 키 변경 :
"description" : '"totally cool party"',
로를 :
"description" : "\"totally cool party\"",
그런 다음 .pkpass 번들을 다시 컴파일하면 좋을 것입니다.
** 업데이트 **
가 정수를 필요로 할 때
formatVersion
키의 문자열을 설정 했으므로 패스는 이제 실패
.
Feb 12 11:04:22 pfr MobileSafari[1825] <Warning>: Invalid data error reading pass pass.com.ticketino/2677326. Value for key 'formatVersion' must be of class NSNumber, but is actually of class __NSCFString.
Feb 12 11:04:22 pfr MobileSafari[1825] <Warning>: PassBook Pass download failed: The pass cannot be read because it isn’t valid
변경 키를 :
"formatVersion": "1",
에 : 또한
"formatVersion":1,
하여 해당 날짜도 통과가 거부 될 것이다, ISO8061 format에없는 것처럼, 그것은 본다 . 다만 맥 실행 엑스 코드에 전화를 연결, 당신은 이러한 문제를 진단하는 방법에 대한
"relevantDate" : "2014-02-28T12:00:00Z",
및 구성 도우미 창에서 장치 모니터 콘솔 : 해결하려면
는에 relevantDate
키를 변경합니다. 보다 자세한 정보가 필요하면 장치의 개발자 설정 메뉴에서 추가 통첩 로깅을 활성화 할 수 있습니다.webServiceURL
안전한 URL이기 때문에 업데이트 2 **
** 는 이제 패스 실패합니다. 생산 패스의 경우 통장 웹 서비스는 https
이상으로 제공되어야합니다.
장치가 개발 용으로 구성된 경우 개발자 설정 메뉴의 Passkit 테스트 섹션에서 "HTTP 서비스 허용"옵션을 활성화하여이를 무시할 수 있습니다.
패스에도 authenticationToken
키가 없습니다. webServiceURL
(Read the Passbook Web Service Manual!)
디버깅 Xcode에 액세스 할 수없는 디버거는 매우 까다 롭지 만 불가능하지는 않습니다. 하나가 맥을 구입, 또는 Virualise Mac OSX 또는 run Mac OSX on PC Hardware.
** 업데이트에 여러 가지 방법 중 하나에 의지 추천 하시겠습니까 3 **
Feb 12 23:21:36 pfr MobileSafari[225] <Warning>: Invalid data error reading pass pass.com.ticketino/2678239. Unable to parse relevantDate 28-05-2014T12:00:00Z as a date. We expect dates in "W3C date time stamp format", either "Complete date plus hours and minutes" or "Complete date plus hours, minutes and seconds". For example, 1980-05-07T10:30-05:00.
Feb 12 23:21:36 pfr MobileSafari[225] <Warning>: PassBook Pass download failed: The pass cannot be read because it isn’t valid.
귀하의 relevantDate
키가 여전히 유효한 ISO8601 아니다 날짜!
"relevantDate" : "2014-05-28T12:00:00Z",
는 대부분의 경우 인증서가 유효하지 않거나 만료입니다 : 해결하기 위해
는에
relevantDate
키를 변경합니다. 인증서 오류로 인해 제공 한 링크 예제가 실패했습니다. PassWallet은 통과 인증서를 확인하지 않습니다. 문제가있는 .pkpass에 대한 링크를 게시하고 확인할 수 있습니까? – PassKithttp://speedy.sh/jmvnE/EventTicket2676929.pkpass 인증서 만료일은 2014 년 12 월입니다. 따라서 그럴 수 없습니다. 그 아마 유효하지 않습니다. 그 이유는 무엇일까요? – lucafik