first commit

This commit is contained in:
rafleze 2017-11-07 13:36:26 +01:00
parent 8c05d3f3df
commit 525371b079
14 changed files with 710 additions and 0 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@ -0,0 +1,452 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXAggregateTarget section */
"DepthNSDictionary::DepthNSDictionaryPackageTests::ProductTarget" /* DepthNSDictionaryPackageTests */ = {
isa = PBXAggregateTarget;
buildConfigurationList = OBJ_39 /* Build configuration list for PBXAggregateTarget "DepthNSDictionaryPackageTests" */;
buildPhases = (
);
dependencies = (
OBJ_42 /* PBXTargetDependency */,
);
name = DepthNSDictionaryPackageTests;
productName = DepthNSDictionaryPackageTests;
};
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
036A97C41FB1D9EB00B5CA13 /* DepthNSDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* DepthNSDictionaryTests.swift */; };
OBJ_21 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; };
OBJ_27 /* DepthNSDictionaryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* DepthNSDictionaryTests.swift */; };
OBJ_29 /* DepthNSDictionary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "DepthNSDictionary::DepthNSDictionary::Product" /* DepthNSDictionary.framework */; };
OBJ_36 /* DepthNSDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* DepthNSDictionary.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
036A97C21FB1D98100B5CA13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = OBJ_1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = "DepthNSDictionary::DepthNSDictionary";
remoteInfo = DepthNSDictionary;
};
036A97C31FB1D98200B5CA13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = OBJ_1 /* Project object */;
proxyType = 1;
remoteGlobalIDString = "DepthNSDictionary::DepthNSDictionaryTests";
remoteInfo = DepthNSDictionaryTests;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
"DepthNSDictionary::DepthNSDictionary::Product" /* DepthNSDictionary.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DepthNSDictionary.framework; sourceTree = BUILT_PRODUCTS_DIR; };
"DepthNSDictionary::DepthNSDictionaryTests::Product" /* DepthNSDictionaryTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = DepthNSDictionaryTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
OBJ_12 /* DepthNSDictionaryTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DepthNSDictionaryTests.swift; sourceTree = "<group>"; };
OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
OBJ_9 /* DepthNSDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DepthNSDictionary.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
OBJ_28 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 0;
files = (
OBJ_29 /* DepthNSDictionary.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
OBJ_37 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
OBJ_10 /* Tests */ = {
isa = PBXGroup;
children = (
OBJ_11 /* DepthNSDictionaryTests */,
);
name = Tests;
sourceTree = SOURCE_ROOT;
};
OBJ_11 /* DepthNSDictionaryTests */ = {
isa = PBXGroup;
children = (
OBJ_12 /* DepthNSDictionaryTests.swift */,
);
name = DepthNSDictionaryTests;
path = Tests/DepthNSDictionaryTests;
sourceTree = SOURCE_ROOT;
};
OBJ_13 /* Products */ = {
isa = PBXGroup;
children = (
"DepthNSDictionary::DepthNSDictionaryTests::Product" /* DepthNSDictionaryTests.xctest */,
"DepthNSDictionary::DepthNSDictionary::Product" /* DepthNSDictionary.framework */,
);
name = Products;
sourceTree = BUILT_PRODUCTS_DIR;
};
OBJ_5 /* */ = {
isa = PBXGroup;
children = (
OBJ_6 /* Package.swift */,
OBJ_7 /* Sources */,
OBJ_10 /* Tests */,
OBJ_13 /* Products */,
);
name = "";
sourceTree = "<group>";
};
OBJ_7 /* Sources */ = {
isa = PBXGroup;
children = (
OBJ_8 /* DepthNSDictionary */,
);
name = Sources;
sourceTree = SOURCE_ROOT;
};
OBJ_8 /* DepthNSDictionary */ = {
isa = PBXGroup;
children = (
OBJ_9 /* DepthNSDictionary.swift */,
);
name = DepthNSDictionary;
path = Sources/DepthNSDictionary;
sourceTree = SOURCE_ROOT;
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
"DepthNSDictionary::DepthNSDictionary" /* DepthNSDictionary */ = {
isa = PBXNativeTarget;
buildConfigurationList = OBJ_32 /* Build configuration list for PBXNativeTarget "DepthNSDictionary" */;
buildPhases = (
OBJ_35 /* Sources */,
OBJ_37 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = DepthNSDictionary;
productName = DepthNSDictionary;
productReference = "DepthNSDictionary::DepthNSDictionary::Product" /* DepthNSDictionary.framework */;
productType = "com.apple.product-type.framework";
};
"DepthNSDictionary::DepthNSDictionaryTests" /* DepthNSDictionaryTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = OBJ_23 /* Build configuration list for PBXNativeTarget "DepthNSDictionaryTests" */;
buildPhases = (
OBJ_26 /* Sources */,
OBJ_28 /* Frameworks */,
);
buildRules = (
);
dependencies = (
OBJ_30 /* PBXTargetDependency */,
);
name = DepthNSDictionaryTests;
productName = DepthNSDictionaryTests;
productReference = "DepthNSDictionary::DepthNSDictionaryTests::Product" /* DepthNSDictionaryTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
"DepthNSDictionary::SwiftPMPackageDescription" /* DepthNSDictionaryPackageDescription */ = {
isa = PBXNativeTarget;
buildConfigurationList = OBJ_17 /* Build configuration list for PBXNativeTarget "DepthNSDictionaryPackageDescription" */;
buildPhases = (
OBJ_20 /* Sources */,
);
buildRules = (
);
dependencies = (
);
name = DepthNSDictionaryPackageDescription;
productName = DepthNSDictionaryPackageDescription;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
OBJ_1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 9999;
};
buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "DepthNSDictionary" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = OBJ_5 /* */;
productRefGroup = OBJ_13 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
"DepthNSDictionary::SwiftPMPackageDescription" /* DepthNSDictionaryPackageDescription */,
"DepthNSDictionary::DepthNSDictionaryTests" /* DepthNSDictionaryTests */,
"DepthNSDictionary::DepthNSDictionary" /* DepthNSDictionary */,
"DepthNSDictionary::DepthNSDictionaryPackageTests::ProductTarget" /* DepthNSDictionaryPackageTests */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
OBJ_20 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 0;
files = (
OBJ_21 /* Package.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
OBJ_26 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 0;
files = (
OBJ_27 /* DepthNSDictionaryTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
OBJ_35 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 0;
files = (
036A97C41FB1D9EB00B5CA13 /* DepthNSDictionaryTests.swift in Sources */,
OBJ_36 /* DepthNSDictionary.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
OBJ_30 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = "DepthNSDictionary::DepthNSDictionary" /* DepthNSDictionary */;
targetProxy = 036A97C21FB1D98100B5CA13 /* PBXContainerItemProxy */;
};
OBJ_42 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = "DepthNSDictionary::DepthNSDictionaryTests" /* DepthNSDictionaryTests */;
targetProxy = 036A97C31FB1D98200B5CA13 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
OBJ_18 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD = /usr/bin/true;
OTHER_SWIFT_FLAGS = "-swift-version 4 -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk";
SWIFT_VERSION = 4.0;
};
name = Debug;
};
OBJ_19 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
LD = /usr/bin/true;
OTHER_SWIFT_FLAGS = "-swift-version 4 -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk";
SWIFT_VERSION = 4.0;
};
name = Release;
};
OBJ_24 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = DepthNSDictionary.xcodeproj/DepthNSDictionaryTests_Info.plist;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
SWIFT_VERSION = 4.0;
TARGET_NAME = DepthNSDictionaryTests;
};
name = Debug;
};
OBJ_25 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = DepthNSDictionary.xcodeproj/DepthNSDictionaryTests_Info.plist;
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @loader_path/Frameworks";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
SWIFT_VERSION = 4.0;
TARGET_NAME = DepthNSDictionaryTests;
};
name = Release;
};
OBJ_3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_NS_ASSERTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-DXcode";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
USE_HEADERMAP = NO;
};
name = Debug;
};
OBJ_33 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = DepthNSDictionary.xcodeproj/DepthNSDictionary_Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = DepthNSDictionary;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
TARGET_NAME = DepthNSDictionary;
};
name = Debug;
};
OBJ_34 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = DepthNSDictionary.xcodeproj/DepthNSDictionary_Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
OTHER_LDFLAGS = "$(inherited)";
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = DepthNSDictionary;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
TARGET_NAME = DepthNSDictionary;
};
name = Release;
};
OBJ_4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_OPTIMIZATION_LEVEL = s;
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_SWIFT_FLAGS = "-DXcode";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
USE_HEADERMAP = NO;
};
name = Release;
};
OBJ_40 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Debug;
};
OBJ_41 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
OBJ_17 /* Build configuration list for PBXNativeTarget "DepthNSDictionaryPackageDescription" */ = {
isa = XCConfigurationList;
buildConfigurations = (
OBJ_18 /* Debug */,
OBJ_19 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
OBJ_2 /* Build configuration list for PBXProject "DepthNSDictionary" */ = {
isa = XCConfigurationList;
buildConfigurations = (
OBJ_3 /* Debug */,
OBJ_4 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
OBJ_23 /* Build configuration list for PBXNativeTarget "DepthNSDictionaryTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
OBJ_24 /* Debug */,
OBJ_25 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
OBJ_32 /* Build configuration list for PBXNativeTarget "DepthNSDictionary" */ = {
isa = XCConfigurationList;
buildConfigurations = (
OBJ_33 /* Debug */,
OBJ_34 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
OBJ_39 /* Build configuration list for PBXAggregateTarget "DepthNSDictionaryPackageTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
OBJ_40 /* Debug */,
OBJ_41 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
};
rootObject = OBJ_1 /* Project object */;
}

View File

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

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "9999"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DepthNSDictionary::DepthNSDictionary"
BuildableName = "DepthNSDictionary.framework"
BlueprintName = "DepthNSDictionary"
ReferencedContainer = "container:DepthNSDictionary.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DepthNSDictionary::DepthNSDictionaryTests"
BuildableName = "DepthNSDictionaryTests.xctest"
BlueprintName = "DepthNSDictionaryTests"
ReferencedContainer = "container:DepthNSDictionary.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DepthNSDictionary::DepthNSDictionary"
BuildableName = "DepthNSDictionary.framework"
BlueprintName = "DepthNSDictionary"
ReferencedContainer = "container:DepthNSDictionary.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>DepthNSDictionary-Package.xcscheme</key>
<dict></dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict></dict>
</dict>
</plist>

View File

@ -0,0 +1,24 @@
<?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>SchemeUserState</key>
<dict>
<key>DepthNSDictionary-Package.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>DepthNSDictionaryPackageDescription.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
<key>DepthNSDictionaryPackageTests.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
</dict>
</dict>
</plist>

28
Package.swift Normal file
View File

@ -0,0 +1,28 @@
// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "DepthNSDictionary",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "DepthNSDictionary",
targets: ["DepthNSDictionary"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "DepthNSDictionary",
dependencies: []),
.testTarget(
name: "DepthNSDictionaryTests",
dependencies: ["DepthNSDictionary"]),
]
)

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# DepthNSDictionary
A description of this package.

View File

@ -0,0 +1,32 @@
//
// DepthNSDictionary.swift
// letsmeet
//
// Created by Raffaele Colace @ 20tabsrl on 06/11/17.
// Copyright © 2017 20tab srl. All rights reserved.
//
import Foundation
extension NSDictionary{
// Extension to navigate a nested dictionary using separator to search nested keys in a recursive implementation
func dfs(forKey: String, separator: String = "__") -> Any?{
var keys = forKey.components(separatedBy: separator)
for k in keys{
if let value = self.object(forKey: k) as? NSDictionary{
keys.remove(at: 0)
let keys_str = keys.joined(separator: separator)
return value.dfs(forKey: keys_str)
}
else{
return self.object(forKey: k)
}
}
return nil
}
}

View File

@ -0,0 +1,13 @@
import XCTest
@testable import DepthNSDictionary
class DepthNSDictionaryTests: XCTestCase {
let nested_dict: NSDictionary = ["a": 1, "b": ["c": 2, "d": 3], "e": 5]
func testNestedDictionary(){
XCTAssertEqual(1, self.nested_dict.dfs(forKey: "a") as! Int)
XCTAssertEqual(3, self.nested_dict.dfs(forKey: "b__d") as! Int)
let isNil = self.nested_dict.dfs(forKey: "dog__cat") == nil
XCTAssertTrue(isNil)
}
}

6
Tests/LinuxMain.swift Normal file
View File

@ -0,0 +1,6 @@
import XCTest
@testable import DepthNSDictionaryTests
XCTMain([
testCase(DepthNSDictionaryTests.allTests),
])