Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MutaroModule/Package.swift
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions MutaroModule/Sources/Core/Client/Common/JSONNull.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Expand Down
26 changes: 13 additions & 13 deletions MutaroModule/Sources/Core/Client/Entity/BuildsEntity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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?
Expand All @@ -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?
Expand Down Expand Up @@ -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?
Expand All @@ -82,7 +82,7 @@ public struct BuildsEntity {

// MARK: - BuildsLinks

public struct BuildsLinks {
public struct BuildsLinks: Sendable {
public let linksSelf: String?

public init(linksSelf: String?) {
Expand All @@ -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?
Expand All @@ -118,7 +118,7 @@ public struct BuildsEntity {

// MARK: - BuildsLinksElement

public struct BuildsLinksElement {
public struct BuildsLinksElement: Sendable {
public let links: BuildsLinksDetails?

public init(links: BuildsLinksDetails?) {
Expand All @@ -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?) {
Expand All @@ -139,7 +139,7 @@ public struct BuildsEntity {

// MARK: - BuildsBetaGroups

public struct BuildsBetaGroups {
public struct BuildsBetaGroups: Sendable {
public let links: BuildsLinks?

public init(links: BuildsLinks?) {
Expand All @@ -149,7 +149,7 @@ public struct BuildsEntity {

// MARK: - BuildsPerfPowerMetrics

public struct BuildsPerfPowerMetrics {
public struct BuildsPerfPowerMetrics: Sendable {
public let links: BuildsPerfPowerMetricsLinks?

public init(links: BuildsPerfPowerMetricsLinks?) {
Expand All @@ -159,7 +159,7 @@ public struct BuildsEntity {

// MARK: - BuildsPerfPowerMetricsLinks

public struct BuildsPerfPowerMetricsLinks {
public struct BuildsPerfPowerMetricsLinks: Sendable {
public let related: String?

public init(related: String?) {
Expand All @@ -169,7 +169,7 @@ public struct BuildsEntity {

// MARK: - BuildsMeta

public struct BuildsMeta {
public struct BuildsMeta: Sendable {
public let paging: BuildsPaging?

public init(paging: BuildsPaging?) {
Expand All @@ -179,7 +179,7 @@ public struct BuildsEntity {

// MARK: - BuildsPaging

public struct BuildsPaging {
public struct BuildsPaging: Sendable {
public let total, limit: Int?

public init(total: Int?, limit: Int?) {
Expand Down
14 changes: 7 additions & 7 deletions MutaroModule/Sources/Core/Client/Entity/CIProductsEntity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

public struct CIProductsEntity {
public struct CIProductsEntity: Sendable {
public let links: CIProductsLinks?
public let data: CIProductsData?

Expand All @@ -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?
Expand All @@ -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?
Expand All @@ -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?) {
Expand All @@ -58,7 +58,7 @@ public struct CIProductsEntity {

// MARK: - CIProductsLinksElement

public struct CIProductsLinksElement {
public struct CIProductsLinksElement: Sendable {
public let links: CIProductsLinksDetails?

public init(links: CIProductsLinksDetails?) {
Expand All @@ -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?) {
Expand All @@ -79,7 +79,7 @@ public struct CIProductsEntity {

// MARK: - CIProductsLinks

public struct CIProductsLinks {
public struct CIProductsLinks: Sendable {
public let linksSelf: String?

public init(linksSelf: String?) {
Expand Down
24 changes: 12 additions & 12 deletions MutaroModule/Sources/Core/Client/Entity/MyAppsEntity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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?
Expand All @@ -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?
Expand All @@ -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?
Expand Down Expand Up @@ -115,7 +115,7 @@ public struct MyAppsEntity {

// MARK: - MyAppsAppAvailability

public struct MyAppsLinksElement {
public struct MyAppsLinksElement: Sendable {
public let links: MyAppsLinksDetails?

public init(links: MyAppsLinksDetails?) {
Expand All @@ -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?) {
Expand All @@ -136,7 +136,7 @@ public struct MyAppsEntity {

// MARK: - MyAppsLinks

public struct MyAppsLinks {
public struct MyAppsLinks: Sendable {
public let linksSelf: String?

public init(linksSelf: String?) {
Expand All @@ -146,7 +146,7 @@ public struct MyAppsEntity {

// MARK: - MyAppsBetaTesters

public struct MyAppsBetaTesters {
public struct MyAppsBetaTesters: Sendable {
public let links: MyAppsLinks?

public init(links: MyAppsLinks?) {
Expand All @@ -156,7 +156,7 @@ public struct MyAppsEntity {

// MARK: - MyAppsPerfPowerMetrics

public struct MyAppsPerfPowerMetrics {
public struct MyAppsPerfPowerMetrics: Sendable {
public let links: MyAppsPerfPowerMetricsLinks?

public init(links: MyAppsPerfPowerMetricsLinks?) {
Expand All @@ -166,7 +166,7 @@ public struct MyAppsEntity {

// MARK: - MyAppsPerfPowerMetricsLinks

public struct MyAppsPerfPowerMetricsLinks {
public struct MyAppsPerfPowerMetricsLinks: Sendable {
public let related: String?

public init(related: String?) {
Expand All @@ -176,7 +176,7 @@ public struct MyAppsEntity {

// MARK: - MyAppsMeta

public struct MyAppsMeta {
public struct MyAppsMeta: Sendable {
public let paging: MyAppsPaging?

public init(paging: MyAppsPaging?) {
Expand All @@ -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?) {
Expand Down
2 changes: 1 addition & 1 deletion MutaroModule/Sources/Core/Client/Providable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

public protocol Providable {
public protocol Providable: Sendable {
func request<T: Decodable>(endpoint: Endpoint, responseModel: T.Type) async -> Result<
T, RequestError
>
Expand Down
3 changes: 2 additions & 1 deletion MutaroModule/Sources/Core/DI/ViewBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import Foundation
import NeedleFoundation

public protocol Buildable: AnyObject {}
@MainActor
public protocol Buildable {}

open class Builder<Dependency>: Buildable {
public let dependency: Dependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ import Foundation
import NeedleFoundation
import UIKit

public protocol AppIntroductionFeatureDependency: Dependency {
@MainActor
public protocol AppIntroductionFeatureDependency: Dependency, Sendable {
// TODO: - var 遷移するB FeatureのBuilder: BModuleBuildable { get }
var myAppsFeatureBuilder: any MyAppsFeatureBuildable { get }
var settingFeatureBuilder: any SettingFeatureBuildable { get }
var homeFeatureBuilder: any HomeFeatureBuildable { get }
}

@MainActor
public class AppIntroductionFeatureBuilder: Builder<AppIntroductionFeatureDependency>, AppIntroductionFeatureBuildable {
@MainActor
public func build() -> UIViewController {
let vc = AppIntroductionViewController(
dependency: .init(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public protocol AppIntroductionRoutable {
func showHomeAsRoot()
}

public class AppIntroductionRouter: AppIntroductionRoutable {
public final class AppIntroductionRouter: AppIntroductionRoutable {
public struct Dependency {
// TODO: - ここから遷移するfeatureのbuilder
public let homeFeatureBuilder: any HomeFeatureBuildable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
import Core
import UIKit

public final class AppIntroductionViewModel: NSObject {
@MainActor
public final class AppIntroductionViewModel: NSObject, Sendable {
private let environment: AppIntroductionFeatureEnvironment

public init(environment: AppIntroductionFeatureEnvironment) {
self.environment = environment
}

func onTapAgree() async {
func onTapAgree() {
UserDefaults.standard.set(true, forKey: UserDefaultsKey.notFirstAppLaunching.rawValue)
await environment.router.showHomeAsRoot()
environment.router.showHomeAsRoot()
}
}
Loading