2016-04-06 23 views
0

Ich habe erfolgreich Pass über Mail in Brieftasche hinzugefügt. Ich sehe die App Pass in the Wallet, aber ich kann den aktualisierten Pass nicht sehen, wenn ich ihn auf der Rückseite des Passes auffrische. Hier sind Protokolle:PK-Pass nicht in der Wallet-App aktualisiert, um zu aktualisieren

passd[119] <Warning>: Verifying structure and signature for pass pass.com.test.pass/‎1 
passd[119] <Warning>: Signature validation: succeeded 
passd[119] <Warning>: Generating POST request with URL <my_https_url/api/PassRegistration/v1/devices/70e435342e38df4e4346e779c6dff6e3/registrations/pass.com.test.pass/%25E2%2580%258E1> 
passd[119] <Warning>: Request contains header field <Authorization: ApplePass my_token> 
passd[119] <Warning>: Request contains body dictionary { 
     pushToken = 93b5d5cxxxxxxxxxxxxxxxxxxxxxxxxxxx_similar; 
    } 
passd[119] <Warning>: Register task (for device 70e435342e38df4e4346e779c6dff6e3, pass type pass.com.test.pass, serial number ‎1; with web service url my_https_url/api/PassRegistration/) got response with code 201 

passd[119] <Warning>: Generating GET request with URL <my_https_url/api/PassRegistration/v1/devices/70e435342e38df4e4346e779c6dff6e3/registrations/pass.com.test.pass> 
passd[119] <Warning>: Get serial #s task (for device 70e435342e38df4e4346e779c6dff6e3, pass type pass.com.test.pass, last updated (null); with web service url my_https_url/api/PassRegistration/) got response with code 200 
passd[119] <Warning>: Get serial numbers task completed with update tag 1459943482, serial numbers (
     1 
    ) 
passd[119] <Warning>: Get pass task (pass type pass.com.test.pass, serial number ‎1, if-modified-since (null); with web service url my_https_urlapi/PassRegistration/) got response with code 200 
passd[119] <Warning>: Verifying structure and signature for pass pass.com.test.pass/1 
passd[119] <Warning>: Signature validation: succeeded 
passd[119] <Warning>: Get pass task (pass type pass.com.test.pass, serial number ‎1, if-modified-since (null); with web service url my_https_url/api/PassRegistration/) encountered error: Requested serial number ‎1, received serial number 1 
passd[119] <Warning>: Get pass task (pass type pass.com.test.pass, serial number ‎1, if-modified-since (null); with web service url my_https_url/api/PassRegistration/) will retry after 60 seconds 

Ein Teil meines Passes sieht wie folgt aus:

"storeCard": { 
    "headerFields": [ 
     { 
     "key": "lessons", 
     "label": "Points", 
     "value": "200" 
     } 
    ], 

auf Update-Service-Aufruf, ging ich denselben Pass im Binärformat aber mit Punktwert auf 500 Erwarteter Ausgang um Punkte als 500 anstelle von 200 zu zeigen. Ich sehe die "Konnte nicht update pass" Nachricht einmal Aktualisierung ist getan. Ich teste in iPhone4s mit IOS 9.2.1.

I genannt: https://github.com/yuchaoonline/ytoo.service/blob/master/dotnet-passbook-master/Passbook.Sample.Web/Controllers/PassRegistrationController.cs

Verfahren BinaryFormatter() nicht so funktioniert ich https://github.com/horizon-institute/AffectiveComputingCloud/blob/master/AffectiveComputingCloud/RestAPIWebRole/Formatter/BinaryMediaTypeFormatter.cs-BinaryMediaTypeFormatter() per Referenz geändert

ich mit folgenden Kopfparametern versucht:

response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.apple.pkpass"); 
response.Content.Headers.LastModified = DateTime.UtcNow; 
response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment"); 
response.Content.Headers.ContentDisposition.FileName = "pass.pkpass"; 
response.Content.Headers.ContentDisposition.Name = "pass.pkpass"; 
+0

Die letzte Anweisung der Konsolenausgabe teilt mir mit, dass Ihr Webdienst nicht mit einem neuen .pkpass-Paket antwortet. Wenn Sie "mit binärem Format antworten" sagen, was senden Sie als Antwort auf diesen letzten Anruf? – PassKit

+0

Ich reagiere generatedPass Byte-Array als: response.Content = new ObjectContent (generatedPass, neue BinaryMediaTypeFormatter()); – bunty

+0

Wie setzen Sie Header ein? - Was ist dein Inhaltstyp? – PassKit

Antwort

1

Es scheint mehr Probleme wie falscher Inhaltstyp Durch das Ändern des Inhaltstyps in application/vnd.apple.pkpass und das Übergeben des aktualisierten Passes mit aktualisiertem Datum wurde das Problem behoben.

+0

können Sie auflisten, was alles falsch war .. oder teilen Sie den Code von api-controller, die die updates durchgeführt haben? –