Skip to content

Commit

Permalink
Adopt swift 6
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Nov 1, 2024
1 parent afe8d0a commit 615323d
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// swift-tools-version: 5.8
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
import Foundation
import PackageDescription

let remoteDependencies: [PackageDescription.Package.Dependency] = [
.package(url: "https://github.com/oversizedev/OversizeLocalizable.git", .upToNextMajor(from: "1.5.0")),
Expand Down
26 changes: 13 additions & 13 deletions Sources/OversizeModels/Config/AppConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@

import Foundation

public struct PlistConfiguration: Codable {
public struct PlistConfiguration: Codable, Sendable {
public var store: Store
public var apps: [App]
public var links: Links

private enum CodingKeys: String, CodingKey {
private enum CodingKeys: String, CodingKey, Sendable {
case store = "Store"
case apps = "Apps"
case links = "Links"
}

public struct Links: Codable {
public struct Links: Codable, Sendable {
public var app: App
public var developer: Developer
public var company: Company

private enum CodingKeys: String, CodingKey {
private enum CodingKeys: String, CodingKey, Sendable {
case app = "App"
case developer = "Developer"
case company = "Company"
}

public struct App: Codable, Hashable {
public struct App: Codable, Hashable, Sendable {
public var urlString: String?
public var telegramChat: String?
public var appStoreId: String
Expand Down Expand Up @@ -67,21 +67,21 @@ public struct PlistConfiguration: Codable {
return url
}

private enum CodingKeys: String, CodingKey {
private enum CodingKeys: String, CodingKey, Sendable {
case urlString = "Url"
case telegramChat = "TelegramChat"
case appStoreId = "AppStoreID"
}
}

public struct Developer: Codable, Hashable {
public struct Developer: Codable, Hashable, Sendable {
public var name: String?
public var url: String?
public var email: String?
public var fecebook: String?
public var telegram: String?

private enum CodingKeys: String, CodingKey {
private enum CodingKeys: String, CodingKey, Sendable {
case name = "Name"
case url = "Url"
case email = "Email"
Expand All @@ -90,7 +90,7 @@ public struct PlistConfiguration: Codable {
}
}

public struct Company: Codable, Hashable {
public struct Company: Codable, Hashable, Sendable {
public var name: String?
public var urlString: String?
public var email: String?
Expand Down Expand Up @@ -134,7 +134,7 @@ public struct PlistConfiguration: Codable {
}
}

public struct App: Codable, Identifiable, Hashable {
public struct App: Codable, Identifiable, Hashable, Sendable {
public var id: String
public var name: String?
public var title: String?
Expand All @@ -149,14 +149,14 @@ public struct PlistConfiguration: Codable {
}
}

public struct Store: Codable {
public struct Store: Codable, Sendable {
public var features: [StoreFeature]

private enum CodingKeys: String, CodingKey {
private enum CodingKeys: String, CodingKey, Sendable {
case features = "Features"
}

public struct StoreFeature: Codable, Identifiable, Hashable, Equatable {
public struct StoreFeature: Codable, Identifiable, Hashable, Equatable, Sendable {
public var id: String {
(image ?? "") + (title ?? "") + (subtitle ?? "")
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/AppError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public protocol AppErrorProtocol {
var icon: Image? { get }
}

public enum AppError: Error {
public enum AppError: Error, Sendable {
case network(type: Enums.NetworkError)
case cloudKit(type: Enums.CloudKit)
case location(type: Enums.Location)
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/CloudDocumentsErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum CloudDocuments {
enum CloudDocuments: Sendable {
case deleteItem
case updateItem
case savingItem
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/CloudKitErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum CloudKit {
enum CloudKit: Sendable {
case decode
case noAccount
case notAccess
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/ContactsErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum Contacts {
enum Contacts: Sendable {
case notAccess
case unknown
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/CoreDataErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum CoreData {
enum CoreData: Sendable {
case deleteItem
case updateItem
case savingItem
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/EventKitErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum EventKit {
enum EventKit: Sendable {
case deleteItem
case updateItem
case savingItem
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/FileManagerError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum FileManager {
enum FileManager: Sendable {
case deleteItem
case updateItem
case savingItem
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/HealthKitErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum HealthKit {
enum HealthKit: Sendable {
case deleteItem
case updateItem
case savingItem
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/LocationErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum Location {
enum Location: Sendable {
case notDetermined
case notAccess
case unknown
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/NetworkErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum NetworkError {
enum NetworkError: Sendable {
case decode
case invalidURL
case noResponse
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/Error/NotificationsErrors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import OversizeLocalizable
import SwiftUI

public extension AppError.Enums {
enum Notification {
enum Notification: Sendable {
case notDetermined
case notAccess
case unknown
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeModels/SwiftData/ColorData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import SwiftUI

public struct ColorData: Codable {
public struct ColorData: Codable, Sendable {
private var red: Double = 1
private var green: Double = 1
private var blue: Double = 1
Expand Down

0 comments on commit 615323d

Please sign in to comment.