Skip to content
Open
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
18 changes: 11 additions & 7 deletions Patchcord.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1400;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1600;
TargetAttributes = {
5023A0AD2854B87D009563B8 = {
CreatedOnToolsVersion = 14.0;
Expand Down Expand Up @@ -575,6 +575,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -594,6 +595,8 @@
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = "";
};
name = Debug;
};
Expand Down Expand Up @@ -634,6 +637,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -646,6 +650,8 @@
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = "";
};
name = Release;
};
Expand Down Expand Up @@ -683,7 +689,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand Down Expand Up @@ -722,15 +728,14 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
};
5023A0DC2854B87E009563B8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -746,7 +751,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Patchcord.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Patchcord";
};
Expand All @@ -755,7 +760,6 @@
5023A0DD2854B87E009563B8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -771,7 +775,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Patchcord.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Patchcord";
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 5 additions & 5 deletions Patchcord/Core/App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ let connection = ConnectionMiddleware()
let logger = LoggerMiddleware()

/// Redux store ♻️
let store = Store(initial: SceneState(),
reducer: SceneState.reducer,
middlewares: [connection.middleware,
coreData.middleware,
logger.middleware])
@MainActor let store = Store(initial: SceneState(),
reducer: SceneState.reducer,
middlewares: [connection.middleware,
coreData.middleware,
logger.middleware])

/// App Instance 📱
@main
Expand Down
2 changes: 1 addition & 1 deletion Patchcord/Core/Generics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import Combine

protocol Action {
@preconcurrency protocol Action {
var animated: Bool { get }
}

Expand Down
2 changes: 1 addition & 1 deletion Patchcord/Core/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Combine
import SwiftUI

/// Redux store ♻️
final class Store<State>: ObservableObject {
final class Store<State>: ObservableObject, @unchecked Sendable {
var isEnabled = true

@Published private(set) var state: State
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
import NDT7

/// Middleware that pefrorms all connection tests. Like speed test, ping, fetching public IP, etc 📡🛰
class ConnectionMiddleware {
class ConnectionMiddleware: @unchecked Sendable {
private var connectedStore: Store<SceneState>?
private let queue: DispatchQueue
private let ipConfig: IPConfig
Expand Down
2 changes: 1 addition & 1 deletion Patchcord/Middlewares/CoreData/CoreDataMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import CoreData
import Combine

/// Middleware that handles all operations with the local database 💾
final class CoreDataMiddleware {
final class CoreDataMiddleware: @unchecked Sendable {
let context: NSManagedObjectContext
let testResultsRepository: CoreDataRepository<TestResult>

Expand Down
2 changes: 1 addition & 1 deletion Patchcord/Middlewares/Logger/LoggerMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Combine

/// Middleware that logs all states in the console ✍️
final class LoggerMiddleware {
final class LoggerMiddleware: @unchecked Sendable {

func middleware(state: SceneState, action: Action) -> AnyPublisher<Action, Never> {
let stateDescription = "\(state)".replacingOccurrences(of: "Patchcord.", with: "")
Expand Down
2 changes: 1 addition & 1 deletion Patchcord/Screens/Connection/ConnectionStateReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation

extension ConnectionState {

static let reducer: Reducer<Self> = { state, action in
@MainActor static let reducer: Reducer<Self> = { state, action in
switch action {
case ConnectionStateAction.startTest:
return ConnectionState(testState: .started)
Expand Down
2 changes: 1 addition & 1 deletion Patchcord/Screens/History/HistoryStateReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation

extension HistoryState {

static let reducer: Reducer<Self> = { state, action in
@MainActor static let reducer: Reducer<Self> = { state, action in
switch action {
case HistoryStateAction.fetchHistory:
return HistoryState(isLoading: true, results: [])
Expand Down
2 changes: 1 addition & 1 deletion Patchcord/States/SceneStateReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation

extension SceneState {

static let reducer: Reducer<Self> = { state, action in
@MainActor static let reducer: Reducer<Self> = { state, action in
SceneState(screens: state.screens.map { ScreenState.reducer($0, action) })
}

Expand Down
2 changes: 1 addition & 1 deletion Patchcord/States/ScreenStateReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation

extension ScreenState {

static let reducer: Reducer<Self> = { state, action in
@MainActor static let reducer: Reducer<Self> = { state, action in
switch state {
case .connection(let state):
return .connection(ConnectionState.reducer(state, action))
Expand Down
2 changes: 1 addition & 1 deletion PatchcordTests/ConnectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import NDT7

final class ConnectionTests: XCTestCase {

func testStates() {
@MainActor func testStates() {
// Initializes the app components
let persistance = Persistence(inMemory: true)
let connection = ConnectionMock(ipConfig: IPConfigMock())
Expand Down
2 changes: 1 addition & 1 deletion PatchcordTests/Generics/ConnectionMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

@testable import Patchcord

final class ConnectionMock: ConnectionMiddleware {
final class ConnectionMock: ConnectionMiddleware, @unchecked Sendable {

private var latestTest: NDT7TestStub?

Expand Down