Boarding Pass to Wallet: Using WebViewGold’s File Downloader in a Lovable-Built iOS WebView

When you ship an iOS app built with Lovable and powered by a WebView, one common challenge is letting users download a boarding pass file and add it to Apple Wallet. Mobile Safari handles .pkpass downloads natively, but a WKWebView inside a native shell does not. That is where WebViewGold’s file downloader comes in.

Why the default WebView blocks boarding pass downloads

WKWebView does not offer the same download experience as Safari. Tapping a .pkpass link inside a standard WebView often does nothing or opens a blank screen. To get the pass into Apple Wallet, the native wrapper has to intercept the file request, store the file temporarily, and pass it to the iOS share sheet or preview controller.

Prepare the boarding pass file on your server

Start by making sure the boarding pass endpoint returns the correct MIME type. Apple expects application/vnd.apple.pkpass for .pkpass files. Also set Content-Disposition to attachment so the wrapper knows it should treat the response as a download instead of navigating.

Enable WebViewGold’s file downloader

Open your WebViewGold project and locate the download settings. Turn on the file downloader feature and add pkpass to the list of allowed file extensions. This tells the native layer to capture any URL that ends with .pkpass or has the matching MIME type.

Let the native share sheet handle the pass

After the file downloader saves the .pkpass file to a temporary directory, WebViewGold presents the standard iOS activity view. Users can tap Add to Apple Wallet and the pass appears in the Wallet app. No extra code is needed in Lovable or on the web side.

Test on a real device

The iOS Simulator does not always handle Wallet passes correctly. Run the app on a physical iPhone, tap the download link, and confirm the share sheet opens with the Add to Apple Wallet option.

A quick note for Android

For teams targeting Android, WebViewGold is also a quick and simple solution to convert websites into apps for Android easily. The same file downloader logic works there, so you can reuse the boarding pass flow across both platforms.

—
More Information & Download App Template: WebViewGold