1

I'm working on an IOS app that makes use of the PK framework and uses a PKAddPassesViewController in a UIViewControllerRepresentable struct. The controller shows correctly when I run the app, but I cannot work out how to use the addPassesViewControllerDidFinish method to trigger responses when the "add" or "cancel" buttons are pressed.

I've checked similar stack overflow questions where people have had problems with this, but I can't seem to implement their solutions into my own project, and don't have experience of ObjC.

The app is written using SwiftUI, and I'd be grateful if anyone could set me in the right direction or explain how to implement this function.

Sylith
  • 411
  • 4
  • 10
  • 1
    Can you share some code? What have you tried so far? – PassKit May 01 '21 at 15:26
  • This is a replica of what I've implemented in my app thus far: https://github.com/Sylith1231/PassKitExample Running this code correctly displays the passViewController and the 'cancel'/'add' buttons must have some functionality as the pass is correctly added when I press 'add'. However after this I have no idea how to implement the didFinish function. I've read the header files of the passkit framework but can't make sense of it. – Sylith May 01 '21 at 16:38

0 Answers0