Is there a way to get the current platform of the device? I'm hoping for a better way than to do something like this:
let platform: String
#if os(iOS)
platform = "iOS"
#elseif os(watchOS)
platform = "watchOS"
#elseif os(tvOS)
platform = "tvOS"
#elseif os(macOS)
platform = "macOS"
#else
platform = "unknown"
#endif
Is there a better way to do this?