From 8f5dcb449f7b053fc094e883d0170878d1c72f0b Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Fri, 29 Dec 2023 14:22:13 +0100 Subject: [PATCH] Remove `ObjectFactory` dependency --- Package.swift | 5 ----- Package@swift-5.7.swift | 5 ----- .../TestHelpers/Helpers/WindowSceneFactory.swift | 9 +-------- project.yml | 4 ---- 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/Package.swift b/Package.swift index dd4acbb0b..fea55f4e2 100644 --- a/Package.swift +++ b/Package.swift @@ -20,7 +20,6 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/space-code/concurrency.git", .upToNextMajor(from: "0.0.1")), - .package(url: "https://github.com/space-code/objects-factory.git", .upToNextMajor(from: "1.0.0")), ], targets: [ .target( @@ -34,11 +33,7 @@ let package = Package( name: "FlareTests", dependencies: [ "Flare", - .product(name: "ObjectsFactory", package: "objects-factory"), .product(name: "TestConcurrency", package: "concurrency"), - ], - resources: [ - .process("Flare.storekit"), ] ), ] diff --git a/Package@swift-5.7.swift b/Package@swift-5.7.swift index 5a2b1d50b..814b9fc31 100644 --- a/Package@swift-5.7.swift +++ b/Package@swift-5.7.swift @@ -17,7 +17,6 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/space-code/concurrency.git", .upToNextMajor(from: "0.0.1")), - .package(url: "https://github.com/space-code/objects-factory.git", .upToNextMajor(from: "1.0.0")), ], targets: [ .target( @@ -30,12 +29,8 @@ let package = Package( name: "FlareTests", dependencies: [ "Flare", - .product(name: "ObjectsFactory", package: "objects-factory"), .product(name: "TestConcurrency", package: "concurrency"), ], - resources: [ - .process("Flare.storekit"), - ] ), ] ) diff --git a/Tests/FlareTests/UnitTests/TestHelpers/Helpers/WindowSceneFactory.swift b/Tests/FlareTests/UnitTests/TestHelpers/Helpers/WindowSceneFactory.swift index 337484a51..4c21b2c38 100644 --- a/Tests/FlareTests/UnitTests/TestHelpers/Helpers/WindowSceneFactory.swift +++ b/Tests/FlareTests/UnitTests/TestHelpers/Helpers/WindowSceneFactory.swift @@ -4,18 +4,11 @@ // #if os(iOS) || VISION_OS - import ObjectsFactory import UIKit final class WindowSceneFactory { static func makeWindowScene() -> UIWindowScene { - do { - let session = try ObjectsFactory.create(UISceneSession.self) - let scene = try ObjectsFactory.create(UIWindowScene.self, properties: ["session": session]) - return scene - } catch { - fatalError(error.localizedDescription) - } + UIApplication.shared.connectedScenes.first as! UIWindowScene } } #endif diff --git a/project.yml b/project.yml index 558a79566..45748d5a3 100644 --- a/project.yml +++ b/project.yml @@ -11,9 +11,6 @@ packages: Concurrency: url: https://github.com/space-code/concurrency.git from: 0.0.1 - ObjectsFactory: - url: https://github.com/space-code/objects-factory.git - from: 1.0.0 targets: UnitTestHostApp: type: application @@ -47,7 +44,6 @@ targets: dependencies: - package: Concurrency product: TestConcurrency - - package: ObjectsFactory - target: Flare settings: base: