mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-08-16 16:20:51 +03:00
Add support for visionOS (#1379)
* Add support for visionOS * Update ProjectSpec * Add carthageName property for .visionOS * Update CHANGELOG.md and ProjectSpec.md * Add visionOS yml to SettingPresets/Platforms and SettingPresets/Product_Platform --------- Co-authored-by: Satsuki Hashiba <hashiba.satsuki@linecorp.com>
This commit is contained in:
parent
49a9bda992
commit
3a215ce999
@ -5,6 +5,7 @@
|
||||
### Added
|
||||
|
||||
- Added `scheme.enableGPUValidationMode` #1294 @LouisLWang
|
||||
- Added visionOS support #1379 @shiba1014
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -434,6 +434,7 @@ This will provide default build settings for a certain platform. It can be any o
|
||||
- `macOS`
|
||||
- `tvOS`
|
||||
- `watchOS`
|
||||
- `visionOS` (`visionOS` doesn't support Carthage usage)
|
||||
|
||||
**Multi Platform targets**
|
||||
|
||||
|
2
SettingPresets/Platforms/visionOS.yml
Normal file
2
SettingPresets/Platforms/visionOS.yml
Normal file
@ -0,0 +1,2 @@
|
||||
SDKROOT: xros
|
||||
TARGETED_DEVICE_FAMILY: 7
|
1
SettingPresets/Product_Platform/application_visionOS.yml
Normal file
1
SettingPresets/Product_Platform/application_visionOS.yml
Normal file
@ -0,0 +1 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
@ -8,17 +8,20 @@ public struct DeploymentTarget: Equatable {
|
||||
public var tvOS: Version?
|
||||
public var watchOS: Version?
|
||||
public var macOS: Version?
|
||||
public var visionOS: Version?
|
||||
|
||||
public init(
|
||||
iOS: Version? = nil,
|
||||
tvOS: Version? = nil,
|
||||
watchOS: Version? = nil,
|
||||
macOS: Version? = nil
|
||||
macOS: Version? = nil,
|
||||
visionOS: Version? = nil
|
||||
) {
|
||||
self.iOS = iOS
|
||||
self.tvOS = tvOS
|
||||
self.watchOS = watchOS
|
||||
self.macOS = macOS
|
||||
self.visionOS = visionOS
|
||||
}
|
||||
|
||||
public func version(for platform: Platform) -> Version? {
|
||||
@ -27,6 +30,7 @@ public struct DeploymentTarget: Equatable {
|
||||
case .tvOS: return tvOS
|
||||
case .watchOS: return watchOS
|
||||
case .macOS: return macOS
|
||||
case .visionOS: return visionOS
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -39,6 +43,7 @@ extension Platform {
|
||||
case .tvOS: return "TVOS_DEPLOYMENT_TARGET"
|
||||
case .watchOS: return "WATCHOS_DEPLOYMENT_TARGET"
|
||||
case .macOS: return "MACOSX_DEPLOYMENT_TARGET"
|
||||
case .visionOS: return "XROS_DEPLOYMENT_TARGET"
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,6 +53,7 @@ extension Platform {
|
||||
case .tvOS: return "appletvos"
|
||||
case .watchOS: return "watchos"
|
||||
case .macOS: return "macosx"
|
||||
case .visionOS: return "xros"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,6 +83,7 @@ extension DeploymentTarget: JSONObjectConvertible {
|
||||
tvOS = try parseVersion("tvOS")
|
||||
watchOS = try parseVersion("watchOS")
|
||||
macOS = try parseVersion("macOS")
|
||||
visionOS = try parseVersion("visionOS")
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,6 +94,7 @@ extension DeploymentTarget: JSONEncodable {
|
||||
"tvOS": tvOS?.description,
|
||||
"watchOS": watchOS?.description,
|
||||
"macOS": macOS?.description,
|
||||
"visionOS": visionOS?.description,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,5 @@ public enum Platform: String, Hashable, CaseIterable {
|
||||
case watchOS
|
||||
case tvOS
|
||||
case macOS
|
||||
case visionOS
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ extension Platform {
|
||||
case .watchOS: return "⌚️"
|
||||
case .tvOS: return "📺"
|
||||
case .macOS: return "🖥"
|
||||
case .visionOS: return "🕶️"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,6 +159,9 @@ extension Platform {
|
||||
return "watchOS"
|
||||
case .macOS:
|
||||
return "Mac"
|
||||
case .visionOS:
|
||||
// This is a dummy value because Carthage doesn't support visionOS.
|
||||
return "visionOS"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1561,7 +1561,7 @@ extension Platform {
|
||||
/// - returns: `true` for platforms that the app store requires simulator slices to be stripped.
|
||||
public var requiresSimulatorStripping: Bool {
|
||||
switch self {
|
||||
case .iOS, .tvOS, .watchOS:
|
||||
case .iOS, .tvOS, .watchOS, .visionOS:
|
||||
return true
|
||||
case .macOS:
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user