Add a framework projet for the DI

feature/new-shortcut-ranking
Emre KARTAL 1 year ago
parent e569962369
commit d5a9c75efb

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:DependencyInjection/DependencyInjection.xcodeproj">
</FileRef>
<FileRef
location = "group:Model">
</FileRef>

@ -6,6 +6,7 @@
//
import SwiftUI
import DependencyInjection
@main
struct AllInApp: App {

@ -6,6 +6,7 @@
//
import SwiftUI
import DependencyInjection
struct ContentView: View {

@ -7,6 +7,7 @@
import Foundation
import SwiftUI
import DependencyInjection
class LoginViewModel: ObservableObject {

@ -7,6 +7,7 @@
import Foundation
import SwiftUI
import DependencyInjection
class RegisterViewModel: ObservableObject {

@ -37,7 +37,6 @@
EC6B96B72B24B4CC00FC1C58 /* AllInUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96B62B24B4CC00FC1C58 /* AllInUITests.swift */; };
EC6B96B92B24B4CC00FC1C58 /* AllInUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96B82B24B4CC00FC1C58 /* AllInUITestsLaunchTests.swift */; };
EC6B96C72B24B5A100FC1C58 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96C62B24B5A100FC1C58 /* User.swift */; };
EC6B96C92B24B69B00FC1C58 /* DependancyInjection.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96C82B24B69B00FC1C58 /* DependancyInjection.swift */; };
EC6B96CC2B24B7E500FC1C58 /* IAuthService.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96CB2B24B7E500FC1C58 /* IAuthService.swift */; };
EC6B96CF2B24B8D900FC1C58 /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96CE2B24B8D900FC1C58 /* Config.swift */; };
EC6B96D12B24BAE800FC1C58 /* AuthService.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96D02B24BAE800FC1C58 /* AuthService.swift */; };
@ -49,6 +48,8 @@
EC89F7BD2B250D66003821CE /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC89F7BC2B250D66003821CE /* LoginView.swift */; };
ECA9D1C92B2D9ADA0076E0EC /* UserInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA9D1C82B2D9ADA0076E0EC /* UserInfo.swift */; };
ECA9D1CB2B2DA2320076E0EC /* DropDownFriends.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA9D1CA2B2DA2320076E0EC /* DropDownFriends.swift */; };
ECB357312B3CA69300045D41 /* DependencyInjection.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECB357302B3CA69300045D41 /* DependencyInjection.framework */; };
ECB357322B3CA69300045D41 /* DependencyInjection.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = ECB357302B3CA69300045D41 /* DependencyInjection.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
ECB7BC682B2F1ADF002A6654 /* LoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC672B2F1ADF002A6654 /* LoginViewModel.swift */; };
ECB7BC6A2B2F410A002A6654 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC692B2F410A002A6654 /* AppDelegate.swift */; };
ECB7BC6C2B2F43EE002A6654 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC6B2B2F43EE002A6654 /* AppState.swift */; };
@ -72,6 +73,20 @@
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
ECB357332B3CA69300045D41 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
ECB357322B3CA69300045D41 /* DependencyInjection.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
EC0193772B25BF16005D81E6 /* AllcoinsCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllcoinsCapsule.swift; sourceTree = "<group>"; };
EC0193792B25C12B005D81E6 /* BetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BetCard.swift; sourceTree = "<group>"; };
@ -106,7 +121,6 @@
EC6B96B62B24B4CC00FC1C58 /* AllInUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITests.swift; sourceTree = "<group>"; };
EC6B96B82B24B4CC00FC1C58 /* AllInUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITestsLaunchTests.swift; sourceTree = "<group>"; };
EC6B96C62B24B5A100FC1C58 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
EC6B96C82B24B69B00FC1C58 /* DependancyInjection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DependancyInjection.swift; sourceTree = "<group>"; };
EC6B96CB2B24B7E500FC1C58 /* IAuthService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IAuthService.swift; sourceTree = "<group>"; };
EC6B96CE2B24B8D900FC1C58 /* Config.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = "<group>"; };
EC6B96D02B24BAE800FC1C58 /* AuthService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthService.swift; sourceTree = "<group>"; };
@ -118,6 +132,8 @@
EC89F7BC2B250D66003821CE /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = "<group>"; };
ECA9D1C82B2D9ADA0076E0EC /* UserInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserInfo.swift; sourceTree = "<group>"; };
ECA9D1CA2B2DA2320076E0EC /* DropDownFriends.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropDownFriends.swift; sourceTree = "<group>"; };
ECB3572E2B3CA3C300045D41 /* DependencyInjection.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DependencyInjection.framework; sourceTree = BUILT_PRODUCTS_DIR; };
ECB357302B3CA69300045D41 /* DependencyInjection.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DependencyInjection.framework; sourceTree = BUILT_PRODUCTS_DIR; };
ECB7BC672B2F1ADF002A6654 /* LoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModel.swift; sourceTree = "<group>"; };
ECB7BC692B2F410A002A6654 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
ECB7BC6B2B2F43EE002A6654 /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = "<group>"; };
@ -129,6 +145,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
ECB357312B3CA69300045D41 /* DependencyInjection.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -156,6 +173,7 @@
EC6B96AB2B24B4CC00FC1C58 /* AllInTests */,
EC6B96B52B24B4CC00FC1C58 /* AllInUITests */,
EC6B96992B24B4CC00FC1C58 /* Products */,
ECB3572D2B3CA3BD00045D41 /* Frameworks */,
);
sourceTree = "<group>";
};
@ -219,7 +237,6 @@
isa = PBXGroup;
children = (
EC6B96C62B24B5A100FC1C58 /* User.swift */,
EC6B96C82B24B69B00FC1C58 /* DependancyInjection.swift */,
);
path = Models;
sourceTree = "<group>";
@ -291,6 +308,15 @@
path = Components;
sourceTree = "<group>";
};
ECB3572D2B3CA3BD00045D41 /* Frameworks */ = {
isa = PBXGroup;
children = (
ECB357302B3CA69300045D41 /* DependencyInjection.framework */,
ECB3572E2B3CA3C300045D41 /* DependencyInjection.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
ECB7BC662B2F1AAD002A6654 /* ViewModels */ = {
isa = PBXGroup;
children = (
@ -310,6 +336,7 @@
EC6B96942B24B4CC00FC1C58 /* Sources */,
EC6B96952B24B4CC00FC1C58 /* Frameworks */,
EC6B96962B24B4CC00FC1C58 /* Resources */,
ECB357332B3CA69300045D41 /* Embed Frameworks */,
);
buildRules = (
);
@ -449,7 +476,6 @@
EC650A462B25D686003AFCAD /* RankingRow.swift in Sources */,
EC01937A2B25C12B005D81E6 /* BetCard.swift in Sources */,
EC650A422B25C817003AFCAD /* Friend.swift in Sources */,
EC6B96C92B24B69B00FC1C58 /* DependancyInjection.swift in Sources */,
EC7A882F2B28E6BE004F226A /* ConfidentialityButton.swift in Sources */,
ECB7BC702B336E28002A6654 /* RegisterViewModel.swift in Sources */,
EC650A4C2B25E9C7003AFCAD /* RankingView.swift in Sources */,

@ -0,0 +1,486 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {
/* Begin PBXBuildFile section */
ECB3572C2B3CA37800045D41 /* DependencyInjection.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB3572B2B3CA37800045D41 /* DependencyInjection.swift */; };
ECEE18B82B3C9CF400C95E8A /* DependencyInjection.docc in Sources */ = {isa = PBXBuildFile; fileRef = ECEE18B72B3C9CF400C95E8A /* DependencyInjection.docc */; };
ECEE18BE2B3C9CF400C95E8A /* DependencyInjection.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECEE18B32B3C9CF400C95E8A /* DependencyInjection.framework */; };
ECEE18C32B3C9CF400C95E8A /* DependencyInjectionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECEE18C22B3C9CF400C95E8A /* DependencyInjectionTests.swift */; };
ECEE18C42B3C9CF400C95E8A /* DependencyInjection.h in Headers */ = {isa = PBXBuildFile; fileRef = ECEE18B62B3C9CF400C95E8A /* DependencyInjection.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
ECEE18BF2B3C9CF400C95E8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = ECEE18AA2B3C9CF400C95E8A /* Project object */;
proxyType = 1;
remoteGlobalIDString = ECEE18B22B3C9CF400C95E8A;
remoteInfo = DependencyInjection;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
ECB3572B2B3CA37800045D41 /* DependencyInjection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DependencyInjection.swift; sourceTree = "<group>"; };
ECEE18B32B3C9CF400C95E8A /* DependencyInjection.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DependencyInjection.framework; sourceTree = BUILT_PRODUCTS_DIR; };
ECEE18B62B3C9CF400C95E8A /* DependencyInjection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DependencyInjection.h; sourceTree = "<group>"; };
ECEE18B72B3C9CF400C95E8A /* DependencyInjection.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = DependencyInjection.docc; sourceTree = "<group>"; };
ECEE18BD2B3C9CF400C95E8A /* DependencyInjectionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DependencyInjectionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
ECEE18C22B3C9CF400C95E8A /* DependencyInjectionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DependencyInjectionTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
ECEE18B02B3C9CF400C95E8A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
ECEE18BA2B3C9CF400C95E8A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
ECEE18BE2B3C9CF400C95E8A /* DependencyInjection.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
ECEE18A92B3C9CF400C95E8A = {
isa = PBXGroup;
children = (
ECEE18B52B3C9CF400C95E8A /* DependencyInjection */,
ECEE18C12B3C9CF400C95E8A /* DependencyInjectionTests */,
ECEE18B42B3C9CF400C95E8A /* Products */,
);
sourceTree = "<group>";
};
ECEE18B42B3C9CF400C95E8A /* Products */ = {
isa = PBXGroup;
children = (
ECEE18B32B3C9CF400C95E8A /* DependencyInjection.framework */,
ECEE18BD2B3C9CF400C95E8A /* DependencyInjectionTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
ECEE18B52B3C9CF400C95E8A /* DependencyInjection */ = {
isa = PBXGroup;
children = (
ECEE18B62B3C9CF400C95E8A /* DependencyInjection.h */,
ECEE18B72B3C9CF400C95E8A /* DependencyInjection.docc */,
ECB3572B2B3CA37800045D41 /* DependencyInjection.swift */,
);
path = DependencyInjection;
sourceTree = "<group>";
};
ECEE18C12B3C9CF400C95E8A /* DependencyInjectionTests */ = {
isa = PBXGroup;
children = (
ECEE18C22B3C9CF400C95E8A /* DependencyInjectionTests.swift */,
);
path = DependencyInjectionTests;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
ECEE18AE2B3C9CF400C95E8A /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
ECEE18C42B3C9CF400C95E8A /* DependencyInjection.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
ECEE18B22B3C9CF400C95E8A /* DependencyInjection */ = {
isa = PBXNativeTarget;
buildConfigurationList = ECEE18C72B3C9CF400C95E8A /* Build configuration list for PBXNativeTarget "DependencyInjection" */;
buildPhases = (
ECEE18AE2B3C9CF400C95E8A /* Headers */,
ECEE18AF2B3C9CF400C95E8A /* Sources */,
ECEE18B02B3C9CF400C95E8A /* Frameworks */,
ECEE18B12B3C9CF400C95E8A /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = DependencyInjection;
productName = DependencyInjection;
productReference = ECEE18B32B3C9CF400C95E8A /* DependencyInjection.framework */;
productType = "com.apple.product-type.framework";
};
ECEE18BC2B3C9CF400C95E8A /* DependencyInjectionTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = ECEE18CA2B3C9CF400C95E8A /* Build configuration list for PBXNativeTarget "DependencyInjectionTests" */;
buildPhases = (
ECEE18B92B3C9CF400C95E8A /* Sources */,
ECEE18BA2B3C9CF400C95E8A /* Frameworks */,
ECEE18BB2B3C9CF400C95E8A /* Resources */,
);
buildRules = (
);
dependencies = (
ECEE18C02B3C9CF400C95E8A /* PBXTargetDependency */,
);
name = DependencyInjectionTests;
productName = DependencyInjectionTests;
productReference = ECEE18BD2B3C9CF400C95E8A /* DependencyInjectionTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
ECEE18AA2B3C9CF400C95E8A /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1430;
LastUpgradeCheck = 1430;
TargetAttributes = {
ECEE18B22B3C9CF400C95E8A = {
CreatedOnToolsVersion = 14.3.1;
};
ECEE18BC2B3C9CF400C95E8A = {
CreatedOnToolsVersion = 14.3.1;
};
};
};
buildConfigurationList = ECEE18AD2B3C9CF400C95E8A /* Build configuration list for PBXProject "DependencyInjection" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = ECEE18A92B3C9CF400C95E8A;
productRefGroup = ECEE18B42B3C9CF400C95E8A /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
ECEE18B22B3C9CF400C95E8A /* DependencyInjection */,
ECEE18BC2B3C9CF400C95E8A /* DependencyInjectionTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
ECEE18B12B3C9CF400C95E8A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
ECEE18BB2B3C9CF400C95E8A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
ECEE18AF2B3C9CF400C95E8A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
ECB3572C2B3CA37800045D41 /* DependencyInjection.swift in Sources */,
ECEE18B82B3C9CF400C95E8A /* DependencyInjection.docc in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
ECEE18B92B3C9CF400C95E8A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
ECEE18C32B3C9CF400C95E8A /* DependencyInjectionTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
ECEE18C02B3C9CF400C95E8A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = ECEE18B22B3C9CF400C95E8A /* DependencyInjection */;
targetProxy = ECEE18BF2B3C9CF400C95E8A /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
ECEE18C52B3C9CF400C95E8A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
ECEE18C62B3C9CF400C95E8A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
ECEE18C82B3C9CF400C95E8A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20";
PRODUCT_BUNDLE_IDENTIFIER = com.alldev.DependencyInjection;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = auto;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
ECEE18C92B3C9CF400C95E8A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20";
PRODUCT_BUNDLE_IDENTIFIER = com.alldev.DependencyInjection;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = auto;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
ECEE18CB2B3C9CF400C95E8A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.alldev.DependencyInjectionTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
ECEE18CC2B3C9CF400C95E8A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
MACOSX_DEPLOYMENT_TARGET = 13.3;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.alldev.DependencyInjectionTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
ECEE18AD2B3C9CF400C95E8A /* Build configuration list for PBXProject "DependencyInjection" */ = {
isa = XCConfigurationList;
buildConfigurations = (
ECEE18C52B3C9CF400C95E8A /* Debug */,
ECEE18C62B3C9CF400C95E8A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
ECEE18C72B3C9CF400C95E8A /* Build configuration list for PBXNativeTarget "DependencyInjection" */ = {
isa = XCConfigurationList;
buildConfigurations = (
ECEE18C82B3C9CF400C95E8A /* Debug */,
ECEE18C92B3C9CF400C95E8A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
ECEE18CA2B3C9CF400C95E8A /* Build configuration list for PBXNativeTarget "DependencyInjectionTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
ECEE18CB2B3C9CF400C95E8A /* Debug */,
ECEE18CC2B3C9CF400C95E8A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = ECEE18AA2B3C9CF400C95E8A /* Project object */;
}

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

@ -0,0 +1,13 @@
# ``DependencyInjection``
<!--@START_MENU_TOKEN@-->Summary<!--@END_MENU_TOKEN@-->
## Overview
<!--@START_MENU_TOKEN@-->Text<!--@END_MENU_TOKEN@-->
## Topics
### <!--@START_MENU_TOKEN@-->Group<!--@END_MENU_TOKEN@-->
- <!--@START_MENU_TOKEN@-->``Symbol``<!--@END_MENU_TOKEN@-->

@ -0,0 +1,18 @@
//
// DependencyInjection.h
// DependencyInjection
//
// Created by Emre on 27/12/2023.
//
#import <Foundation/Foundation.h>
//! Project version number for DependencyInjection.
FOUNDATION_EXPORT double DependencyInjectionVersionNumber;
//! Project version string for DependencyInjection.
FOUNDATION_EXPORT const unsigned char DependencyInjectionVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <DependencyInjection/PublicHeader.h>

@ -1,38 +1,38 @@
//
// DependancyInjection.swift
// AllIn
// DependencyInjection.swift
// DependencyInjection
//
// Created by Emre on 20/10/2023.
// Created by Emre on 27/12/2023.
//
import Foundation
class DependencyInjection {
static var shared = DependencyInjection()
public class DependencyInjection {
public static var shared = DependencyInjection()
private var singletons = [String: Any]()
@discardableResult
func addSingleton<T>(_ type: T.Type, _ instance: T) -> DependencyInjection {
public func addSingleton<T>(_ type: T.Type, _ instance: T) -> DependencyInjection {
let key = String(describing: T.self)
singletons[key] = instance
return self
}
func resolve<T>(_ type: T.Type) -> T? {
public func resolve<T>(_ type: T.Type) -> T? {
let key = String(describing: T.self)
return singletons[key] as? T
}
}
@propertyWrapper
struct Inject<T> {
public struct Inject<T> {
private var value: T?
init() {
public init() {
self.value = DependencyInjection.shared.resolve(T.self)
}
var wrappedValue: T {
public var wrappedValue: T {
get {
if let value = value {
return value

@ -0,0 +1,36 @@
//
// DependencyInjectionTests.swift
// DependencyInjectionTests
//
// Created by Emre on 27/12/2023.
//
import XCTest
@testable import DependencyInjection
class DependencyInjectionTests: XCTestCase {
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}
func testExample() throws {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
// Any test you write for XCTest can be annotated as throws and async.
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
}
func testPerformanceExample() throws {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
Loading…
Cancel
Save