diff --git a/CHANGELOG.md b/CHANGELOG.md index 825c32f..5b26425 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,5 @@ # Changelog +## v0.8.0 - 2026-01-19 +### 🐞 Fixes +- [Patch] Added editor version label (a07b4b2…) +- [Patch] added button for multi-platform option (259f3ee…) diff --git a/Package.swift b/Package.swift index b76ea32..97f7ff2 100644 --- a/Package.swift +++ b/Package.swift @@ -13,7 +13,7 @@ let package = Package( // Use a branch during active development: // .package(url: "https://github.com/untoldengine/UntoldEngine.git", branch: "develop"), // Or pin to a release: - .package(url: "https://github.com/untoldengine/UntoldEngine.git", exact: "0.7.1"), + .package(url: "https://github.com/untoldengine/UntoldEngine.git", exact: "0.8.0"), ], targets: [ .executableTarget( diff --git a/Sources/UntoldEditor/Build/CreateProjectView.swift b/Sources/UntoldEditor/Build/CreateProjectView.swift index 2d0dc3f..80c3768 100644 --- a/Sources/UntoldEditor/Build/CreateProjectView.swift +++ b/Sources/UntoldEditor/Build/CreateProjectView.swift @@ -29,7 +29,7 @@ struct CreateProjectView: View { @Environment(\.dismiss) private var dismiss - private let targets = ["macOS", "iOS", "iOS AR", "visionOS"] + private let targets = ["macOS", "iOS", "iOS AR", "visionOS", "Multi-Platform"] private let macOSVersions = ["13.0", "14.0", "15.0"] private let optimizationLevels = ["None", "Speed", "Size"] @@ -66,7 +66,7 @@ struct CreateProjectView: View { } .pickerStyle(.segmented) - if selectedTarget == 0 { // macOS + if selectedTarget == 0 || selectedTarget == 4 { // macOS or Multi-Platform Picker("macOS Version", selection: $macOSVersion) { ForEach(0 ..< macOSVersions.count, id: \.self) { index in Text(macOSVersions[index]).tag(index) @@ -248,6 +248,15 @@ struct CreateProjectView: View { target = .iOS(deployment: .v17) case 3: // visionOS target = .visionOS(deployment: .v26) + case 4: // Multi-Platform + let version: MacOSVersion + switch macOSVersion { + case 0: version = .v13 + case 1: version = .v14 + case 2: version = .v15 + default: version = .v15 + } + target = .multi(macOS: version, iOS: .v17, visionOS: .v26) default: target = .macOS(deployment: .v15) } @@ -291,6 +300,6 @@ struct CreateProjectView: View { } } -#Preview { - CreateProjectView() -} +// #Preview { +// CreateProjectView() +// } diff --git a/Sources/UntoldEditor/Editor/ToolbarView.swift b/Sources/UntoldEditor/Editor/ToolbarView.swift index 1a29bb1..8c8852c 100644 --- a/Sources/UntoldEditor/Editor/ToolbarView.swift +++ b/Sources/UntoldEditor/Editor/ToolbarView.swift @@ -14,6 +14,7 @@ struct ToolbarView: View { @ObservedObject var selectionManager: SelectionManager @ObservedObject var editorBasePath = EditorAssetBasePath.shared + private let editorVersionLabel = "v0.8.0" var onSave: () -> Void var onSaveAs: () -> Void @@ -213,6 +214,14 @@ .background(Color.editorAccent.opacity(0.3)) .cornerRadius(6) } + + Text(editorVersionLabel) + .font(.system(size: 11, weight: .semibold, design: .monospaced)) + .foregroundColor(.white) + .padding(.horizontal, 8) + .padding(.vertical, 4) + .background(Color.editorSurface.opacity(0.6)) + .cornerRadius(6) } } diff --git a/Tests/UntoldEditorTests/CreateProjectViewTests.swift b/Tests/UntoldEditorTests/CreateProjectViewTests.swift index 031415a..4b811c8 100644 --- a/Tests/UntoldEditorTests/CreateProjectViewTests.swift +++ b/Tests/UntoldEditorTests/CreateProjectViewTests.swift @@ -55,6 +55,15 @@ final class CreateProjectViewTests: XCTestCase { target = .iOS(deployment: .v17) case 3: // visionOS target = .visionOS(deployment: .v26) + case 4: // Multi-Platform + let version: MacOSVersion + switch macOSVersion { + case 0: version = .v13 + case 1: version = .v14 + case 2: version = .v15 + default: version = .v15 + } + target = .multi(macOS: version, iOS: .v17, visionOS: .v26) default: target = .macOS(deployment: .v15) } @@ -333,7 +342,7 @@ final class CreateProjectViewTests: XCTestCase { // MARK: - Target Platform Tests - func test_targetPlatforms_arrayContainsFourOptions() { + func test_targetPlatforms_arrayContainsFiveOptions() { // Arrange let view = CreateProjectView() let mirror = Mirror(reflecting: view) @@ -341,11 +350,12 @@ final class CreateProjectViewTests: XCTestCase { // Act: Get targets array if let targets = mirror.descendant("targets") as? [String] { // Assert - XCTAssertEqual(targets.count, 4, "Should have 4 platform options") + XCTAssertEqual(targets.count, 5, "Should have 5 platform options") XCTAssertEqual(targets[0], "macOS", "First target should be macOS") XCTAssertEqual(targets[1], "iOS", "Second target should be iOS") XCTAssertEqual(targets[2], "iOS AR", "Third target should be iOS AR") XCTAssertEqual(targets[3], "visionOS", "Fourth target should be visionOS") + XCTAssertEqual(targets[4], "Multi-Platform", "Fifth target should be Multi-Platform") } } @@ -566,6 +576,25 @@ final class CreateProjectViewTests: XCTestCase { } } + func test_targetSwitch_multiPlatform_index4() { + // Arrange + let selectedTarget = 4 + + // Act + let target: BuildTarget + switch selectedTarget { + case 4: target = .multi(macOS: .v15, iOS: .v17, visionOS: .v26) + default: target = .macOS(deployment: .v15) + } + + // Assert + if case .multi = target { + XCTAssertTrue(true, "Target 4 should map to Multi-Platform") + } else { + XCTFail("Target 4 should be Multi-Platform") + } + } + func test_targetSwitch_defaultFallback() { // Arrange let selectedTarget = 999 // Invalid index @@ -577,6 +606,7 @@ final class CreateProjectViewTests: XCTestCase { case 1: target = .iOS(deployment: .v17) case 2: target = .iOS(deployment: .v17) case 3: target = .visionOS(deployment: .v26) + case 4: target = .multi(macOS: .v15, iOS: .v17, visionOS: .v26) default: target = .macOS(deployment: .v15) }