tschoffelen / php-pkpass

💳 PHP class for creating passes for Wallet on iOS.
https://includable.com
MIT License
901 stars 185 forks source link

Problem Generating Pass with iPad -- works fine with iPhone #140

Closed rednalab closed 3 months ago

rednalab commented 3 months ago

Expected Behavior

Hello, I am adding Add to Wallet functionality to an insurance web portal. This will enable users to add their member ID card to their Apple Wallet. I have modified your example.php file for our needs and works just as expected when using the iPhone. However, from the iPad the Add to Wallet button does not create the pkpass file. It does not produce any log errors so I'm struggling to troubleshoot the problem.

I did use the console app but the only thing I found was this: error 13:25:38.754142-0400 MobileSafari 0xc250b6c18 - [pageProxyID=920, webPageID=921, PID=964] WebPageProxy::didFailProvisionalLoadForFrame: frameID=519, isMainFrame=0, domain=, code=102, isMainFrame=0, willInternallyHandleFailure=0 error 13:25:42.647541-0400 MobileSafari 0xc250b6c18 - [pageProxyID=920, webPageID=921, PID=964] WebPageProxy::didFailProvisionalLoadForFrame: frameID=519, isMainFrame=0, domain=, code=102, isMainFrame=0, willInternallyHandleFailure=0 error 13:25:44.533132-0400 MobileSafari sendUserActivityToServer, called on activity BA9AD643-4D70-44A8-8710-D6001EE795F5 after it had been invalidated, so doing nothing.

I have tried Chrome and I get the exact same problem. I have also cleared browser caches and reset the iPad to no avail. iPadOS version is 17.3.1

Do you have any insight that might help me figure this out? Thanks in advance.

tschoffelen commented 3 months ago

Hmm, that's an interesting one, I haven't experienced that myself before. The pass should behave the same on all devices.

Are you saying you see the pass but it doesn't get added to the wallet? Or does the pass not show up at all?

rednalab commented 3 months ago

It does not show at all on the iPad. If I am on my macbook, using safari, the pass will show and I click the Add button it returns Added to Wallet but does not get added to my wallet. Everything works perfectly fine on the iPhone.

tschoffelen commented 3 months ago

Have you been able to add another pass to your wallet on iPad? Because I'm actually not sure if it's possible at all, I can't find anything about it when Googling. iPad doesn't have a wallet app, so perhaps it just doesn't allow you to preview/download passes?

rednalab commented 3 months ago

After exhaustive research, I've come to that same conclusion. Although the iPad doesn't have the wallet app anymore, I thought I read that you could add to the wallet on any device and, via iCloud, it would show on your iPhone's wallet. That does not seem to be the case. My solution was to only show the 'Add to Wallet' button if the visitor is on an iPhone.

tschoffelen commented 3 months ago

Okay, makes sense! It's weird though that they have a behaviour to deal with this on Mac, but not on iPad...

Thanks for looking into this, I'll close this issue for now.