问题
I’m developing a simple IOS app. It’s a webview with navigation buttons that allows the user to navigate into my web.
I’m programming at Xcode 8.2.1 (Objetive C) with a universal device target.
In one of my URLs I show a dynamic link (that changes at each session) to allow the user to download a PDF file, and another dynamic link to download a PassBook (pkpass file). When the user selects the first button the pdf is correctly shown, but when the second button is selected nothing happens.
I don’t know if it’s due to a permission problems or if I have to add a section of code to solve this. I have found some posts about downloading with AFNetworking but my links are variables and the wevbiew must navigate to all the URLs of the site.
回答1:
The iOS webview components do not automatically process .pkpass files. You will need to add code to process then yourself.
There is some boilerplate Objecive-C code here: Downloading PKPass in an iOS custom app from my server
来源:https://stackoverflow.com/questions/42415655/ios-passbook-download-a-file-pkpass-from-dynamic-link-from-ios-webview