Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comply with renaming of Apple TV (4th generation) to Apple TV HD. #196

Merged
merged 2 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Device.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public enum Device {
/// ![Image](https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/SP773/homepod_space_gray_large_2x.jpg)
case homePod
#elseif os(tvOS)
/// Device is an [Apple TV 4](https://support.apple.com/kb/SP724)
/// Device is an [Apple TV HD](https://support.apple.com/kb/SP724) (Previously Apple TV (4th generation))
///
/// ![Image](http://images.apple.com/v/tv/c/images/overview/buy_tv_large_2x.jpg)
case appleTV4
Expand Down Expand Up @@ -983,7 +983,7 @@ extension Device: CustomStringConvertible {
}
#elseif os(tvOS)
switch self {
case .appleTV4: return "Apple TV 4"
case .appleTV4: return "Apple TV HD"
case .appleTV4K: return "Apple TV 4K"
case .simulator(let model): return "Simulator (\(model))"
case .unknown(let identifier): return identifier
Expand Down
4 changes: 2 additions & 2 deletions Source/Device.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ homePods = [
]
# tvOS
tvs = [
Device("appleTV4", "Device is an [Apple TV 4](https://support.apple.com/kb/SP724)", "http://images.apple.com/v/tv/c/images/overview/buy_tv_large_2x.jpg", ["AppleTV5,3"], 0, (), "Apple TV 4", -1, False, False, False, False, False, False, False, False, 0, False, 0),
Device("appleTV4K", "Device is an [Apple TV 4K](https://support.apple.com/kb/SP769)", "https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/SP769/appletv4k.png", ["AppleTV6,2"], 0, (), "Apple TV 4K", -1, False, False, False, False, False, False, False, False, 0, False, 0)
Device("appleTV4", "Device is an [Apple TV HD](https://support.apple.com/kb/SP724) (Previously Apple TV (4th generation))", "http://images.apple.com/v/tv/c/images/overview/buy_tv_large_2x.jpg", ["AppleTV5,3"], 0, (), "Apple TV HD", -1, False, False, False, False, False, False, False, False, 0, False, 0),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denisenepraunig Should we do this, introducing a breaking change?

Suggested change
Device("appleTV4", "Device is an [Apple TV HD](https://support.apple.com/kb/SP724) (Previously Apple TV (4th generation))", "http://images.apple.com/v/tv/c/images/overview/buy_tv_large_2x.jpg", ["AppleTV5,3"], 0, (), "Apple TV HD", -1, False, False, False, False, False, False, False, False, 0, False, 0),
Device("appleTVHD", "Device is an [Apple TV HD](https://support.apple.com/kb/SP724) (Previously Apple TV (4th generation))", "http://images.apple.com/v/tv/c/images/overview/buy_tv_large_2x.jpg", ["AppleTV5,3"], 0, (), "Apple TV HD", -1, False, False, False, False, False, False, False, False, 0, False, 0),

Device("appleTV4K", "Device is an [Apple TV 4K](https://support.apple.com/kb/SP769)", "https://support.apple.com/library/APPLE/APPLECARE_ALLGEOS/SP769/appletv4k.png", ["AppleTV6,2"], 0, (), "Apple TV 4K", -1, False, False, False, False, False, False, False, False, 0, False, 0)
]

# watchOS
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class DeviceKitTests: XCTestCase {
}

func testDescriptionFromIdentifier() {
XCTAssertEqual(Device.mapToDevice(identifier: "AppleTV5,3").description, "Apple TV 4")
XCTAssertEqual(Device.mapToDevice(identifier: "AppleTV5,3").description, "Apple TV HD")
XCTAssertEqual(Device.mapToDevice(identifier: "AppleTV6,2").description, "Apple TV 4K")
}

Expand Down