i have a webapp that is able to create apple wallet passes for iOS.
Process more or less looks like this:
User provides his Apple Pass ID and certificate from apple developer, based on that cert i am creating wallet passes that i can send to devices, then devices register to my webServiceURL.
Now i have tested this app while creating the passes from my Apple Pass ID and while using my APNs key from the same developer account and everything works great. What im looking for now is how to send push notifications to devices that have passes with different Apple Pass ID (so from user apple pass ID) with my APNs key.
Apps like PassKit etc. can send those notifications while not requesting user to provide his APNs key, maybe there is something i fundamentally dont understand about this process? Im using aioapns library for python and when i try to push notify pass made with PassTypeID from different apple developer account, if i use that PassTypeID as topic with keys from my developer accound i get TopicDissalowed, and when i use my PassTypeID as topic, device is not notified.
I just fixed it, for people struggling with the same approach here is the solution:
What Apple requires in terms of passes is to validate yourself using certificate method, for APNs() client you should only use client_cert
and use_sandbox
=False, where for client_cert
it should be a .pem
file of COMBINED private key (used to generate CSR for apple) and PassTypeID certificate in ONE file. Do not put team_id or topic, it doesnt matter (they are in the cert anyway) and the push will work.