diff --git a/Sources/SafePreviewDevice/SafePreviewDevice.swift b/Sources/SafePreviewDevice/PreviewDeviceExtension.swift similarity index 100% rename from Sources/SafePreviewDevice/SafePreviewDevice.swift rename to Sources/SafePreviewDevice/PreviewDeviceExtension.swift diff --git a/Sources/SafePreviewDevice/ViewExtension.swift b/Sources/SafePreviewDevice/ViewExtension.swift new file mode 100644 index 0000000..8078c5b --- /dev/null +++ b/Sources/SafePreviewDevice/ViewExtension.swift @@ -0,0 +1,18 @@ +// +// ViewExtension.swift +// SafePreviewDevice +// +// Created by MUSOLINO Antonino on 29/04/2020. +// + +#if canImport(SwiftUI) +import SwiftUI + +@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *) +public extension View { + func previewDevice(_ device: Devices) -> some View { + return PreviewDevice(device: device) + } +} + +#endif