This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// View+OpenUrl.swift | |
// | |
// Created by James Sedlacek on 11/26/24. | |
// | |
/// This file provides a safe way to open URLs in SwiftUI applications. | |
/// It adds a view modifier that handles URL opening with user confirmation | |
/// and multiple opening options (browser, in-app, or copy to clipboard). | |
/// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WatchKit | |
import WatchConnectivity | |
// Encapsulating in a tuple for don't duplicate code | |
typealias MessageReceived = (session: WCSession, message: [String : Any], replyHandler: (([String : Any]) -> Void)?) | |
// 1: Same that before, but to manage ApplicationContextReceived | |
typealias ApplicationContextReceived = (session: WCSession, applicationContext: [String : Any]) | |
// Protocol for manage all watchOS delegations | |
protocol WatchOSDelegate: AnyObject { |