Skip to content

Commit 87c31c4

Browse files
update for tv-os
1 parent 52242c7 commit 87c31c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/PowerSync/Kotlin/sync/UserAgent.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ func userAgent() async -> String {
1111
let osName = "watchOS"
1212
#elseif os(iOS)
1313
let osName = "iOS"
14+
#elseif os(tvOS)
15+
let osName = "tvOS"
1416
#else
1517
let osName = "unknown"
1618
#endif
@@ -20,7 +22,7 @@ func userAgent() async -> String {
2022

2123
// Returns the OS version string for the current platform
2224
@MainActor func getOSVersion() async -> String {
23-
#if os(iOS)
25+
#if os(iOS) || os(tvOS)
2426
// UIDevice must be accessed on the main actor
2527
return UIDevice.current.systemVersion
2628
#else

0 commit comments

Comments
 (0)