Skip to content

Commit

Permalink
Check for iPad VIsion in TargetLinter
Browse files Browse the repository at this point in the history
  • Loading branch information
freak4pc committed Mar 6, 2024
1 parent 27a4ee6 commit ddcf375
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Sources/TuistGenerator/Linter/TargetLinter.swift
Expand Up @@ -223,7 +223,10 @@ class TargetLinter: TargetLinting {
case .macOS: if !target.supports(.macOS) { return [inconsistentPlatformIssue] }
case .watchOS: if !target.supports(.watchOS) { return [inconsistentPlatformIssue] }
case .tvOS: if !target.supports(.tvOS) { return [inconsistentPlatformIssue] }
case .visionOS: if !target.supports(.visionOS) { return [inconsistentPlatformIssue] }
case .visionOS:
if !target.supports(.visionOS), !target.destinations.contains(.appleVisionWithiPadDesign) {
return [inconsistentPlatformIssue]
}
}
return []
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/TuistGraph/Models/Destination.swift
Expand Up @@ -31,15 +31,15 @@ public enum Destination: String, Codable, Equatable, CaseIterable {

public var platform: Platform {
switch self {
case .iPad, .iPhone, .macCatalyst, .macWithiPadDesign:
case .iPad, .iPhone, .macCatalyst, .macWithiPadDesign, .appleVisionWithiPadDesign:
return .iOS
case .mac:
return .macOS
case .appleTv:
return .tvOS
case .appleWatch:
return .watchOS
case .appleVision, .appleVisionWithiPadDesign:
case .appleVision:
return .visionOS
}
}
Expand Down

0 comments on commit ddcf375

Please sign in to comment.