Cotton code
12 lines · 543 B · SwiftRaw
// The ONE name for "a SwiftUI wrapper around a platform view", so a screen// that wraps WebKit or PDFKit — frameworks both destinations have — declares// its struct once and puts only the `make`/`update` pair under `#if os(iOS)`.// A struct's header cannot straddle an `#if` (each branch must hold balanced// braces), which is why this is a typealias and not two declarations.import SwiftUI#if os(iOS)typealias PlatformViewRepresentable = UIViewRepresentable#elsetypealias PlatformViewRepresentable = NSViewRepresentable#endif