0

I don't know anything about how the wallet works. I've read it's documentation. And I know that I need to generate some pkpass file on server.

What I want to do is to generate some pkpass file for user and bring the link to this file inside the app.

Can I add this file to wallet from external link. e.g User clicks on a link and this link leads to pkpass file. Would the system recognise this file as a wallet and propose the user to save it in his wallet?

https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/PassKit_PG/YourFirst.html#//apple_ref/doc/uid/TP40012195-CH2-SW1

Termininja
  • 6,620
  • 12
  • 48
  • 49

1 Answers1

0

No you can not do that. You need to have an app to show and add passes to your wallet. You can get content of the url using following

NSData *imgData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"your url string will come here"]];

Once you get your file data as NSData you can create PKPass from it. PKPass initialiser takes NSData as parameter and generates PKPass. And then you can use PKAddPassesViewController to show the pass or passes which you have downloaded.

Vishnu gondlekar
  • 3,896
  • 21
  • 35
  • you mean that this files needs to be stored inside my app? what about Wallet App? I thought that all passes are stored to separate wallet app – TripTop Top Apr 15 '16 at 07:51
  • ok. i think i got it. I need to get wallet data then present it in PKPASsViewcontroller, it already has add to Wallet button – TripTop Top Apr 15 '16 at 08:52