5

I ran into a problem while integration "Registering a Device to Receive Push Notifications for a Pass" web service on my server for Apple Passes. Link Below: https://developer.apple.com/library/content/documentation/PassKit/Reference/PassKit_WebService/WebService.html.

I've followed the following steps:

  1. Able to successfully generate and distribute Apple Pass on iPhones through a downloadable link.

  2. Once pass is downloaded, I'm adding that pass to Apple Wallet. While adding, Registration web service is called which must send my server a Device ID and Push Token, but I am getting these two parameters as nil.

  3. However when I'm hitting the same URL on AdvanceRestClient(with dummy Device ID and Token), I do get the callback.

I wanted to know why I'm not getting device Id and Push token from iPhone??

Vineet Ravi
  • 1,370
  • 1
  • 11
  • 23
  • Can you post your webServiceURL or an example of the url that you believe should work? – PassKit Sep 04 '17 at 10:20
  • "https://example.com/v1/devices/devicelibraryIdentifierFromiOSDevices/registrations/pass.com.company.storecardtest/959555599" – Vineet Ravi Sep 04 '17 at 10:35
  • this is a post request with Content-Type as application/json and authorization key as header – Vineet Ravi Sep 04 '17 at 10:36
  • is there any setting that i need to enable in iPhone to get device ID and Push token? – Vineet Ravi Sep 04 '17 at 10:53
  • Ok, so your link is correct and nothing extra is required to get the phone to register. Try hooking the phone up to a mac and read the console logs as you toggle automatic updates on and off. You should be able to see the device making calls to the url. – PassKit Sep 04 '17 at 17:51
  • Connected my iPhone to Xcode debugger. Error: `passd(Security)[144] : could not enable test hierarchy: ApplePinningAllowTestCertsApplePassbook not true` `message 'kCLConnectionMessageRegistration' received from client 'com.apple.Passbook'` `getClientEffectiveRegistrationResult, /Applications/Passbook.app/Passbook, com.apple.Passbook, , CLClientRegistrationResult, kCLClientRegistrationResultFailedUnavailable, CLCommonLocationServicesEnabled, 1` `could not enable test hierarchy: ApplePinningAllowTestCertsApplePassbook not true` `The connection to ACDAccountStore was invalidated` – Vineet Ravi Sep 13 '17 at 10:44
  • `PassbookUIService(UIKit)[353] : if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction` `PassbookUIService(UIKit)[353] : if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction` – Vineet Ravi Sep 13 '17 at 11:02
  • I was connected to mobile data when this error occurred. But strangely, once I connect to WiFi everything started working fine (I get push token and device ID). I faced this issue twice in two different iPhone 6. – Vineet Ravi Sep 13 '17 at 11:04
  • Is this issue to do something with mobile data? – Vineet Ravi Sep 14 '17 at 04:57
  • Is your webService hosted locally on the same network? Do you have firewalls that prevent external traffic from accessing your network externally? – PassKit Sep 14 '17 at 07:11
  • Mobile data and WiFi both are in open network without any proxy. Web service is in a proxy but is accessible from outside as call is working fine with open mobile data and WiFi from other iPhones except iPhone 6. – Vineet Ravi Sep 14 '17 at 07:44
  • This is not a proxy issue, as the same is replicated even when my server and iPhone are kept in open network. – Vineet Ravi Sep 20 '17 at 12:08

0 Answers0