IOS / PASSBOOK: Download a file (.pkpass) from dynamic link from IOS webview

别说谁变了你拦得住时间么 提交于 2019-12-25 08:22:04

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!