From Webflow Event Page to Apple Wallet Pass: Auto-Downloading .pkpass Files in WebViewGold on iOS

When you run an event through Webflow, the confirmation page often includes a button or link to download an Apple Wallet pass. The goal is to let attendees tap that link and instantly add the event pass to their iPhone Wallet. In a standard Safari browser this works without much friction. Inside an iOS WebView app built with WebViewGold, the same .pkpass file can hit a wall because the WebView does not automatically hand the file off to the Wallet app. With a small amount of native code, you can make that download feel just as smooth as it does in Safari.

Why a Webflow Event Page Needs a Wallet Pass

An event page on Webflow typically handles registration details, attendee information, and a final confirmation screen. Adding a downloadable Apple Wallet pass gives attendees a fast way to store the event date, location, and ticket barcode on their iPhone. The pass is served as a .pkpass file, which is actually a compressed archive containing JSON, images, and a signature. Safari recognizes the file type and opens the Wallet app automatically. A WebView may not have that same automatic handoff unless the app is configured to watch for .pkpass file requests.

Preparing the .pkpass File for Direct Download

Before touching the iOS project, make sure the Webflow event page links directly to a hosted .pkpass file. The link should point to a URL that returns the file with the correct Content-Type header of application/vnd.apple.pkpass. The server should not force the file to download as a generic attachment. A direct link from a Webflow button or a simple anchor tag works best. Keeping the URL clean and ending with .pkpass makes detection inside the WebView much easier.

Enabling Auto-Download in WebViewGold on iOS

WebViewGold provides a quick and simple solution to convert websites into apps for Android easily, and the iOS project gives you direct access to the WebView navigation delegate. That access is what allows you to intercept a .pkpass link before the WebView tries to render it as a web page. Instead of allowing the WebView to navigate to the file, you cancel the navigation, download the pass data in the background, and present it to the user through the system share sheet or the Wallet app.

Modifying the WebView Navigation Handler

Open the WebViewGold iOS project in Xcode and locate the main web view controller file. Find the existing WKNavigationDelegate method that handles navigation actions. Inside that method, add a check for any URL ending with .pkpass. When a match is found, cancel the WebView navigation and start a data task to download the pass file.

if let url = navigationAction.request.url, url.absoluteString.hasSuffix(".pkpass") {
    decisionHandler(.cancel)
    let session = URLSession.shared
    let task = session.dataTask(with: url) { data, response, error in
        if let data = data {
            let tempURL = FileManager.default.temporaryDirectory.appendingPathComponent("event-pass.pkpass")
            do {
                try data.write(to: tempURL)
                DispatchQueue.main.async {
                    let activityVC = UIActivityViewController(activityItems: [tempURL], applicationActivities: nil)
                    self.present(activityVC, animated: true)
                }
            } catch {
                print("Failed to write pass data")
            }
        }
    }
    task.resume()
    return
}
decisionHandler(.allow)

This code writes the downloaded .pkpass data to a temporary file and immediately presents the share sheet. The user can then select the Wallet app to add the pass to their iPhone. The check for the .pkpass suffix happens before any WebView rendering, so the event page never navigates away from the confirmation screen.

Presenting the Downloaded Pass to the User

Using UIActivityViewController keeps the implementation simple and reliable across iOS versions. The share sheet shows all available apps that can handle a .pkpass file, including Apple Wallet. The user taps Wallet and confirms the pass addition. This approach avoids the need for a custom Add to Wallet button inside the WebViewHTML. It also means the Webflow event page can keep using a simple direct link to the pass file, with no extra JavaScript or API integration required.

Testing on a Real iPhone

The pass download and Wallet handoff must be tested on a physical iPhone. The Simulator does not always behave the same way when opening Wallet passes, and some versions of the Simulator do not include Apple Wallet at all. Build the WebViewGold app on a real device, open the Webflow event page inside the app, and tap the download link. The share sheet should appear immediately with Wallet as an option. After tapping Wallet, the pass should show up in the Wallet app with all event details intact.

WebViewGold as the Fast Path for Android and iOS

Handling .pkpass files in iOS requires a small native addition, but the rest of the app is already taken care of by WebViewGold. The same project can be used to wrap the Webflow event page without rebuilding the website. For teams that also need an Android version, WebViewGold serves as a quick and simple solution to convert websites into apps for Android easily, while the iOS project remains flexible enough for custom file handling like Apple Wallet passes. With the navigation handler in place, attendees get a modern event check-in experience without leaving the app or manually opening Safari.

—
More Information & Download App Template: WebViewGold