Skip to content
Draft

Tca #16

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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/Kinova.xcodeproj/project.xcworkspace/xcuserdata/
/Kinova.xcodeproj/xcuserdata/
/Kinova/KinovaSecrets.swift
/KinovaCore/.swiftpm/xcode/xcuserdata/
36 changes: 35 additions & 1 deletion Kinova.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/* Begin PBXBuildFile section */
D1032BF12E2D45A900D3CC5D /* TMDB in Frameworks */ = {isa = PBXBuildFile; productRef = D1032BF02E2D45A800D3CC5D /* TMDB */; };
D117EBAD2E4D226200CA488E /* MoviesFeature in Frameworks */ = {isa = PBXBuildFile; productRef = D117EBAC2E4D226200CA488E /* MoviesFeature */; };
D1F7D1EE2E4B61A9005A90C4 /* ComposableArchitecture in Frameworks */ = {isa = PBXBuildFile; productRef = D1F7D1ED2E4B61A9005A90C4 /* ComposableArchitecture */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -23,6 +25,7 @@
/* Begin PBXFileReference section */
D1032BE32E2D2F5400D3CC5D /* KinovaTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KinovaTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
D14D232F2E22B02B000EBA25 /* Kinova.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Kinova.app; sourceTree = BUILT_PRODUCTS_DIR; };
D153C2652E4D211B00C05EAD /* KinovaCore */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = KinovaCore; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
Expand Down Expand Up @@ -50,18 +53,29 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D117EBAD2E4D226200CA488E /* MoviesFeature in Frameworks */,
D1F7D1EE2E4B61A9005A90C4 /* ComposableArchitecture in Frameworks */,
D1032BF12E2D45A900D3CC5D /* TMDB in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
D117EBAB2E4D226200CA488E /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
D14D23262E22B02B000EBA25 = {
isa = PBXGroup;
children = (
D14D23312E22B02B000EBA25 /* Kinova */,
D1032BE42E2D2F5400D3CC5D /* KinovaTests */,
D153C2652E4D211B00C05EAD /* KinovaCore */,
D117EBAB2E4D226200CA488E /* Frameworks */,
D14D23302E22B02B000EBA25 /* Products */,
);
sourceTree = "<group>";
Expand Down Expand Up @@ -119,6 +133,8 @@
name = Kinova;
packageProductDependencies = (
D1032BF02E2D45A800D3CC5D /* TMDB */,
D1F7D1ED2E4B61A9005A90C4 /* ComposableArchitecture */,
D117EBAC2E4D226200CA488E /* MoviesFeature */,
);
productName = Kinova;
productReference = D14D232F2E22B02B000EBA25 /* Kinova.app */;
Expand Down Expand Up @@ -154,6 +170,7 @@
minimizedProjectReferenceProxies = 1;
packageReferences = (
D1032BEF2E2D45A800D3CC5D /* XCRemoteSwiftPackageReference "tmdb-swift" */,
D1F7D1EC2E4B61A9005A90C4 /* XCRemoteSwiftPackageReference "swift-composable-architecture" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = D14D23302E22B02B000EBA25 /* Products */;
Expand Down Expand Up @@ -479,9 +496,17 @@
D1032BEF2E2D45A800D3CC5D /* XCRemoteSwiftPackageReference "tmdb-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/igorcamilo/tmdb-swift.git";
requirement = {
branch = tca;
kind = branch;
};
};
D1F7D1EC2E4B61A9005A90C4 /* XCRemoteSwiftPackageReference "swift-composable-architecture" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/pointfreeco/swift-composable-architecture.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.1.0;
minimumVersion = 1.21.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand All @@ -492,6 +517,15 @@
package = D1032BEF2E2D45A800D3CC5D /* XCRemoteSwiftPackageReference "tmdb-swift" */;
productName = TMDB;
};
D117EBAC2E4D226200CA488E /* MoviesFeature */ = {
isa = XCSwiftPackageProductDependency;
productName = MoviesFeature;
};
D1F7D1ED2E4B61A9005A90C4 /* ComposableArchitecture */ = {
isa = XCSwiftPackageProductDependency;
package = D1F7D1EC2E4B61A9005A90C4 /* XCRemoteSwiftPackageReference "swift-composable-architecture" */;
productName = ComposableArchitecture;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = D14D23272E22B02B000EBA25 /* Project object */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Kinova/Movies/MoviesReducer.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// MoviesReducer.swift
// Kinova
//
// Created by Igor Camilo on 12.08.25.
//

import ComposableArchitecture

@Reducer
struct MoviesReducer {
@ObservableState
struct State {
var aaaa = 0
}

enum Action {
case bbbb
}
}
41 changes: 41 additions & 0 deletions KinovaCore/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// swift-tools-version: 6.2

import PackageDescription

let package = Package(
name: "KinovaCore",
platforms: [
.iOS("26.0"),
.macOS("26.0"),
.visionOS("26.0")
],
products: [
.library(
name: "MoviesFeature",
targets: ["MoviesFeature"]
),
],
dependencies: [
.package(
url: "https://github.com/igorcamilo/tmdb-swift.git",
from: "1.0.0"
),
.package(
url: "https://github.com/pointfreeco/swift-composable-architecture.git",
from: "1.0.0"
),
],
targets: [
.target(
name: "MoviesFeature",
dependencies: [
.product(name: "ComposableArchitecture", package: "swift-composable-architecture"),
.product(name: "TMDB", package: "tmdb-swift")
],
),
.testTarget(
name: "MoviesFeatureTests",
dependencies: ["MoviesFeature"]
),
]
)
43 changes: 43 additions & 0 deletions KinovaCore/Sources/MoviesFeature/MovieDetailsReducer.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// MovieDetailsReducer.swift
// KinovaCore
//
// Created by Igor Camilo on 13.08.25.
//

import ComposableArchitecture
import Dependencies
import TMDB

@Reducer
struct MovieDetailsReducer {
@ObservableState
struct State {
var aaa = false
}

enum Action: ViewAction {
case view(View)

enum View {
case viewAppeared
}
}

@Dependency(\.movieClient) private var movieClient

var body: some Reducer<State, Action> {
Reduce { state, action in
switch action {
case .view(.viewAppeared):
return viewAppeared(state: &state)
}
}
}

private func viewAppeared(
state: inout State
) -> Effect<Action> {
return .none
}
}
20 changes: 20 additions & 0 deletions KinovaCore/Sources/MoviesFeature/MovieDetailsView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// MovieDetailsView.swift
// KinovaCore
//
// Created by Igor Camilo on 13.08.25.
//

import ComposableArchitecture
import SwiftUI

@ViewAction(for: MovieDetailsReducer.self)
struct MovieDetailsView: View {
let store: StoreOf<MovieDetailsReducer>

var body: some View {
}
}

#Preview {
}
6 changes: 6 additions & 0 deletions KinovaCore/Tests/KinovaCoreTests/KinovaCoreTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Testing
@testable import KinovaCore

@Test func example() async throws {
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
}
Loading