Module 11 — Reference
API surface, troubleshooting, and a final checklist. Unless noted, methods are on the shared singleton PaylisherSDK.shared.
API reference
Setup & handlers
| Method | What it does |
|---|---|
onDeepLink(_ handler: (PaylisherDeepLink, Bool) -> Void) | Registers a closure for received deep links. The Bool is requiresAuth. No protocol needed. |
onDeepLinkRequiresAuth(_ handler: (PaylisherDeepLink, @escaping (Bool) -> Void) -> Void) | Registers a closure for auth-gated destinations. Call the completion with true/false. |
onDeepLinkFailed(_ handler: (URL, Error?) -> Void) | Registers a closure for parse/handle failures. |
setDeepLinkHandler(_ handler: PaylisherDeepLinkHandler) | Delegate-based alternative to the closures above. |
Forwarding links
| Method | What it does |
|---|---|
View.paylisherDeepLinks() | SwiftUI modifier — forwards onOpenURL + onContinueUserActivity. iOS 14+. |
handleDeepLink(_ url: URL) -> Bool | Handles a custom-scheme URL. Returns true if handled. |
handleUserActivity(_ userActivity: NSUserActivity) -> Bool | Handles a Universal Link NSUserActivity. |
handleURLContexts(_ contexts: Set<UIOpenURLContext>) | Handles URLs from SceneDelegate. |