From 8af2c05b1b9510748f6ead114eb4d3f4ff8040a4 Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 10 Mar 2024 02:51:43 +0900 Subject: [PATCH 1/9] make sendable for protocol/class --- MutaroModule/Sources/Core/Client/Providable.swift | 2 +- .../Sources/Core/DI/AppIntroductionFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift | 2 +- .../Sources/Core/DI/RegisterJWTFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/ViewBuilder.swift | 4 ++-- .../Sources/Core/ImageLoader/ImageDownloadService.swift | 2 +- .../DI/AppIntroductionFeatureComponent.swift | 2 +- .../DI/AppIntroductionFeatureEnvironment.swift | 2 +- .../AppIntroduction/Router/AppIntroductionRouter.swift | 6 +++--- .../ViewModel/AppIntroductionViewModel.swift | 2 +- .../Sources/Features/Home/DI/HomeFeatureComponent.swift | 4 ++-- .../Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift | 6 +++--- .../MyAppTools/DI/MyAppToolsFeatureEnvironment.swift | 2 +- .../Features/MyAppTools/Router/MyAppToolsRouter.swift | 6 +++--- .../Features/MyAppTools/UseCase/CIProductUseCase.swift | 2 +- .../Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift | 2 +- .../Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift | 4 ++-- .../Features/MyApps/DI/MyAppsFeatureEnvironment.swift | 2 +- .../Sources/Features/MyApps/Router/MyAppsRouter.swift | 6 +++--- .../Sources/Features/MyApps/UseCase/AppInfoUseCase.swift | 2 +- .../Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift | 2 +- .../RegisterJWT/DI/RegisterJWTFeatureComponent.swift | 4 ++-- .../RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift | 2 +- .../Features/RegisterJWT/Router/RegisterJWTRouter.swift | 6 +++--- .../RegisterJWT/ViewModel/RegisterJWTViewModel.swift | 2 +- .../Features/Setting/DI/SettingFeatureComponent.swift | 2 +- .../Features/Setting/DI/SettingFeatureEnvironment.swift | 2 +- .../Sources/Features/Setting/Router/SettingRouter.swift | 6 +++--- .../Setting/ViewController/SettingViewController.swift | 2 +- .../Features/Setting/ViewModel/SettingViewModel.swift | 2 +- 33 files changed, 49 insertions(+), 49 deletions(-) diff --git a/MutaroModule/Sources/Core/Client/Providable.swift b/MutaroModule/Sources/Core/Client/Providable.swift index df84989d..5b8c386e 100644 --- a/MutaroModule/Sources/Core/Client/Providable.swift +++ b/MutaroModule/Sources/Core/Client/Providable.swift @@ -7,7 +7,7 @@ import Foundation -public protocol Providable { +public protocol Providable: Sendable { func request(endpoint: Endpoint, responseModel: T.Type) async -> Result< T, RequestError > diff --git a/MutaroModule/Sources/Core/DI/AppIntroductionFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/AppIntroductionFeatureBuilder.swift index 9bb69dee..947af6b6 100644 --- a/MutaroModule/Sources/Core/DI/AppIntroductionFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/AppIntroductionFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol AppIntroductionFeatureBuildable: Buildable { +public protocol AppIntroductionFeatureBuildable: Buildable, Sendable { @MainActor func build() -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift index bd4b89a6..3ffef8aa 100644 --- a/MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol HomeFeatureBuildable: Buildable { +public protocol HomeFeatureBuildable: Buildable, Sendable { @MainActor func build(viewControllers: [UIViewController]) -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift index 473400cc..325fa829 100644 --- a/MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol MyAppToolsFeatureBuildable: Buildable { +public protocol MyAppToolsFeatureBuildable: Buildable, Sendable { @MainActor func build(appId: String) -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift index e0836f40..d3991c92 100644 --- a/MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol MyAppsFeatureBuildable: Buildable { +public protocol MyAppsFeatureBuildable: Buildable, Sendable { @MainActor func build() -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift index 0ce4bbe3..07f14249 100644 --- a/MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol RegisterJWTFeatureBuildable: Buildable { +public protocol RegisterJWTFeatureBuildable: Buildable, Sendable { @MainActor func build() -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift index a8d8d69f..728f7c57 100644 --- a/MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol SettingFeatureBuildable: Buildable { +public protocol SettingFeatureBuildable: Buildable, Sendable { @MainActor func build() -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/ViewBuilder.swift b/MutaroModule/Sources/Core/DI/ViewBuilder.swift index 2afd26c1..8eda1991 100644 --- a/MutaroModule/Sources/Core/DI/ViewBuilder.swift +++ b/MutaroModule/Sources/Core/DI/ViewBuilder.swift @@ -8,9 +8,9 @@ import Foundation import NeedleFoundation -public protocol Buildable: AnyObject {} +public protocol Buildable {} -open class Builder: Buildable { +open class Builder: Buildable, @unchecked Sendable { public let dependency: Dependency public init(dependency: Dependency) { diff --git a/MutaroModule/Sources/Core/ImageLoader/ImageDownloadService.swift b/MutaroModule/Sources/Core/ImageLoader/ImageDownloadService.swift index 9fdfd3ae..af620fed 100644 --- a/MutaroModule/Sources/Core/ImageLoader/ImageDownloadService.swift +++ b/MutaroModule/Sources/Core/ImageLoader/ImageDownloadService.swift @@ -8,7 +8,7 @@ import Foundation import Kingfisher -public protocol ImageDownloadService { +public protocol ImageDownloadService: Sendable { func downloadImage(with urlString: String, cache targetCache: ImageCache) func cancelDownloadImage(with urlString: String) } diff --git a/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureComponent.swift b/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureComponent.swift index 503b1816..6990716e 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureComponent.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureComponent.swift @@ -10,7 +10,7 @@ import Foundation import NeedleFoundation import UIKit -public protocol AppIntroductionFeatureDependency: Dependency { +public protocol AppIntroductionFeatureDependency: Dependency, Sendable { // TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get } var myAppsFeatureBuilder: any MyAppsFeatureBuildable { get } var settingFeatureBuilder: any SettingFeatureBuildable { get } diff --git a/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureEnvironment.swift b/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureEnvironment.swift index 434f2734..f97bb4f7 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureEnvironment.swift @@ -7,7 +7,7 @@ import Foundation -public struct AppIntroductionFeatureEnvironment { +public struct AppIntroductionFeatureEnvironment: Sendable { public let router: any AppIntroductionRoutable public init(router: any AppIntroductionRoutable) { diff --git a/MutaroModule/Sources/Features/AppIntroduction/Router/AppIntroductionRouter.swift b/MutaroModule/Sources/Features/AppIntroduction/Router/AppIntroductionRouter.swift index 45f9dbb0..3977e31b 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/Router/AppIntroductionRouter.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/Router/AppIntroductionRouter.swift @@ -8,13 +8,13 @@ import Core import UIKit -public protocol AppIntroductionRoutable { +public protocol AppIntroductionRoutable: Sendable { @MainActor func showHomeAsRoot() } -public class AppIntroductionRouter: AppIntroductionRoutable { - public struct Dependency { +public final class AppIntroductionRouter: AppIntroductionRoutable { + public struct Dependency: Sendable { // TODO: - ここから遷移するfeatureのbuilder public let homeFeatureBuilder: any HomeFeatureBuildable public let myAppsFeatureBuilder: any MyAppsFeatureBuildable diff --git a/MutaroModule/Sources/Features/AppIntroduction/ViewModel/AppIntroductionViewModel.swift b/MutaroModule/Sources/Features/AppIntroduction/ViewModel/AppIntroductionViewModel.swift index f00fe126..5ff5709a 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/ViewModel/AppIntroductionViewModel.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/ViewModel/AppIntroductionViewModel.swift @@ -8,7 +8,7 @@ import Core import UIKit -public final class AppIntroductionViewModel: NSObject { +public final class AppIntroductionViewModel: NSObject, Sendable { private let environment: AppIntroductionFeatureEnvironment public init(environment: AppIntroductionFeatureEnvironment) { diff --git a/MutaroModule/Sources/Features/Home/DI/HomeFeatureComponent.swift b/MutaroModule/Sources/Features/Home/DI/HomeFeatureComponent.swift index 7ec73fdf..0b4b33ff 100644 --- a/MutaroModule/Sources/Features/Home/DI/HomeFeatureComponent.swift +++ b/MutaroModule/Sources/Features/Home/DI/HomeFeatureComponent.swift @@ -10,11 +10,11 @@ import Foundation import NeedleFoundation import UIKit -public protocol HomeFeatureDependency: Dependency { +public protocol HomeFeatureDependency: Dependency, Sendable { // TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get } } -class HomeFeatureBuilder: Builder, HomeFeatureBuildable { +public class HomeFeatureBuilder: Builder, HomeFeatureBuildable { @MainActor public func build(viewControllers: [UIViewController]) -> UIViewController { HomeTabViewController(viewControllers: viewControllers) diff --git a/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift b/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift index 16051e70..7073da90 100644 --- a/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift +++ b/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift @@ -10,13 +10,13 @@ import Foundation import NeedleFoundation import UIKit -public protocol MyAppToolsFeatureDependency: Dependency { +public protocol MyAppToolsFeatureDependency: Dependency, Sendable { var client: any Providable { get } } -class MyAppToolsFeatureBuilder: Builder, MyAppToolsFeatureBuildable { +public class MyAppToolsFeatureBuilder: Builder, MyAppToolsFeatureBuildable { @MainActor - func build(appId: String) -> UIViewController { + public func build(appId: String) -> UIViewController { let myAppTools = MyAppToolsViewController( dependency: .init( viewModel: .init( diff --git a/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureEnvironment.swift b/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureEnvironment.swift index 113ea97f..fd0f0f6f 100644 --- a/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureEnvironment.swift @@ -8,7 +8,7 @@ import Core import Foundation -public struct MyAppToolsFeatureEnvironment { +public struct MyAppToolsFeatureEnvironment: Sendable { public let ciProductUseCase: any CIProductUseCase public let router: any MyAppToolsRoutable diff --git a/MutaroModule/Sources/Features/MyAppTools/Router/MyAppToolsRouter.swift b/MutaroModule/Sources/Features/MyAppTools/Router/MyAppToolsRouter.swift index 9d430a0e..9239c82d 100644 --- a/MutaroModule/Sources/Features/MyAppTools/Router/MyAppToolsRouter.swift +++ b/MutaroModule/Sources/Features/MyAppTools/Router/MyAppToolsRouter.swift @@ -8,10 +8,10 @@ import Core import Foundation -public protocol MyAppToolsRoutable {} +public protocol MyAppToolsRoutable: Sendable {} -public class MyAppToolsRouter: MyAppToolsRoutable { - public struct Dependency {} +public final class MyAppToolsRouter: MyAppToolsRoutable { + public struct Dependency: Sendable {} private let dependency: Dependency diff --git a/MutaroModule/Sources/Features/MyAppTools/UseCase/CIProductUseCase.swift b/MutaroModule/Sources/Features/MyAppTools/UseCase/CIProductUseCase.swift index c28535fa..f3ea0bc7 100644 --- a/MutaroModule/Sources/Features/MyAppTools/UseCase/CIProductUseCase.swift +++ b/MutaroModule/Sources/Features/MyAppTools/UseCase/CIProductUseCase.swift @@ -10,7 +10,7 @@ import Core import Foundation import JWTGenerator -public protocol CIProductUseCase { +public protocol CIProductUseCase: Sendable { func fetchCIProducts(storedJWTInfo: JWTGenerator.MutaroJWT.JWTRequestInfo, appId: String) async throws -> CIProductsEntity.CIProductsData? } diff --git a/MutaroModule/Sources/Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift b/MutaroModule/Sources/Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift index 22d8e98c..5936edb7 100644 --- a/MutaroModule/Sources/Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift +++ b/MutaroModule/Sources/Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift @@ -24,7 +24,7 @@ extension MyAppToolsViewModel { } } -public class MyAppToolsViewModel: MyAppToolsViewModelProtocol { +public final class MyAppToolsViewModel: MyAppToolsViewModelProtocol, Sendable { private let appId: String private let environment: MyAppToolsFeatureEnvironment var cancellables: Set = [] diff --git a/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift b/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift index 18f458ad..69137565 100644 --- a/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift +++ b/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift @@ -11,14 +11,14 @@ import ImageLoader import NeedleFoundation import UIKit -public protocol MyAppsFeatureDependency: Dependency { +public protocol MyAppsFeatureDependency: Dependency, Sendable { var client: any Providable { get } var imageDownloadService: any ImageDownloadService { get } var registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable { get } var myAppToolsFeatureBuilder: any MyAppToolsFeatureBuildable { get } } -class MyAppsFeatureBuilder: Builder, MyAppsFeatureBuildable { +public class MyAppsFeatureBuilder: Builder, MyAppsFeatureBuildable { @MainActor public func build() -> UIViewController { let myAppsVC = MyAppsViewController( diff --git a/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureEnvironment.swift b/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureEnvironment.swift index 24fe21b0..26b56e07 100644 --- a/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureEnvironment.swift @@ -8,7 +8,7 @@ import Core import Foundation -public struct MyAppsFeatureEnvironment { +public struct MyAppsFeatureEnvironment: Sendable { public let appInfoUseCase: any AppInfoUseCase public let imageDownloadService: any ImageDownloadService public let router: any MyAppsRoutable diff --git a/MutaroModule/Sources/Features/MyApps/Router/MyAppsRouter.swift b/MutaroModule/Sources/Features/MyApps/Router/MyAppsRouter.swift index 8f9ead02..ca3fe5ad 100644 --- a/MutaroModule/Sources/Features/MyApps/Router/MyAppsRouter.swift +++ b/MutaroModule/Sources/Features/MyApps/Router/MyAppsRouter.swift @@ -8,15 +8,15 @@ import Core import UIKit -public protocol MyAppsRoutable { +public protocol MyAppsRoutable: Sendable { @MainActor func showRegisterJWT(from viewController: UIViewController) @MainActor func showMyAppTools(from viewController: UIViewController, appId: String) } -public class MyAppsRouter: MyAppsRoutable { - public struct Dependency { +public final class MyAppsRouter: MyAppsRoutable { + public struct Dependency: Sendable { public let registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable public let myAppToolsFeatureBuilder: any MyAppToolsFeatureBuildable diff --git a/MutaroModule/Sources/Features/MyApps/UseCase/AppInfoUseCase.swift b/MutaroModule/Sources/Features/MyApps/UseCase/AppInfoUseCase.swift index 16f47025..c3836753 100644 --- a/MutaroModule/Sources/Features/MyApps/UseCase/AppInfoUseCase.swift +++ b/MutaroModule/Sources/Features/MyApps/UseCase/AppInfoUseCase.swift @@ -10,7 +10,7 @@ import Core import Foundation import JWTGenerator -public protocol AppInfoUseCase { +public protocol AppInfoUseCase: Sendable { func fetchAppInfos(storedJWTInfo: JWTGenerator.MutaroJWT.JWTRequestInfo, myApps: [(id: String, name: String)]) async throws -> [AppInfo] func fetchMyApps(storedJWTInfo: JWTGenerator.MutaroJWT.JWTRequestInfo) async throws -> [MyAppsEntity.MyAppsData] } diff --git a/MutaroModule/Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift b/MutaroModule/Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift index 18b911c1..6af5f8a3 100644 --- a/MutaroModule/Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift +++ b/MutaroModule/Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift @@ -34,7 +34,7 @@ extension MyAppsViewModel { } } -public final class MyAppsViewModel: NSObject, MyAppsViewModelProtocol { +public final class MyAppsViewModel: NSObject, MyAppsViewModelProtocol, Sendable { private let environment: MyAppsFeatureEnvironment private let appInfosSubject: CurrentValueSubject<[AppInfo], Never> = .init([]) diff --git a/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureComponent.swift b/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureComponent.swift index 2c049dbb..6d4505c1 100644 --- a/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureComponent.swift +++ b/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureComponent.swift @@ -10,11 +10,11 @@ import Foundation import NeedleFoundation import UIKit -public protocol RegisterJWTFeatureDependency: Dependency { +public protocol RegisterJWTFeatureDependency: Dependency, Sendable { // TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get } } -class RegisterJWTFeatureBuilder: Builder, RegisterJWTFeatureBuildable { +public class RegisterJWTFeatureBuilder: Builder, RegisterJWTFeatureBuildable { @MainActor public func build() -> UIViewController { RegisterJWTViewController( diff --git a/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift b/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift index 92475dc3..011780ff 100644 --- a/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift @@ -7,7 +7,7 @@ import Foundation -public struct RegisterJWTFeatureEnvironment { +public struct RegisterJWTFeatureEnvironment: Sendable { public let router: any RegisterJWTFeatureRoutable public init(router: any RegisterJWTFeatureRoutable) { diff --git a/MutaroModule/Sources/Features/RegisterJWT/Router/RegisterJWTRouter.swift b/MutaroModule/Sources/Features/RegisterJWT/Router/RegisterJWTRouter.swift index 6ac2aa16..bd8cc289 100644 --- a/MutaroModule/Sources/Features/RegisterJWT/Router/RegisterJWTRouter.swift +++ b/MutaroModule/Sources/Features/RegisterJWT/Router/RegisterJWTRouter.swift @@ -7,13 +7,13 @@ import UIKit -public protocol RegisterJWTFeatureRoutable { +public protocol RegisterJWTFeatureRoutable: Sendable { @MainActor func close(from viewController: UIViewController) } -public class RegisterJWTFeatureRouter: RegisterJWTFeatureRoutable { - public struct Dependency {} +public final class RegisterJWTFeatureRouter: RegisterJWTFeatureRoutable { + public struct Dependency: Sendable {} private let dependency: Dependency diff --git a/MutaroModule/Sources/Features/RegisterJWT/ViewModel/RegisterJWTViewModel.swift b/MutaroModule/Sources/Features/RegisterJWT/ViewModel/RegisterJWTViewModel.swift index a36a3893..b84909fe 100644 --- a/MutaroModule/Sources/Features/RegisterJWT/ViewModel/RegisterJWTViewModel.swift +++ b/MutaroModule/Sources/Features/RegisterJWT/ViewModel/RegisterJWTViewModel.swift @@ -34,7 +34,7 @@ extension RegisterJWTViewModel { } } -public final class RegisterJWTViewModel: RegisterJWTViewModelProtocol { +public final class RegisterJWTViewModel: RegisterJWTViewModelProtocol, Sendable { private let showAlertSubject = PassthroughSubject() private var cancellables: Set = [] private let taskCancellables: TaskCancellable = .init() diff --git a/MutaroModule/Sources/Features/Setting/DI/SettingFeatureComponent.swift b/MutaroModule/Sources/Features/Setting/DI/SettingFeatureComponent.swift index b482339c..2acef906 100644 --- a/MutaroModule/Sources/Features/Setting/DI/SettingFeatureComponent.swift +++ b/MutaroModule/Sources/Features/Setting/DI/SettingFeatureComponent.swift @@ -10,7 +10,7 @@ import Foundation import NeedleFoundation import UIKit -public protocol SettingFeatureDependency: Dependency { +public protocol SettingFeatureDependency: Dependency, Sendable { // TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get } var registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable { get } } diff --git a/MutaroModule/Sources/Features/Setting/DI/SettingFeatureEnvironment.swift b/MutaroModule/Sources/Features/Setting/DI/SettingFeatureEnvironment.swift index 659c0f78..3da731c5 100644 --- a/MutaroModule/Sources/Features/Setting/DI/SettingFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/Setting/DI/SettingFeatureEnvironment.swift @@ -7,7 +7,7 @@ import Foundation -public struct SettingFeatureEnvironment { +public struct SettingFeatureEnvironment: Sendable { public let router: any SettingRoutable public init(router: any SettingRoutable) { diff --git a/MutaroModule/Sources/Features/Setting/Router/SettingRouter.swift b/MutaroModule/Sources/Features/Setting/Router/SettingRouter.swift index 84c5fd12..ffcb56fe 100644 --- a/MutaroModule/Sources/Features/Setting/Router/SettingRouter.swift +++ b/MutaroModule/Sources/Features/Setting/Router/SettingRouter.swift @@ -8,13 +8,13 @@ import Core import UIKit -public protocol SettingRoutable { +public protocol SettingRoutable: Sendable { @MainActor func showRegisterJWT(from viewController: UIViewController) } -public class SettingRouter: SettingRoutable { - public struct Dependency { +public final class SettingRouter: SettingRoutable { + public struct Dependency: Sendable { public let registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable init(registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable) { diff --git a/MutaroModule/Sources/Features/Setting/ViewController/SettingViewController.swift b/MutaroModule/Sources/Features/Setting/ViewController/SettingViewController.swift index 44a9ee6b..d4624474 100644 --- a/MutaroModule/Sources/Features/Setting/ViewController/SettingViewController.swift +++ b/MutaroModule/Sources/Features/Setting/ViewController/SettingViewController.swift @@ -166,7 +166,7 @@ extension SettingViewController: UICollectionViewDelegate { case .defaultSetting: break case .registerJWT: - Task { + Task { @MainActor in await viewModel.routeToRegisterJWT(from: self) } case .none: diff --git a/MutaroModule/Sources/Features/Setting/ViewModel/SettingViewModel.swift b/MutaroModule/Sources/Features/Setting/ViewModel/SettingViewModel.swift index 3d0147a3..a0d2ea37 100644 --- a/MutaroModule/Sources/Features/Setting/ViewModel/SettingViewModel.swift +++ b/MutaroModule/Sources/Features/Setting/ViewModel/SettingViewModel.swift @@ -9,7 +9,7 @@ import Combine import Core import UIKit -public final class SettingViewModel: NSObject { +public final class SettingViewModel: NSObject, Sendable { private let environment: SettingFeatureEnvironment var cancellables: Set = [] From 2655dd8d9e758792bf4f2aa0875cf1b8806cc538 Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 10 Mar 2024 12:11:19 +0900 Subject: [PATCH 2/9] fix MyAppsViewModel --- .../Core/Client/Entity/MyAppsEntity.swift | 24 ++++++++-------- .../Features/MyApps/Model/AppInfo.swift | 2 +- .../MyApps/ViewModel/MyAppsViewModel.swift | 28 ++++++++----------- .../Modules/JWTGenerator/Common/JWT.swift | 2 +- 4 files changed, 26 insertions(+), 30 deletions(-) diff --git a/MutaroModule/Sources/Core/Client/Entity/MyAppsEntity.swift b/MutaroModule/Sources/Core/Client/Entity/MyAppsEntity.swift index 2d20c146..0c9e6d91 100644 --- a/MutaroModule/Sources/Core/Client/Entity/MyAppsEntity.swift +++ b/MutaroModule/Sources/Core/Client/Entity/MyAppsEntity.swift @@ -9,7 +9,7 @@ import Foundation // MARK: - MyAppsEntity -public struct MyAppsEntity { +public struct MyAppsEntity: Sendable { public let links: MyAppsLinks? public let data: [MyAppsData]? public let meta: MyAppsMeta? @@ -22,7 +22,7 @@ public struct MyAppsEntity { // MARK: - MyAppsDatum - public struct MyAppsData { + public struct MyAppsData: Sendable { public let id: String? public let relationships: MyAppsRelationships? public let links: MyAppsLinks? @@ -40,7 +40,7 @@ public struct MyAppsEntity { // MARK: - MyAppsAttributes - public struct MyAppsAttributes { + public struct MyAppsAttributes: Sendable { public let subscriptionStatusURLVersionForSandbox, subscriptionStatusURLVersion: JSONNull? public let availableInNewTerritories: Bool? public let sku: String? @@ -67,7 +67,7 @@ public struct MyAppsEntity { // MARK: - MyAppsRelationships - public struct MyAppsRelationships { + public struct MyAppsRelationships: Sendable { public let reviewSubmissions, betaAppLocalizations, promotedPurchases, ciProduct: MyAppsLinksElement? public let appClips: MyAppsLinksElement? public let betaTesters: MyAppsBetaTesters? @@ -115,7 +115,7 @@ public struct MyAppsEntity { // MARK: - MyAppsAppAvailability - public struct MyAppsLinksElement { + public struct MyAppsLinksElement: Sendable { public let links: MyAppsLinksDetails? public init(links: MyAppsLinksDetails?) { @@ -125,7 +125,7 @@ public struct MyAppsEntity { // MARK: - MyAppsAppAvailabilityLinks - public struct MyAppsLinksDetails { + public struct MyAppsLinksDetails: Sendable { public let related, linksSelf: String? public init(related: String?, linksSelf: String?) { @@ -136,7 +136,7 @@ public struct MyAppsEntity { // MARK: - MyAppsLinks - public struct MyAppsLinks { + public struct MyAppsLinks: Sendable { public let linksSelf: String? public init(linksSelf: String?) { @@ -146,7 +146,7 @@ public struct MyAppsEntity { // MARK: - MyAppsBetaTesters - public struct MyAppsBetaTesters { + public struct MyAppsBetaTesters: Sendable { public let links: MyAppsLinks? public init(links: MyAppsLinks?) { @@ -156,7 +156,7 @@ public struct MyAppsEntity { // MARK: - MyAppsPerfPowerMetrics - public struct MyAppsPerfPowerMetrics { + public struct MyAppsPerfPowerMetrics: Sendable { public let links: MyAppsPerfPowerMetricsLinks? public init(links: MyAppsPerfPowerMetricsLinks?) { @@ -166,7 +166,7 @@ public struct MyAppsEntity { // MARK: - MyAppsPerfPowerMetricsLinks - public struct MyAppsPerfPowerMetricsLinks { + public struct MyAppsPerfPowerMetricsLinks: Sendable { public let related: String? public init(related: String?) { @@ -176,7 +176,7 @@ public struct MyAppsEntity { // MARK: - MyAppsMeta - public struct MyAppsMeta { + public struct MyAppsMeta: Sendable { public let paging: MyAppsPaging? public init(paging: MyAppsPaging?) { @@ -186,7 +186,7 @@ public struct MyAppsEntity { // MARK: - MyAppsPaging - public struct MyAppsPaging { + public struct MyAppsPaging: Sendable { public let total, limit: Int? public init(total: Int?, limit: Int?) { diff --git a/MutaroModule/Sources/Features/MyApps/Model/AppInfo.swift b/MutaroModule/Sources/Features/MyApps/Model/AppInfo.swift index 0fdc9ca1..3893d465 100644 --- a/MutaroModule/Sources/Features/MyApps/Model/AppInfo.swift +++ b/MutaroModule/Sources/Features/MyApps/Model/AppInfo.swift @@ -7,7 +7,7 @@ import Foundation -public struct AppInfo: Equatable { +public struct AppInfo: Equatable, Sendable { let id: String let name: String let iconUrl: String? diff --git a/MutaroModule/Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift b/MutaroModule/Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift index 6af5f8a3..591a07b4 100644 --- a/MutaroModule/Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift +++ b/MutaroModule/Sources/Features/MyApps/ViewModel/MyAppsViewModel.swift @@ -13,6 +13,7 @@ import JWTGenerator import KeychainStore import UIKit +@MainActor protocol MyAppsViewModelProtocol { func transform(input: MyAppsViewModel.Input) -> MyAppsViewModel.Output func getAppInfos(_ index: Int) -> AppInfo? @@ -34,6 +35,7 @@ extension MyAppsViewModel { } } +@MainActor public final class MyAppsViewModel: NSObject, MyAppsViewModelProtocol, Sendable { private let environment: MyAppsFeatureEnvironment @@ -91,23 +93,17 @@ public final class MyAppsViewModel: NSObject, MyAppsViewModelProtocol, Sendable input .didTapMyApp .receive(on: DispatchQueue.main) - .asyncSink( - taskCancellable: taskCancellables, - receiveValue: { [weak self] in - await self?.onTapMyApp(from: $0.from, index: $0.index) - } - ) + .sink { [weak self] in + self?.onTapMyApp(from: $0.from, index: $0.index) + } .store(in: &cancellables) input .didTapRegisterJWT .receive(on: DispatchQueue.main) - .asyncSink( - taskCancellable: taskCancellables, - receiveValue: { [weak self] in - await self?.onTapRegisterJWT(from: $0) - } - ) + .sink { [weak self] in + self?.onTapRegisterJWT(from: $0) + } .store(in: &cancellables) input @@ -154,15 +150,15 @@ public final class MyAppsViewModel: NSObject, MyAppsViewModelProtocol, Sendable return appInfos } - private func onTapRegisterJWT(from viewController: UIViewController) async { - await environment.router.showRegisterJWT(from: viewController) + private func onTapRegisterJWT(from viewController: UIViewController) { + environment.router.showRegisterJWT(from: viewController) } - private func onTapMyApp(from viewController: UIViewController, index: Int) async { + private func onTapMyApp(from viewController: UIViewController, index: Int) { guard let appInfo = appInfosSubject.value[getOrNil: index] else { return } - await environment.router.showMyAppTools(from: viewController, appId: appInfo.id) + environment.router.showMyAppTools(from: viewController, appId: appInfo.id) } private func prefetchItem( diff --git a/MutaroModule/Sources/Modules/JWTGenerator/Common/JWT.swift b/MutaroModule/Sources/Modules/JWTGenerator/Common/JWT.swift index eccc4075..ea3e32d4 100644 --- a/MutaroModule/Sources/Modules/JWTGenerator/Common/JWT.swift +++ b/MutaroModule/Sources/Modules/JWTGenerator/Common/JWT.swift @@ -8,7 +8,7 @@ import Foundation public enum MutaroJWT { - public struct JWTRequestInfo: Codable, Equatable { + public struct JWTRequestInfo: Codable, Equatable, Sendable { public let issuerID: String public let keyID: String public let privateKey: String From d8c231c656b4394619e9da2b1f07ce6647929322 Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 10 Mar 2024 12:12:41 +0900 Subject: [PATCH 3/9] fix entity --- .../Sources/Core/Client/Common/JSONNull.swift | 6 ++--- .../Core/Client/Entity/BuildsEntity.swift | 24 +++++++++---------- .../Core/Client/Entity/CIProductsEntity.swift | 14 +++++------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/MutaroModule/Sources/Core/Client/Common/JSONNull.swift b/MutaroModule/Sources/Core/Client/Common/JSONNull.swift index 39c359fe..374aae64 100644 --- a/MutaroModule/Sources/Core/Client/Common/JSONNull.swift +++ b/MutaroModule/Sources/Core/Client/Common/JSONNull.swift @@ -7,13 +7,13 @@ import Foundation -public class JSONNull: Codable, Hashable { +public final class JSONNull: Codable, Hashable, Sendable { public static func == (_: JSONNull, _: JSONNull) -> Bool { true } - public var hashValue: Int { - 0 + public func hash(into hasher: inout Hasher) { + hasher.combine(0) } public init() {} diff --git a/MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift b/MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift index 892602b3..e586331b 100644 --- a/MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift +++ b/MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift @@ -9,7 +9,7 @@ import Foundation // MARK: - BuildsEntity -public struct BuildsEntity { +public struct BuildsEntity: Sendable { public let links: BuildsLinks? public let data: [BuildsDatum]? public let meta: BuildsMeta? @@ -22,7 +22,7 @@ public struct BuildsEntity { // MARK: - BuildsDatum - public struct BuildsDatum { + public struct BuildsDatum: Sendable { public let id: String? public let relationships: BuildsRelationships? public let links: BuildsLinks? @@ -40,7 +40,7 @@ public struct BuildsEntity { // MARK: - BuildsAttributes - public struct BuildsAttributes { + public struct BuildsAttributes: Sendable { public let expirationDate: Date? public let expired: Bool? public let processingState, buildAudienceType, minOSVersion: String? @@ -68,7 +68,7 @@ public struct BuildsEntity { // MARK: - BuildsIconAssetToken - public struct BuildsIconAssetToken { + public struct BuildsIconAssetToken: Sendable { public let width: Int? public let templateURL: String? public let height: Int? @@ -82,7 +82,7 @@ public struct BuildsEntity { // MARK: - BuildsLinks - public struct BuildsLinks { + public struct BuildsLinks: Sendable { public let linksSelf: String? public init(linksSelf: String?) { @@ -92,7 +92,7 @@ public struct BuildsEntity { // MARK: - BuildsRelationships - public struct BuildsRelationships { + public struct BuildsRelationships: Sendable { public let betaAppReviewSubmission, appStoreVersion, appEncryptionDeclaration, individualTesters: BuildsLinksElement? public let perfPowerMetrics: BuildsPerfPowerMetrics? public let betaBuildLocalizations: BuildsLinksElement? @@ -118,7 +118,7 @@ public struct BuildsEntity { // MARK: - BuildsLinksElement - public struct BuildsLinksElement { + public struct BuildsLinksElement: Sendable { public let links: BuildsLinksDetails? public init(links: BuildsLinksDetails?) { @@ -128,7 +128,7 @@ public struct BuildsEntity { // MARK: - BuildsLinksDetails - public struct BuildsLinksDetails { + public struct BuildsLinksDetails: Sendable { public let related, linksSelf: String? public init(related: String?, linksSelf: String?) { @@ -139,7 +139,7 @@ public struct BuildsEntity { // MARK: - BuildsBetaGroups - public struct BuildsBetaGroups { + public struct BuildsBetaGroups: Sendable { public let links: BuildsLinks? public init(links: BuildsLinks?) { @@ -149,7 +149,7 @@ public struct BuildsEntity { // MARK: - BuildsPerfPowerMetrics - public struct BuildsPerfPowerMetrics { + public struct BuildsPerfPowerMetrics: Sendable { public let links: BuildsPerfPowerMetricsLinks? public init(links: BuildsPerfPowerMetricsLinks?) { @@ -159,7 +159,7 @@ public struct BuildsEntity { // MARK: - BuildsPerfPowerMetricsLinks - public struct BuildsPerfPowerMetricsLinks { + public struct BuildsPerfPowerMetricsLinks: Sendable { public let related: String? public init(related: String?) { @@ -169,7 +169,7 @@ public struct BuildsEntity { // MARK: - BuildsMeta - public struct BuildsMeta { + public struct BuildsMeta: Sendable { public let paging: BuildsPaging? public init(paging: BuildsPaging?) { diff --git a/MutaroModule/Sources/Core/Client/Entity/CIProductsEntity.swift b/MutaroModule/Sources/Core/Client/Entity/CIProductsEntity.swift index 9e9302bd..e884dcbc 100644 --- a/MutaroModule/Sources/Core/Client/Entity/CIProductsEntity.swift +++ b/MutaroModule/Sources/Core/Client/Entity/CIProductsEntity.swift @@ -7,7 +7,7 @@ import Foundation -public struct CIProductsEntity { +public struct CIProductsEntity: Sendable { public let links: CIProductsLinks? public let data: CIProductsData? @@ -16,7 +16,7 @@ public struct CIProductsEntity { self.data = data } - public struct CIProductsData { + public struct CIProductsData: Sendable { public let id: String? public let type: String? public let attributes: CIProductsAttributes? @@ -32,7 +32,7 @@ public struct CIProductsEntity { } } - public struct CIProductsAttributes { + public struct CIProductsAttributes: Sendable { public let name: String? public let createdDate: String? public let productType: String? @@ -44,7 +44,7 @@ public struct CIProductsEntity { } } - public struct CIProductsRelationships { + public struct CIProductsRelationships: Sendable { public let app, workflows, primaryRepositories, additionalRepositories, buildRuns: CIProductsLinksElement? public init(app: CIProductsLinksElement?, workflows: CIProductsLinksElement?, primaryRepositories: CIProductsLinksElement?, additionalRepositories: CIProductsLinksElement?, buildRuns: CIProductsLinksElement?) { @@ -58,7 +58,7 @@ public struct CIProductsEntity { // MARK: - CIProductsLinksElement - public struct CIProductsLinksElement { + public struct CIProductsLinksElement: Sendable { public let links: CIProductsLinksDetails? public init(links: CIProductsLinksDetails?) { @@ -68,7 +68,7 @@ public struct CIProductsEntity { // MARK: - CIProductsLinksDetails - public struct CIProductsLinksDetails { + public struct CIProductsLinksDetails: Sendable { public let related, linksSelf: String? public init(related: String?, linksSelf: String?) { @@ -79,7 +79,7 @@ public struct CIProductsEntity { // MARK: - CIProductsLinks - public struct CIProductsLinks { + public struct CIProductsLinks: Sendable { public let linksSelf: String? public init(linksSelf: String?) { From 35df521162c5199e2e661668b8b3512a362507f7 Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 10 Mar 2024 12:14:23 +0900 Subject: [PATCH 4/9] fix viewModels --- .../ViewModel/AppIntroductionViewModel.swift | 5 +++-- .../ViewModel/MyAppToolsViewModel.swift | 2 ++ .../ViewModel/RegisterJWTViewModel.swift | 16 ++++++++-------- .../Setting/ViewModel/SettingViewModel.swift | 5 +++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/MutaroModule/Sources/Features/AppIntroduction/ViewModel/AppIntroductionViewModel.swift b/MutaroModule/Sources/Features/AppIntroduction/ViewModel/AppIntroductionViewModel.swift index 5ff5709a..8ab1b359 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/ViewModel/AppIntroductionViewModel.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/ViewModel/AppIntroductionViewModel.swift @@ -8,6 +8,7 @@ import Core import UIKit +@MainActor public final class AppIntroductionViewModel: NSObject, Sendable { private let environment: AppIntroductionFeatureEnvironment @@ -15,8 +16,8 @@ public final class AppIntroductionViewModel: NSObject, Sendable { self.environment = environment } - func onTapAgree() async { + func onTapAgree() { UserDefaults.standard.set(true, forKey: UserDefaultsKey.notFirstAppLaunching.rawValue) - await environment.router.showHomeAsRoot() + environment.router.showHomeAsRoot() } } diff --git a/MutaroModule/Sources/Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift b/MutaroModule/Sources/Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift index 5936edb7..5a2b7ff8 100644 --- a/MutaroModule/Sources/Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift +++ b/MutaroModule/Sources/Features/MyAppTools/ViewModel/MyAppToolsViewModel.swift @@ -9,6 +9,7 @@ import Combine import Core import Foundation +@MainActor protocol MyAppToolsViewModelProtocol { func transform(input: MyAppToolsViewModel.Input) -> MyAppToolsViewModel.Output } @@ -24,6 +25,7 @@ extension MyAppToolsViewModel { } } +@MainActor public final class MyAppToolsViewModel: MyAppToolsViewModelProtocol, Sendable { private let appId: String private let environment: MyAppToolsFeatureEnvironment diff --git a/MutaroModule/Sources/Features/RegisterJWT/ViewModel/RegisterJWTViewModel.swift b/MutaroModule/Sources/Features/RegisterJWT/ViewModel/RegisterJWTViewModel.swift index b84909fe..923e041b 100644 --- a/MutaroModule/Sources/Features/RegisterJWT/ViewModel/RegisterJWTViewModel.swift +++ b/MutaroModule/Sources/Features/RegisterJWT/ViewModel/RegisterJWTViewModel.swift @@ -12,10 +12,12 @@ import JWTGenerator import KeychainStore import UIKit +@MainActor public protocol RegisterJWTRoute { func openRegisterJWTRoute() } +@MainActor protocol RegisterJWTViewModelProtocol { func transform(input: RegisterJWTViewModel.Input) -> RegisterJWTViewModel.Output } @@ -34,6 +36,7 @@ extension RegisterJWTViewModel { } } +@MainActor public final class RegisterJWTViewModel: RegisterJWTViewModelProtocol, Sendable { private let showAlertSubject = PassthroughSubject() private var cancellables: Set = [] @@ -57,12 +60,9 @@ public final class RegisterJWTViewModel: RegisterJWTViewModelProtocol, Sendable input .didTapRegister .receive(on: DispatchQueue.main) - .asyncSink( - taskCancellable: taskCancellables, - receiveValue: { [weak self] in - await self?.onTapRegister(item: $0) - } - ) + .sink { [weak self] in + self?.onTapRegister(item: $0) + } .store(in: &cancellables) return .init( @@ -74,7 +74,7 @@ public final class RegisterJWTViewModel: RegisterJWTViewModelProtocol, Sendable private func onTapRegister( item: RegisterItem - ) async { + ) { guard let issuerID = item.issuerID, !issuerID.isEmpty else { showAlertSubject.send(.invalidIssuerID) @@ -114,7 +114,7 @@ public final class RegisterJWTViewModel: RegisterJWTViewModelProtocol, Sendable try KeychainStore.shared.deleteValue(forKey: .jwt) try KeychainStore.shared.saveValue(info, forKey: .jwt) showAlertSubject.send(.successedSavingJWTReuqestInfo) - await environment.router.close(from: item.viewController) + environment.router.close(from: item.viewController) } catch { showAlertSubject.send(.failedSavingJWTRequestInfo) } diff --git a/MutaroModule/Sources/Features/Setting/ViewModel/SettingViewModel.swift b/MutaroModule/Sources/Features/Setting/ViewModel/SettingViewModel.swift index a0d2ea37..1b66f3a0 100644 --- a/MutaroModule/Sources/Features/Setting/ViewModel/SettingViewModel.swift +++ b/MutaroModule/Sources/Features/Setting/ViewModel/SettingViewModel.swift @@ -9,6 +9,7 @@ import Combine import Core import UIKit +@MainActor public final class SettingViewModel: NSObject, Sendable { private let environment: SettingFeatureEnvironment @@ -18,7 +19,7 @@ public final class SettingViewModel: NSObject, Sendable { self.environment = environment } - public func routeToRegisterJWT(from viewController: UIViewController) async { - await environment.router.showRegisterJWT(from: viewController) + public func routeToRegisterJWT(from viewController: UIViewController) { + environment.router.showRegisterJWT(from: viewController) } } From 81dfa7fd59e3371a2216d5f65386533a776399ec Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 10 Mar 2024 12:15:13 +0900 Subject: [PATCH 5/9] fix Entity --- MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift b/MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift index e586331b..280e4fd1 100644 --- a/MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift +++ b/MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift @@ -179,7 +179,7 @@ public struct BuildsEntity: Sendable { // MARK: - BuildsPaging - public struct BuildsPaging { + public struct BuildsPaging: Sendable { public let total, limit: Int? public init(total: Int?, limit: Int?) { From 47f4d05544980a66a3ee30ba83fce37b3c027c4e Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 10 Mar 2024 12:15:19 +0900 Subject: [PATCH 6/9] fix viewControllers --- .../Setting/ViewController/SettingViewController.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MutaroModule/Sources/Features/Setting/ViewController/SettingViewController.swift b/MutaroModule/Sources/Features/Setting/ViewController/SettingViewController.swift index d4624474..9885c487 100644 --- a/MutaroModule/Sources/Features/Setting/ViewController/SettingViewController.swift +++ b/MutaroModule/Sources/Features/Setting/ViewController/SettingViewController.swift @@ -166,9 +166,7 @@ extension SettingViewController: UICollectionViewDelegate { case .defaultSetting: break case .registerJWT: - Task { @MainActor in - await viewModel.routeToRegisterJWT(from: self) - } + viewModel.routeToRegisterJWT(from: self) case .none: break } From 5cc3ee0660765bb6ede6b155a65b61ee42d5f397 Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 10 Mar 2024 12:23:26 +0900 Subject: [PATCH 7/9] update swift5.10 --- MutaroModule/Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MutaroModule/Package.swift b/MutaroModule/Package.swift index 275d87bd..7299d6d8 100644 --- a/MutaroModule/Package.swift +++ b/MutaroModule/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.8 +// swift-tools-version: 5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription From 04c1cd17cbbea63ecf5209d563e9e92e7f229b04 Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 10 Mar 2024 12:23:49 +0900 Subject: [PATCH 8/9] remove no need async --- .../ViewController/AppIntroductionViewController.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MutaroModule/Sources/Features/AppIntroduction/ViewController/AppIntroductionViewController.swift b/MutaroModule/Sources/Features/AppIntroduction/ViewController/AppIntroductionViewController.swift index 7a95eb79..175c2ce8 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/ViewController/AppIntroductionViewController.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/ViewController/AppIntroductionViewController.swift @@ -54,9 +54,7 @@ public final class AppIntroductionViewController: UIViewController { $0.configuration = configuration $0.updateAction(.touchUpInside) { [weak self] in - Task { - await self?.viewModel.onTapAgree() - } + self?.viewModel.onTapAgree() } view.addSubview($0) From 3e9fc3d87ecd8730faf45135cca4891279868fe6 Mon Sep 17 00:00:00 2001 From: rei315 Date: Sun, 17 Mar 2024 00:25:00 +0900 Subject: [PATCH 9/9] fix --- .../Sources/Core/DI/AppIntroductionFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift | 2 +- MutaroModule/Sources/Core/DI/ViewBuilder.swift | 3 ++- .../AppIntroduction/DI/AppIntroductionFeatureComponent.swift | 3 ++- .../DI/AppIntroductionFeatureEnvironment.swift | 2 +- .../AppIntroduction/Router/AppIntroductionRouter.swift | 4 ++-- .../Sources/Features/Home/DI/HomeFeatureComponent.swift | 5 +++-- .../Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift | 5 +++-- .../MyAppTools/DI/MyAppToolsFeatureEnvironment.swift | 3 ++- .../Features/MyAppTools/Router/MyAppToolsRouter.swift | 4 ++-- .../Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift | 5 +++-- .../Features/MyApps/DI/MyAppsFeatureEnvironment.swift | 2 +- .../Sources/Features/MyApps/Router/MyAppsRouter.swift | 4 ++-- .../RegisterJWT/DI/RegisterJWTFeatureComponent.swift | 5 +++-- .../RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift | 2 +- .../Features/RegisterJWT/Router/RegisterJWTRouter.swift | 4 ++-- .../Features/Setting/DI/SettingFeatureComponent.swift | 5 +++-- .../Features/Setting/DI/SettingFeatureEnvironment.swift | 2 +- .../Sources/Features/Setting/Router/SettingRouter.swift | 4 ++-- 23 files changed, 41 insertions(+), 33 deletions(-) diff --git a/MutaroModule/Sources/Core/DI/AppIntroductionFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/AppIntroductionFeatureBuilder.swift index 947af6b6..9bb69dee 100644 --- a/MutaroModule/Sources/Core/DI/AppIntroductionFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/AppIntroductionFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol AppIntroductionFeatureBuildable: Buildable, Sendable { +public protocol AppIntroductionFeatureBuildable: Buildable { @MainActor func build() -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift index 3ffef8aa..bd4b89a6 100644 --- a/MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/HomeViewFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol HomeFeatureBuildable: Buildable, Sendable { +public protocol HomeFeatureBuildable: Buildable { @MainActor func build(viewControllers: [UIViewController]) -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift index 325fa829..473400cc 100644 --- a/MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/MyAppToolsFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol MyAppToolsFeatureBuildable: Buildable, Sendable { +public protocol MyAppToolsFeatureBuildable: Buildable { @MainActor func build(appId: String) -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift index d3991c92..e0836f40 100644 --- a/MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/MyAppsFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol MyAppsFeatureBuildable: Buildable, Sendable { +public protocol MyAppsFeatureBuildable: Buildable { @MainActor func build() -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift index 07f14249..0ce4bbe3 100644 --- a/MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/RegisterJWTFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol RegisterJWTFeatureBuildable: Buildable, Sendable { +public protocol RegisterJWTFeatureBuildable: Buildable { @MainActor func build() -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift b/MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift index 728f7c57..a8d8d69f 100644 --- a/MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift +++ b/MutaroModule/Sources/Core/DI/SettingFeatureBuilder.swift @@ -8,7 +8,7 @@ import NeedleFoundation import UIKit -public protocol SettingFeatureBuildable: Buildable, Sendable { +public protocol SettingFeatureBuildable: Buildable { @MainActor func build() -> UIViewController } diff --git a/MutaroModule/Sources/Core/DI/ViewBuilder.swift b/MutaroModule/Sources/Core/DI/ViewBuilder.swift index 8eda1991..6dd2d1aa 100644 --- a/MutaroModule/Sources/Core/DI/ViewBuilder.swift +++ b/MutaroModule/Sources/Core/DI/ViewBuilder.swift @@ -8,9 +8,10 @@ import Foundation import NeedleFoundation +@MainActor public protocol Buildable {} -open class Builder: Buildable, @unchecked Sendable { +open class Builder: Buildable { public let dependency: Dependency public init(dependency: Dependency) { diff --git a/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureComponent.swift b/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureComponent.swift index 6990716e..82d82270 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureComponent.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureComponent.swift @@ -10,6 +10,7 @@ import Foundation import NeedleFoundation import UIKit +@MainActor public protocol AppIntroductionFeatureDependency: Dependency, Sendable { // TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get } var myAppsFeatureBuilder: any MyAppsFeatureBuildable { get } @@ -17,8 +18,8 @@ public protocol AppIntroductionFeatureDependency: Dependency, Sendable { var homeFeatureBuilder: any HomeFeatureBuildable { get } } +@MainActor public class AppIntroductionFeatureBuilder: Builder, AppIntroductionFeatureBuildable { - @MainActor public func build() -> UIViewController { let vc = AppIntroductionViewController( dependency: .init( diff --git a/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureEnvironment.swift b/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureEnvironment.swift index f97bb4f7..434f2734 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/DI/AppIntroductionFeatureEnvironment.swift @@ -7,7 +7,7 @@ import Foundation -public struct AppIntroductionFeatureEnvironment: Sendable { +public struct AppIntroductionFeatureEnvironment { public let router: any AppIntroductionRoutable public init(router: any AppIntroductionRoutable) { diff --git a/MutaroModule/Sources/Features/AppIntroduction/Router/AppIntroductionRouter.swift b/MutaroModule/Sources/Features/AppIntroduction/Router/AppIntroductionRouter.swift index 3977e31b..59716cf9 100644 --- a/MutaroModule/Sources/Features/AppIntroduction/Router/AppIntroductionRouter.swift +++ b/MutaroModule/Sources/Features/AppIntroduction/Router/AppIntroductionRouter.swift @@ -8,13 +8,13 @@ import Core import UIKit -public protocol AppIntroductionRoutable: Sendable { +public protocol AppIntroductionRoutable { @MainActor func showHomeAsRoot() } public final class AppIntroductionRouter: AppIntroductionRoutable { - public struct Dependency: Sendable { + public struct Dependency { // TODO: - ここから遷移するfeatureのbuilder public let homeFeatureBuilder: any HomeFeatureBuildable public let myAppsFeatureBuilder: any MyAppsFeatureBuildable diff --git a/MutaroModule/Sources/Features/Home/DI/HomeFeatureComponent.swift b/MutaroModule/Sources/Features/Home/DI/HomeFeatureComponent.swift index 0b4b33ff..c3e73820 100644 --- a/MutaroModule/Sources/Features/Home/DI/HomeFeatureComponent.swift +++ b/MutaroModule/Sources/Features/Home/DI/HomeFeatureComponent.swift @@ -10,12 +10,13 @@ import Foundation import NeedleFoundation import UIKit -public protocol HomeFeatureDependency: Dependency, Sendable { +@MainActor +public protocol HomeFeatureDependency: Dependency { // TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get } } +@MainActor public class HomeFeatureBuilder: Builder, HomeFeatureBuildable { - @MainActor public func build(viewControllers: [UIViewController]) -> UIViewController { HomeTabViewController(viewControllers: viewControllers) } diff --git a/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift b/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift index 7073da90..7c729b42 100644 --- a/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift +++ b/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureComponent.swift @@ -10,12 +10,13 @@ import Foundation import NeedleFoundation import UIKit -public protocol MyAppToolsFeatureDependency: Dependency, Sendable { +@MainActor +public protocol MyAppToolsFeatureDependency: Dependency { var client: any Providable { get } } +@MainActor public class MyAppToolsFeatureBuilder: Builder, MyAppToolsFeatureBuildable { - @MainActor public func build(appId: String) -> UIViewController { let myAppTools = MyAppToolsViewController( dependency: .init( diff --git a/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureEnvironment.swift b/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureEnvironment.swift index fd0f0f6f..0198efd8 100644 --- a/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/MyAppTools/DI/MyAppToolsFeatureEnvironment.swift @@ -8,7 +8,8 @@ import Core import Foundation -public struct MyAppToolsFeatureEnvironment: Sendable { +@MainActor +public struct MyAppToolsFeatureEnvironment { public let ciProductUseCase: any CIProductUseCase public let router: any MyAppToolsRoutable diff --git a/MutaroModule/Sources/Features/MyAppTools/Router/MyAppToolsRouter.swift b/MutaroModule/Sources/Features/MyAppTools/Router/MyAppToolsRouter.swift index 9239c82d..8877341a 100644 --- a/MutaroModule/Sources/Features/MyAppTools/Router/MyAppToolsRouter.swift +++ b/MutaroModule/Sources/Features/MyAppTools/Router/MyAppToolsRouter.swift @@ -8,10 +8,10 @@ import Core import Foundation -public protocol MyAppToolsRoutable: Sendable {} +public protocol MyAppToolsRoutable {} public final class MyAppToolsRouter: MyAppToolsRoutable { - public struct Dependency: Sendable {} + public struct Dependency {} private let dependency: Dependency diff --git a/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift b/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift index 69137565..18492147 100644 --- a/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift +++ b/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureComponent.swift @@ -11,15 +11,16 @@ import ImageLoader import NeedleFoundation import UIKit -public protocol MyAppsFeatureDependency: Dependency, Sendable { +@MainActor +public protocol MyAppsFeatureDependency: Dependency { var client: any Providable { get } var imageDownloadService: any ImageDownloadService { get } var registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable { get } var myAppToolsFeatureBuilder: any MyAppToolsFeatureBuildable { get } } +@MainActor public class MyAppsFeatureBuilder: Builder, MyAppsFeatureBuildable { - @MainActor public func build() -> UIViewController { let myAppsVC = MyAppsViewController( dependency: .init( diff --git a/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureEnvironment.swift b/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureEnvironment.swift index 26b56e07..24fe21b0 100644 --- a/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/MyApps/DI/MyAppsFeatureEnvironment.swift @@ -8,7 +8,7 @@ import Core import Foundation -public struct MyAppsFeatureEnvironment: Sendable { +public struct MyAppsFeatureEnvironment { public let appInfoUseCase: any AppInfoUseCase public let imageDownloadService: any ImageDownloadService public let router: any MyAppsRoutable diff --git a/MutaroModule/Sources/Features/MyApps/Router/MyAppsRouter.swift b/MutaroModule/Sources/Features/MyApps/Router/MyAppsRouter.swift index ca3fe5ad..4b8db951 100644 --- a/MutaroModule/Sources/Features/MyApps/Router/MyAppsRouter.swift +++ b/MutaroModule/Sources/Features/MyApps/Router/MyAppsRouter.swift @@ -8,7 +8,7 @@ import Core import UIKit -public protocol MyAppsRoutable: Sendable { +public protocol MyAppsRoutable { @MainActor func showRegisterJWT(from viewController: UIViewController) @MainActor @@ -16,7 +16,7 @@ public protocol MyAppsRoutable: Sendable { } public final class MyAppsRouter: MyAppsRoutable { - public struct Dependency: Sendable { + public struct Dependency { public let registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable public let myAppToolsFeatureBuilder: any MyAppToolsFeatureBuildable diff --git a/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureComponent.swift b/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureComponent.swift index 6d4505c1..9ddffedc 100644 --- a/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureComponent.swift +++ b/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureComponent.swift @@ -10,12 +10,13 @@ import Foundation import NeedleFoundation import UIKit -public protocol RegisterJWTFeatureDependency: Dependency, Sendable { +@MainActor +public protocol RegisterJWTFeatureDependency: Dependency { // TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get } } +@MainActor public class RegisterJWTFeatureBuilder: Builder, RegisterJWTFeatureBuildable { - @MainActor public func build() -> UIViewController { RegisterJWTViewController( dependency: .init( diff --git a/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift b/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift index 011780ff..92475dc3 100644 --- a/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/RegisterJWT/DI/RegisterJWTFeatureEnvironment.swift @@ -7,7 +7,7 @@ import Foundation -public struct RegisterJWTFeatureEnvironment: Sendable { +public struct RegisterJWTFeatureEnvironment { public let router: any RegisterJWTFeatureRoutable public init(router: any RegisterJWTFeatureRoutable) { diff --git a/MutaroModule/Sources/Features/RegisterJWT/Router/RegisterJWTRouter.swift b/MutaroModule/Sources/Features/RegisterJWT/Router/RegisterJWTRouter.swift index bd8cc289..dc97884f 100644 --- a/MutaroModule/Sources/Features/RegisterJWT/Router/RegisterJWTRouter.swift +++ b/MutaroModule/Sources/Features/RegisterJWT/Router/RegisterJWTRouter.swift @@ -7,13 +7,13 @@ import UIKit -public protocol RegisterJWTFeatureRoutable: Sendable { +public protocol RegisterJWTFeatureRoutable { @MainActor func close(from viewController: UIViewController) } public final class RegisterJWTFeatureRouter: RegisterJWTFeatureRoutable { - public struct Dependency: Sendable {} + public struct Dependency {} private let dependency: Dependency diff --git a/MutaroModule/Sources/Features/Setting/DI/SettingFeatureComponent.swift b/MutaroModule/Sources/Features/Setting/DI/SettingFeatureComponent.swift index 2acef906..4d0517a1 100644 --- a/MutaroModule/Sources/Features/Setting/DI/SettingFeatureComponent.swift +++ b/MutaroModule/Sources/Features/Setting/DI/SettingFeatureComponent.swift @@ -10,13 +10,14 @@ import Foundation import NeedleFoundation import UIKit -public protocol SettingFeatureDependency: Dependency, Sendable { +@MainActor +public protocol SettingFeatureDependency: Dependency { // TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get } var registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable { get } } +@MainActor public class SettingFeatureBuilder: Builder, SettingFeatureBuildable { - @MainActor public func build() -> UIViewController { let settingVC = SettingViewController( dependency: .init( diff --git a/MutaroModule/Sources/Features/Setting/DI/SettingFeatureEnvironment.swift b/MutaroModule/Sources/Features/Setting/DI/SettingFeatureEnvironment.swift index 3da731c5..659c0f78 100644 --- a/MutaroModule/Sources/Features/Setting/DI/SettingFeatureEnvironment.swift +++ b/MutaroModule/Sources/Features/Setting/DI/SettingFeatureEnvironment.swift @@ -7,7 +7,7 @@ import Foundation -public struct SettingFeatureEnvironment: Sendable { +public struct SettingFeatureEnvironment { public let router: any SettingRoutable public init(router: any SettingRoutable) { diff --git a/MutaroModule/Sources/Features/Setting/Router/SettingRouter.swift b/MutaroModule/Sources/Features/Setting/Router/SettingRouter.swift index ffcb56fe..ff0e5730 100644 --- a/MutaroModule/Sources/Features/Setting/Router/SettingRouter.swift +++ b/MutaroModule/Sources/Features/Setting/Router/SettingRouter.swift @@ -8,13 +8,13 @@ import Core import UIKit -public protocol SettingRoutable: Sendable { +public protocol SettingRoutable { @MainActor func showRegisterJWT(from viewController: UIViewController) } public final class SettingRouter: SettingRoutable { - public struct Dependency: Sendable { + public struct Dependency { public let registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable init(registerJWTFeatureBuilder: any RegisterJWTFeatureBuildable) {