Skip to content

Commit f249ad7

Browse files
guitaripodclaude
andauthored
Add support for tvOS (#254)
* Add support for tvOS in Package.swift and GPU.swift * Fix tvOS availability check in GPU.swift Replace conditional compilation with proper availability check for tvOS 17.0 as suggested in PR review. The architecture property is available on tvOS 17.0 and later according to Apple documentation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent b79c74c commit f249ad7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ let package = Package(
1010
platforms: [
1111
.macOS("13.3"),
1212
.iOS(.v16),
13+
.tvOS(.v16),
1314
.visionOS(.v1),
1415
],
1516

Source/MLX/GPU.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public enum GPU {
340340

341341
if let device = MTLCreateSystemDefaultDevice() {
342342
let architecture: String
343-
if #available(macOS 14.0, iOS 17.0, *) {
343+
if #available(macOS 14.0, iOS 17.0, tvOS 17.0, *) {
344344
architecture = device.architecture.name
345345
} else {
346346
architecture = device.name

0 commit comments

Comments
 (0)