Skip to content

Commit

Permalink
removed register for viewmodels (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladimir Espinola <[email protected]>
  • Loading branch information
vespinola and Vladimir Espinola authored Nov 28, 2024
1 parent c119019 commit 054fd0b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 52 deletions.
Binary file modified .DS_Store
Binary file not shown.
53 changes: 29 additions & 24 deletions mobile-courier-app.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
1B58EF932BE6BBEA0066F447 /* MobileCourierAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B58EF922BE6BBEA0066F447 /* MobileCourierAppUITests.swift */; };
1B58EFAB2BE6C1F30066F447 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1B58EFAA2BE6C1F30066F447 /* LaunchScreen.storyboard */; };
1B5E84A12C267FE200EDFDE2 /* AppDIContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B5E84A02C267FE200EDFDE2 /* AppDIContainer.swift */; };
1B5EB7A72C3E3D9C007AD50F /* JustACourierAppPresentation in Frameworks */ = {isa = PBXBuildFile; productRef = 1B5EB7A62C3E3D9C007AD50F /* JustACourierAppPresentation */; };
1B6177D92C3E2E5000324A69 /* JustACourierAppPresentation in Frameworks */ = {isa = PBXBuildFile; productRef = 1B6177D82C3E2E5000324A69 /* JustACourierAppPresentation */; };
1B6177DC2C3E2F2100324A69 /* JustACourierAppData in Frameworks */ = {isa = PBXBuildFile; productRef = 1B6177DB2C3E2F2100324A69 /* JustACourierAppData */; };
1B6177DF2C3E2F2B00324A69 /* JustACourierAppDomain in Frameworks */ = {isa = PBXBuildFile; productRef = 1B6177DE2C3E2F2B00324A69 /* JustACourierAppDomain */; };
1B6177E22C3E2F3B00324A69 /* JustACourierAppPresentation in Frameworks */ = {isa = PBXBuildFile; productRef = 1B6177E12C3E2F3B00324A69 /* JustACourierAppPresentation */; };
1B6E61772C3642E600562112 /* JustACourierAppDomain in Frameworks */ = {isa = PBXBuildFile; productRef = 1B6E61762C3642E600562112 /* JustACourierAppDomain */; };
Expand All @@ -31,6 +29,9 @@
1BE783802C2E61CA00D2093E /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BE7837F2C2E61CA00D2093E /* HomeScreen.swift */; };
1BE783822C2E61D400D2093E /* Screen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BE783812C2E61D400D2093E /* Screen.swift */; };
1BE783852C2E630000D2093E /* XCUIElement+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BE783842C2E630000D2093E /* XCUIElement+Extensions.swift */; };
FB65A21A2CF8B6960085A371 /* JustACourierAppPresentation in Frameworks */ = {isa = PBXBuildFile; productRef = FB65A2192CF8B6960085A371 /* JustACourierAppPresentation */; };
FB65A21D2CF8B7060085A371 /* JustACourierAppData in Frameworks */ = {isa = PBXBuildFile; productRef = FB65A21C2CF8B7060085A371 /* JustACourierAppData */; };
FB65A2202CF8BF000085A371 /* JustACourierAppData in Frameworks */ = {isa = PBXBuildFile; productRef = FB65A21F2CF8BF000085A371 /* JustACourierAppData */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -83,9 +84,10 @@
1BE1152F2C3E2A260018958E /* JustACourierAppDomain in Frameworks */,
1B6E61772C3642E600562112 /* JustACourierAppDomain in Frameworks */,
1B6177E22C3E2F3B00324A69 /* JustACourierAppPresentation in Frameworks */,
1B5EB7A72C3E3D9C007AD50F /* JustACourierAppPresentation in Frameworks */,
FB65A21A2CF8B6960085A371 /* JustACourierAppPresentation in Frameworks */,
1B96E9B22C3E1A4500ECC3F6 /* JustACourierAppData in Frameworks */,
1B6177DC2C3E2F2100324A69 /* JustACourierAppData in Frameworks */,
FB65A2202CF8BF000085A371 /* JustACourierAppData in Frameworks */,
FB65A21D2CF8B7060085A371 /* JustACourierAppData in Frameworks */,
1B96E9AF2C3E1A3000ECC3F6 /* JustACourierAppDomain in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -244,10 +246,11 @@
1B96E9B12C3E1A4500ECC3F6 /* JustACourierAppData */,
1BE1152E2C3E2A260018958E /* JustACourierAppDomain */,
1B6177D82C3E2E5000324A69 /* JustACourierAppPresentation */,
1B6177DB2C3E2F2100324A69 /* JustACourierAppData */,
1B6177DE2C3E2F2B00324A69 /* JustACourierAppDomain */,
1B6177E12C3E2F3B00324A69 /* JustACourierAppPresentation */,
1B5EB7A62C3E3D9C007AD50F /* JustACourierAppPresentation */,
FB65A2192CF8B6960085A371 /* JustACourierAppPresentation */,
FB65A21C2CF8B7060085A371 /* JustACourierAppData */,
FB65A21F2CF8BF000085A371 /* JustACourierAppData */,
);
productName = "mobile-courier-app";
productReference = 1B58EF732BE6BBE90066F447 /* mobile-courier-app.app */;
Expand Down Expand Up @@ -323,9 +326,9 @@
);
mainGroup = 1B58EF6A2BE6BBE90066F447;
packageReferences = (
1B6177DA2C3E2F2100324A69 /* XCRemoteSwiftPackageReference "mobile-courier-app-data" */,
1B6177DD2C3E2F2A00324A69 /* XCRemoteSwiftPackageReference "mobile-courier-app-domain" */,
1B5EB7A52C3E3D9C007AD50F /* XCRemoteSwiftPackageReference "mobile-courier-app-presentation" */,
FB65A2212CF8BF500085A371 /* XCRemoteSwiftPackageReference "mobile-courier-app-data" */,
FB34DAE42CF8FD04009E9D58 /* XCRemoteSwiftPackageReference "mobile-courier-app-presentation" */,
);
productRefGroup = 1B58EF742BE6BBE90066F447 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -769,25 +772,25 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
1B5EB7A52C3E3D9C007AD50F /* XCRemoteSwiftPackageReference "mobile-courier-app-presentation" */ = {
1B6177DD2C3E2F2A00324A69 /* XCRemoteSwiftPackageReference "mobile-courier-app-domain" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/vespinola/mobile-courier-app-presentation";
repositoryURL = "https://github.com/vespinola/mobile-courier-app-domain.git";
requirement = {
branch = main;
kind = branch;
};
};
1B6177DA2C3E2F2100324A69 /* XCRemoteSwiftPackageReference "mobile-courier-app-data" */ = {
FB34DAE42CF8FD04009E9D58 /* XCRemoteSwiftPackageReference "mobile-courier-app-presentation" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/vespinola/mobile-courier-app-data";
repositoryURL = "https://github.com/vespinola/mobile-courier-app-presentation.git";
requirement = {
branch = main;
kind = branch;
};
};
1B6177DD2C3E2F2A00324A69 /* XCRemoteSwiftPackageReference "mobile-courier-app-domain" */ = {
FB65A2212CF8BF500085A371 /* XCRemoteSwiftPackageReference "mobile-courier-app-data" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/vespinola/mobile-courier-app-domain.git";
repositoryURL = "https://github.com/vespinola/mobile-courier-app-data.git";
requirement = {
branch = main;
kind = branch;
Expand All @@ -796,20 +799,10 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
1B5EB7A62C3E3D9C007AD50F /* JustACourierAppPresentation */ = {
isa = XCSwiftPackageProductDependency;
package = 1B5EB7A52C3E3D9C007AD50F /* XCRemoteSwiftPackageReference "mobile-courier-app-presentation" */;
productName = JustACourierAppPresentation;
};
1B6177D82C3E2E5000324A69 /* JustACourierAppPresentation */ = {
isa = XCSwiftPackageProductDependency;
productName = JustACourierAppPresentation;
};
1B6177DB2C3E2F2100324A69 /* JustACourierAppData */ = {
isa = XCSwiftPackageProductDependency;
package = 1B6177DA2C3E2F2100324A69 /* XCRemoteSwiftPackageReference "mobile-courier-app-data" */;
productName = JustACourierAppData;
};
1B6177DE2C3E2F2B00324A69 /* JustACourierAppDomain */ = {
isa = XCSwiftPackageProductDependency;
package = 1B6177DD2C3E2F2A00324A69 /* XCRemoteSwiftPackageReference "mobile-courier-app-domain" */;
Expand Down Expand Up @@ -839,6 +832,18 @@
isa = XCSwiftPackageProductDependency;
productName = JustACourierAppDomain;
};
FB65A2192CF8B6960085A371 /* JustACourierAppPresentation */ = {
isa = XCSwiftPackageProductDependency;
productName = JustACourierAppPresentation;
};
FB65A21C2CF8B7060085A371 /* JustACourierAppData */ = {
isa = XCSwiftPackageProductDependency;
productName = JustACourierAppData;
};
FB65A21F2CF8BF000085A371 /* JustACourierAppData */ = {
isa = XCSwiftPackageProductDependency;
productName = JustACourierAppData;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 1B58EF6B2BE6BBE90066F447 /* Project object */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"originHash" : "cbc9d889b0cf14d1e78c40c7f350209a5a0de72ec1b00a76a8a7bd5467698914",
"originHash" : "a692aeded7ced933543fdb0408ccd48c2c51ca3f55f422997681fa5602fe51ff",
"pins" : [
{
"identity" : "mobile-courier-app-data",
"kind" : "remoteSourceControl",
"location" : "https://github.com/vespinola/mobile-courier-app-data",
"location" : "https://github.com/vespinola/mobile-courier-app-data.git",
"state" : {
"branch" : "main",
"revision" : "e4fde4d0c0e35eb3be7090a8106e17fc03a61534"
Expand All @@ -22,10 +22,10 @@
{
"identity" : "mobile-courier-app-presentation",
"kind" : "remoteSourceControl",
"location" : "https://github.com/vespinola/mobile-courier-app-presentation",
"location" : "https://github.com/vespinola/mobile-courier-app-presentation.git",
"state" : {
"branch" : "main",
"revision" : "a3c1c7da6110ffe08fc23e45e55b3f9052ecc0ad"
"revision" : "6e5e7d3f34c8a15e46874fdd3f7bfff98aa7a63a"
}
}
],
Expand Down
24 changes: 0 additions & 24 deletions mobile-courier-app/App/AppDIContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,6 @@ final class AppDIContainer: DIContainerProtocol {

// Helpers
register(UserDefaultsStorage(), for: Storage.self)

// ViewModels
register(
LoginViewModel(
authRepository: resolve(AuthRepositoryProtocol.self),
storage: resolve(Storage.self)),
for: LoginViewModel.self
)
register(
HomeViewModel(addressesRepository: resolve(AddressRepositoryProtocol.self)),
for: HomeViewModel.self
)
register(
WithdrawnPackagesViewModel(packagesRepository: resolve(PackagesRepositoryProtocol.self)),
for: WithdrawnPackagesViewModel.self
)
register(
PackagesForWithdrawalViewModel(packagesRepository: resolve(PackagesRepositoryProtocol.self)),
for: PackagesForWithdrawalViewModel.self
)
register(
SettingsViewModel(authRepository: resolve(AuthRepositoryProtocol.self)),
for: SettingsViewModel.self
)
}

func register<T>(_ service: T, for type: T.Type) {
Expand Down

0 comments on commit 054fd0b

Please sign in to comment.