ExternalURLs.swift 451 B

123456789101112131415
  1. import Foundation
  2. extension BackendFeatures {
  3. /// Backend methods for opening URLs in external apps.
  4. ///
  5. /// These are used by ``EnvironmentValues/openURL``.
  6. @MainActor
  7. public protocol ExternalURLs: Core {
  8. /// Opens an external URL in the system browser or app registered for the
  9. /// URL's protocol.
  10. ///
  11. /// - Parameter url: The URL to open.
  12. func openExternalURL(_ url: URL) throws
  13. }
  14. }