IncomingURLs.swift 495 B

123456789101112131415
  1. import Foundation
  2. extension BackendFeatures {
  3. /// Backend methods for handling incoming URLs.
  4. ///
  5. /// These are used by ``View/onOpenURL(perform:)``.
  6. @MainActor
  7. public protocol IncomingURLs: Core {
  8. /// Sets the handler for URLs directed to the application (e.g. URLs
  9. /// associated with a custom URL scheme).
  10. ///
  11. /// - Parameter action: The incoming URL handler.
  12. func setIncomingURLHandler(to action: @escaping (URL) -> Void)
  13. }
  14. }