From a7251063b5bcf8405d0d8bb1476f1c6a0ee67782 Mon Sep 17 00:00:00 2001 From: Yuta Koshizawa Date: Wed, 2 Nov 2016 13:28:54 +0900 Subject: [PATCH] Apply a SPM-like file tree to the repository --- .gitignore | 23 +- Example/main.swift | 67 - Package.swift | 5 + PromiseK.xcodeproj/Configs/Project.xcconfig | 7 + PromiseK.xcodeproj/PromiseKTests_Info.plist | 25 + PromiseK.xcodeproj/PromiseK_Info.plist | 25 + PromiseK.xcodeproj/project.pbxproj | 1270 +++-------------- .../contents.xcworkspacedata | 2 +- .../xcshareddata/WorkspaceSettings.xcsettings | 8 - .../xcschemes/PromiseK-Mac.xcscheme | 99 -- .../xcschemes/PromiseK-iOS.xcscheme | 99 -- .../xcschemes/PromiseK-tvOS.xcscheme | 99 -- ...seK-watchOS.xcscheme => PromiseK.xcscheme} | 29 +- .../xcschemes/xcschememanagement.plist | 12 + Source/Info.plist | 26 - {Source => Sources}/Operators.swift | 0 {Source => Sources}/Promise.swift | 0 {Source => Sources}/PromiseK.h | 0 Tests/Info.plist | 24 - Tests/LinuxMain.swift | 6 + Tests/{ => PromiseKTests}/PromiseKTests.swift | 66 +- 21 files changed, 391 insertions(+), 1501 deletions(-) delete mode 100644 Example/main.swift create mode 100644 Package.swift create mode 100644 PromiseK.xcodeproj/Configs/Project.xcconfig create mode 100644 PromiseK.xcodeproj/PromiseKTests_Info.plist create mode 100644 PromiseK.xcodeproj/PromiseK_Info.plist delete mode 100644 PromiseK.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-Mac.xcscheme delete mode 100644 PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-iOS.xcscheme delete mode 100644 PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-tvOS.xcscheme rename PromiseK.xcodeproj/xcshareddata/xcschemes/{PromiseK-watchOS.xcscheme => PromiseK.xcscheme} (77%) create mode 100644 PromiseK.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist delete mode 100644 Source/Info.plist rename {Source => Sources}/Operators.swift (100%) rename {Source => Sources}/Promise.swift (100%) rename {Source => Sources}/PromiseK.h (100%) delete mode 100644 Tests/Info.plist create mode 100644 Tests/LinuxMain.swift rename Tests/{ => PromiseKTests}/PromiseKTests.swift (81%) diff --git a/.gitignore b/.gitignore index ec839c0..9debffb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,5 @@ -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate +/.build +/*.xcodeproj/xcshareddata/ +/*.xcodeproj/project.xcworkspace/xcuserdata/ +/*.xcodeproj/xcuserdata/ +/Carthage diff --git a/Example/main.swift b/Example/main.swift deleted file mode 100644 index a1998dd..0000000 --- a/Example/main.swift +++ /dev/null @@ -1,67 +0,0 @@ -import Foundation - -extension Promise { - func wait() { - var finished = false - self.flatMap { (value: T) -> Promise<()> in - finished = true - return Promise<()>() - } - while (!finished){ - NSRunLoop.currentRunLoop().runUntilDate(NSDate(timeIntervalSinceNow: 0.1)) - } - } -} - -func async(value: T) -> Promise { - return Promise { resolve in - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(0.1 * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { - resolve(Promise(value)) - } - } -} - -func asyncGet(value: Int) -> Promise { - return async(value) -} - -func asyncFailable(value: Int) -> Promise { - return async(value).map { arc4random() % 2 == 0 ? $0 : nil } -} - -// `flatMap` is equivalent to `then` of JavaScript's `Promise` -let a: Promise = asyncGet(2).flatMap { asyncGet($0) }.flatMap { asyncGet($0) } -let b: Promise = asyncGet(3).map { $0 * $0 } -let sum: Promise = a.flatMap { a0 in b.flatMap{ b0 in Promise(a0 + b0) } } - -// uses `Optional` for error handling -let mightFail: Promise = asyncFailable(5).flatMap { Promise($0.map { $0 * $0 }) } -let howToCatch: Promise = asyncFailable(7).flatMap { Promise($0 ?? 0) } - -// `>>-` operator is equivalent to `>>=` in Haskell -// can use `>>-` instead of `flatMap` -let a2: Promise = asyncGet(2) >>- { asyncGet($0) } >>- { asyncGet($0) } -// a failable operation chain with `>>-` -let failableChain: Promise = asyncFailable(11) >>- { $0.map { asyncFailable($0) } } -// also `>>-?` operator is available -let failableChain2: Promise = asyncFailable(11) >>-? { asyncFailable($0) } - -sum.wait() -print(a) -print(b) -print(sum) - -mightFail.wait() -print(mightFail) - -howToCatch.wait() -print(howToCatch) - -a2.wait() -print(a2) - -failableChain.wait() -print(failableChain) - -failableChain2.wait() -print(failableChain2) diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..998b193 --- /dev/null +++ b/Package.swift @@ -0,0 +1,5 @@ +import PackageDescription + +let package = Package( + name: "PromiseK" +) diff --git a/PromiseK.xcodeproj/Configs/Project.xcconfig b/PromiseK.xcodeproj/Configs/Project.xcconfig new file mode 100644 index 0000000..5f63024 --- /dev/null +++ b/PromiseK.xcodeproj/Configs/Project.xcconfig @@ -0,0 +1,7 @@ +PRODUCT_NAME = $(TARGET_NAME) +SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator +MACOSX_DEPLOYMENT_TARGET = 10.10 +DYLIB_INSTALL_NAME_BASE = @rpath +OTHER_SWIFT_FLAGS = -DXcode +COMBINE_HIDPI_IMAGES = YES +USE_HEADERMAP = NO diff --git a/PromiseK.xcodeproj/PromiseKTests_Info.plist b/PromiseK.xcodeproj/PromiseKTests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/PromiseK.xcodeproj/PromiseKTests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/PromiseK.xcodeproj/PromiseK_Info.plist b/PromiseK.xcodeproj/PromiseK_Info.plist new file mode 100644 index 0000000..57ada9f --- /dev/null +++ b/PromiseK.xcodeproj/PromiseK_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/PromiseK.xcodeproj/project.pbxproj b/PromiseK.xcodeproj/project.pbxproj index ccfb25a..790a974 100644 --- a/PromiseK.xcodeproj/project.pbxproj +++ b/PromiseK.xcodeproj/project.pbxproj @@ -1,1046 +1,230 @@ // !$*UTF8*$! { - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - D6553C4A1C08199700A85392 /* PromiseK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6553C401C08199700A85392 /* PromiseK.framework */; }; - D6553C571C0819D100A85392 /* PromiseK.h in Headers */ = {isa = PBXBuildFile; fileRef = D6C80F141ABBE67B00F4FE3B /* PromiseK.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D6553C581C0819D100A85392 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F151ABBE67B00F4FE3B /* Promise.swift */; }; - D6553C591C081AB300A85392 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6948BA51B7CA97400CDD8FE /* Operators.swift */; }; - D6553C5A1C081D2500A85392 /* PromiseKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F181ABBE67B00F4FE3B /* PromiseKTests.swift */; }; - D6553CAD1C081E8400A85392 /* PromiseK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6553CA31C081E8400A85392 /* PromiseK.framework */; }; - D6553CBA1C081EC700A85392 /* PromiseK.h in Headers */ = {isa = PBXBuildFile; fileRef = D6C80F141ABBE67B00F4FE3B /* PromiseK.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D6553CBB1C081EC700A85392 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F151ABBE67B00F4FE3B /* Promise.swift */; }; - D6553CBC1C081EC700A85392 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6948BA51B7CA97400CDD8FE /* Operators.swift */; }; - D6553CBD1C081EC800A85392 /* PromiseK.h in Headers */ = {isa = PBXBuildFile; fileRef = D6C80F141ABBE67B00F4FE3B /* PromiseK.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D6553CBE1C081EC800A85392 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F151ABBE67B00F4FE3B /* Promise.swift */; }; - D6553CBF1C081EC800A85392 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6948BA51B7CA97400CDD8FE /* Operators.swift */; }; - D6553CC01C081ECE00A85392 /* PromiseKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F181ABBE67B00F4FE3B /* PromiseKTests.swift */; }; - D65818331BB4E32900EF4530 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F151ABBE67B00F4FE3B /* Promise.swift */; }; - D65818341BB4E32900EF4530 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6948BA51B7CA97400CDD8FE /* Operators.swift */; }; - D6948BA61B7CA97400CDD8FE /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6948BA51B7CA97400CDD8FE /* Operators.swift */; }; - D6A48F551A8448BE008272B1 /* PromiseK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6A48F491A8448BE008272B1 /* PromiseK.framework */; }; - D6C80F1B1ABBE67B00F4FE3B /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F151ABBE67B00F4FE3B /* Promise.swift */; }; - D6C80F201ABBE68700F4FE3B /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F1F1ABBE68700F4FE3B /* main.swift */; }; - D6C80F211ABBE8AE00F4FE3B /* PromiseK.h in Headers */ = {isa = PBXBuildFile; fileRef = D6C80F141ABBE67B00F4FE3B /* PromiseK.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D6C80F221ABBE8C700F4FE3B /* PromiseKTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C80F181ABBE67B00F4FE3B /* PromiseKTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - D6553C4B1C08199700A85392 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D6A48F401A8448BE008272B1 /* Project object */; - proxyType = 1; - remoteGlobalIDString = D6553C3F1C08199700A85392; - remoteInfo = "PromiseK-Mac"; - }; - D6553CAE1C081E8400A85392 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D6A48F401A8448BE008272B1 /* Project object */; - proxyType = 1; - remoteGlobalIDString = D6553CA21C081E8400A85392; - remoteInfo = "PromiseK-tvOS"; - }; - D6A48F561A8448BE008272B1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D6A48F401A8448BE008272B1 /* Project object */; - proxyType = 1; - remoteGlobalIDString = D6A48F481A8448BE008272B1; - remoteInfo = PromiseK; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - D6A48F691A84CBD3008272B1 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - D6553C401C08199700A85392 /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6553C491C08199700A85392 /* PromiseK-Mac Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PromiseK-Mac Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - D6553C961C081E7500A85392 /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6553CA31C081E8400A85392 /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6553CAC1C081E8400A85392 /* PromiseK-tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PromiseK-tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - D6948BA51B7CA97400CDD8FE /* Operators.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Operators.swift; sourceTree = ""; }; - D6A48F491A8448BE008272B1 /* PromiseK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6A48F541A8448BE008272B1 /* PromiseK-iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PromiseK-iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - D6A48F6B1A84CBD3008272B1 /* PromiseKExample */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PromiseKExample; sourceTree = BUILT_PRODUCTS_DIR; }; - D6C80F131ABBE67B00F4FE3B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D6C80F141ABBE67B00F4FE3B /* PromiseK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PromiseK.h; sourceTree = ""; }; - D6C80F151ABBE67B00F4FE3B /* Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Promise.swift; sourceTree = ""; }; - D6C80F171ABBE67B00F4FE3B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D6C80F181ABBE67B00F4FE3B /* PromiseKTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseKTests.swift; sourceTree = ""; }; - D6C80F1F1ABBE68700F4FE3B /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D6553C3C1C08199700A85392 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C461C08199700A85392 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553C4A1C08199700A85392 /* PromiseK.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C921C081E7500A85392 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C9F1C081E8400A85392 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553CA91C081E8400A85392 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553CAD1C081E8400A85392 /* PromiseK.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F451A8448BE008272B1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F511A8448BE008272B1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D6A48F551A8448BE008272B1 /* PromiseK.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F681A84CBD3008272B1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - D6A48F3F1A8448BE008272B1 = { - isa = PBXGroup; - children = ( - D6C80F121ABBE67B00F4FE3B /* Source */, - D6C80F161ABBE67B00F4FE3B /* Tests */, - D6C80F1E1ABBE68700F4FE3B /* Example */, - D6A48F4A1A8448BE008272B1 /* Products */, - ); - sourceTree = ""; - }; - D6A48F4A1A8448BE008272B1 /* Products */ = { - isa = PBXGroup; - children = ( - D6A48F491A8448BE008272B1 /* PromiseK.framework */, - D6A48F541A8448BE008272B1 /* PromiseK-iOS Tests.xctest */, - D6A48F6B1A84CBD3008272B1 /* PromiseKExample */, - D6553C401C08199700A85392 /* PromiseK.framework */, - D6553C491C08199700A85392 /* PromiseK-Mac Tests.xctest */, - D6553C961C081E7500A85392 /* PromiseK.framework */, - D6553CA31C081E8400A85392 /* PromiseK.framework */, - D6553CAC1C081E8400A85392 /* PromiseK-tvOS Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - D6C80F121ABBE67B00F4FE3B /* Source */ = { - isa = PBXGroup; - children = ( - D6C80F131ABBE67B00F4FE3B /* Info.plist */, - D6C80F141ABBE67B00F4FE3B /* PromiseK.h */, - D6C80F151ABBE67B00F4FE3B /* Promise.swift */, - D6948BA51B7CA97400CDD8FE /* Operators.swift */, - ); - path = Source; - sourceTree = ""; - }; - D6C80F161ABBE67B00F4FE3B /* Tests */ = { - isa = PBXGroup; - children = ( - D6C80F171ABBE67B00F4FE3B /* Info.plist */, - D6C80F181ABBE67B00F4FE3B /* PromiseKTests.swift */, - ); - path = Tests; - sourceTree = ""; - }; - D6C80F1E1ABBE68700F4FE3B /* Example */ = { - isa = PBXGroup; - children = ( - D6C80F1F1ABBE68700F4FE3B /* main.swift */, - ); - path = Example; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - D6553C3D1C08199700A85392 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553C571C0819D100A85392 /* PromiseK.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C931C081E7500A85392 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553CBD1C081EC800A85392 /* PromiseK.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553CA01C081E8400A85392 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553CBA1C081EC700A85392 /* PromiseK.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F461A8448BE008272B1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D6C80F211ABBE8AE00F4FE3B /* PromiseK.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - D6553C3F1C08199700A85392 /* PromiseK-Mac */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6553C551C08199700A85392 /* Build configuration list for PBXNativeTarget "PromiseK-Mac" */; - buildPhases = ( - D6553C3B1C08199700A85392 /* Sources */, - D6553C3C1C08199700A85392 /* Frameworks */, - D6553C3D1C08199700A85392 /* Headers */, - D6553C3E1C08199700A85392 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PromiseK-Mac"; - productName = "PromiseK-Mac"; - productReference = D6553C401C08199700A85392 /* PromiseK.framework */; - productType = "com.apple.product-type.framework"; - }; - D6553C481C08199700A85392 /* PromiseK-Mac Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6553C561C08199700A85392 /* Build configuration list for PBXNativeTarget "PromiseK-Mac Tests" */; - buildPhases = ( - D6553C451C08199700A85392 /* Sources */, - D6553C461C08199700A85392 /* Frameworks */, - D6553C471C08199700A85392 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - D6553C4C1C08199700A85392 /* PBXTargetDependency */, - ); - name = "PromiseK-Mac Tests"; - productName = "PromiseK-MacTests"; - productReference = D6553C491C08199700A85392 /* PromiseK-Mac Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - D6553C951C081E7500A85392 /* PromiseK-watchOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6553C9D1C081E7500A85392 /* Build configuration list for PBXNativeTarget "PromiseK-watchOS" */; - buildPhases = ( - D6553C911C081E7500A85392 /* Sources */, - D6553C921C081E7500A85392 /* Frameworks */, - D6553C931C081E7500A85392 /* Headers */, - D6553C941C081E7500A85392 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PromiseK-watchOS"; - productName = "PromiseK-watchOS"; - productReference = D6553C961C081E7500A85392 /* PromiseK.framework */; - productType = "com.apple.product-type.framework"; - }; - D6553CA21C081E8400A85392 /* PromiseK-tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6553CB41C081E8400A85392 /* Build configuration list for PBXNativeTarget "PromiseK-tvOS" */; - buildPhases = ( - D6553C9E1C081E8400A85392 /* Sources */, - D6553C9F1C081E8400A85392 /* Frameworks */, - D6553CA01C081E8400A85392 /* Headers */, - D6553CA11C081E8400A85392 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PromiseK-tvOS"; - productName = "PromiseK-tvOS"; - productReference = D6553CA31C081E8400A85392 /* PromiseK.framework */; - productType = "com.apple.product-type.framework"; - }; - D6553CAB1C081E8400A85392 /* PromiseK-tvOS Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6553CB71C081E8400A85392 /* Build configuration list for PBXNativeTarget "PromiseK-tvOS Tests" */; - buildPhases = ( - D6553CA81C081E8400A85392 /* Sources */, - D6553CA91C081E8400A85392 /* Frameworks */, - D6553CAA1C081E8400A85392 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - D6553CAF1C081E8400A85392 /* PBXTargetDependency */, - ); - name = "PromiseK-tvOS Tests"; - productName = "PromiseK-tvOSTests"; - productReference = D6553CAC1C081E8400A85392 /* PromiseK-tvOS Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - D6A48F481A8448BE008272B1 /* PromiseK-iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6A48F5F1A8448BE008272B1 /* Build configuration list for PBXNativeTarget "PromiseK-iOS" */; - buildPhases = ( - D6A48F441A8448BE008272B1 /* Sources */, - D6A48F451A8448BE008272B1 /* Frameworks */, - D6A48F461A8448BE008272B1 /* Headers */, - D6A48F471A8448BE008272B1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PromiseK-iOS"; - productName = PromiseK; - productReference = D6A48F491A8448BE008272B1 /* PromiseK.framework */; - productType = "com.apple.product-type.framework"; - }; - D6A48F531A8448BE008272B1 /* PromiseK-iOS Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6A48F621A8448BE008272B1 /* Build configuration list for PBXNativeTarget "PromiseK-iOS Tests" */; - buildPhases = ( - D6A48F501A8448BE008272B1 /* Sources */, - D6A48F511A8448BE008272B1 /* Frameworks */, - D6A48F521A8448BE008272B1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - D6A48F571A8448BE008272B1 /* PBXTargetDependency */, - ); - name = "PromiseK-iOS Tests"; - productName = PromiseKTests; - productReference = D6A48F541A8448BE008272B1 /* PromiseK-iOS Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - D6A48F6A1A84CBD3008272B1 /* PromiseKExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = D6A48F711A84CBD3008272B1 /* Build configuration list for PBXNativeTarget "PromiseKExample" */; - buildPhases = ( - D6A48F671A84CBD3008272B1 /* Sources */, - D6A48F681A84CBD3008272B1 /* Frameworks */, - D6A48F691A84CBD3008272B1 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PromiseKExample; - productName = PromiseKSamples; - productReference = D6A48F6B1A84CBD3008272B1 /* PromiseKExample */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D6A48F401A8448BE008272B1 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0710; - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = koherent.org; - TargetAttributes = { - D6553C3F1C08199700A85392 = { - CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0800; - }; - D6553C481C08199700A85392 = { - CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 0800; - }; - D6553C951C081E7500A85392 = { - CreatedOnToolsVersion = 7.1.1; - }; - D6553CA21C081E8400A85392 = { - CreatedOnToolsVersion = 7.1.1; - }; - D6553CAB1C081E8400A85392 = { - CreatedOnToolsVersion = 7.1.1; - }; - D6A48F481A8448BE008272B1 = { - CreatedOnToolsVersion = 6.1.1; - }; - D6A48F531A8448BE008272B1 = { - CreatedOnToolsVersion = 6.1.1; - }; - D6A48F6A1A84CBD3008272B1 = { - CreatedOnToolsVersion = 6.1.1; - }; - }; - }; - buildConfigurationList = D6A48F431A8448BE008272B1 /* Build configuration list for PBXProject "PromiseK" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = D6A48F3F1A8448BE008272B1; - productRefGroup = D6A48F4A1A8448BE008272B1 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D6A48F481A8448BE008272B1 /* PromiseK-iOS */, - D6553C3F1C08199700A85392 /* PromiseK-Mac */, - D6553CA21C081E8400A85392 /* PromiseK-tvOS */, - D6553C951C081E7500A85392 /* PromiseK-watchOS */, - D6A48F531A8448BE008272B1 /* PromiseK-iOS Tests */, - D6553C481C08199700A85392 /* PromiseK-Mac Tests */, - D6553CAB1C081E8400A85392 /* PromiseK-tvOS Tests */, - D6A48F6A1A84CBD3008272B1 /* PromiseKExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - D6553C3E1C08199700A85392 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C471C08199700A85392 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C941C081E7500A85392 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553CA11C081E8400A85392 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553CAA1C081E8400A85392 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F471A8448BE008272B1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F521A8448BE008272B1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - D6553C3B1C08199700A85392 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553C581C0819D100A85392 /* Promise.swift in Sources */, - D6553C591C081AB300A85392 /* Operators.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C451C08199700A85392 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553C5A1C081D2500A85392 /* PromiseKTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C911C081E7500A85392 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553CBE1C081EC800A85392 /* Promise.swift in Sources */, - D6553CBF1C081EC800A85392 /* Operators.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553C9E1C081E8400A85392 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553CBB1C081EC700A85392 /* Promise.swift in Sources */, - D6553CBC1C081EC700A85392 /* Operators.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6553CA81C081E8400A85392 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6553CC01C081ECE00A85392 /* PromiseKTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F441A8448BE008272B1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6C80F1B1ABBE67B00F4FE3B /* Promise.swift in Sources */, - D6948BA61B7CA97400CDD8FE /* Operators.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F501A8448BE008272B1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6C80F221ABBE8C700F4FE3B /* PromiseKTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - D6A48F671A84CBD3008272B1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D6C80F201ABBE68700F4FE3B /* main.swift in Sources */, - D65818331BB4E32900EF4530 /* Promise.swift in Sources */, - D65818341BB4E32900EF4530 /* Operators.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - D6553C4C1C08199700A85392 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D6553C3F1C08199700A85392 /* PromiseK-Mac */; - targetProxy = D6553C4B1C08199700A85392 /* PBXContainerItemProxy */; - }; - D6553CAF1C081E8400A85392 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D6553CA21C081E8400A85392 /* PromiseK-tvOS */; - targetProxy = D6553CAE1C081E8400A85392 /* PBXContainerItemProxy */; - }; - D6A48F571A8448BE008272B1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D6A48F481A8448BE008272B1 /* PromiseK-iOS */; - targetProxy = D6A48F561A8448BE008272B1 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - D6553C511C08199700A85392 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Source/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; - PRODUCT_NAME = PromiseK; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - D6553C521C08199700A85392 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_VERSION = A; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Source/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; - PRODUCT_NAME = PromiseK; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - D6553C531C08199700A85392 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - COMBINE_HIDPI_IMAGES = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseKTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - D6553C541C08199700A85392 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseKTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - D6553C9B1C081E7500A85392 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Source/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; - PRODUCT_NAME = PromiseK; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Debug; - }; - D6553C9C1C081E7500A85392 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Source/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; - PRODUCT_NAME = PromiseK; - SDKROOT = watchos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 2.0; - }; - name = Release; - }; - D6553CB51C081E8400A85392 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Source/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; - PRODUCT_NAME = PromiseK; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; - }; - name = Debug; - }; - D6553CB61C081E8400A85392 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Source/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.koherent.PromiseK; - PRODUCT_NAME = PromiseK; - SDKROOT = appletvos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; - }; - name = Release; - }; - D6553CB81C081E8400A85392 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.koherent.PromiseK-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TVOS_DEPLOYMENT_TARGET = 9.0; - }; - name = Debug; - }; - D6553CB91C081E8400A85392 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.koherent.PromiseK-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TVOS_DEPLOYMENT_TARGET = 9.0; - }; - name = Release; - }; - D6A48F5D1A8448BE008272B1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - 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; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - D6A48F5E1A8448BE008272B1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 1; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - 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; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - D6A48F601A8448BE008272B1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Source/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.koherent.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = PromiseK; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - D6A48F611A8448BE008272B1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Source/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.koherent.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = PromiseK; - SKIP_INSTALL = YES; - }; - name = Release; - }; - D6A48F631A8448BE008272B1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.koherent.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - D6A48F641A8448BE008272B1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.koherent.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - D6A48F6F1A84CBD3008272B1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Mac Developer"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Debug; - }; - D6A48F701A84CBD3008272B1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Mac Developer"; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - D6553C551C08199700A85392 /* Build configuration list for PBXNativeTarget "PromiseK-Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6553C511C08199700A85392 /* Debug */, - D6553C521C08199700A85392 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D6553C561C08199700A85392 /* Build configuration list for PBXNativeTarget "PromiseK-Mac Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6553C531C08199700A85392 /* Debug */, - D6553C541C08199700A85392 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D6553C9D1C081E7500A85392 /* Build configuration list for PBXNativeTarget "PromiseK-watchOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6553C9B1C081E7500A85392 /* Debug */, - D6553C9C1C081E7500A85392 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D6553CB41C081E8400A85392 /* Build configuration list for PBXNativeTarget "PromiseK-tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6553CB51C081E8400A85392 /* Debug */, - D6553CB61C081E8400A85392 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D6553CB71C081E8400A85392 /* Build configuration list for PBXNativeTarget "PromiseK-tvOS Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6553CB81C081E8400A85392 /* Debug */, - D6553CB91C081E8400A85392 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D6A48F431A8448BE008272B1 /* Build configuration list for PBXProject "PromiseK" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6A48F5D1A8448BE008272B1 /* Debug */, - D6A48F5E1A8448BE008272B1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D6A48F5F1A8448BE008272B1 /* Build configuration list for PBXNativeTarget "PromiseK-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6A48F601A8448BE008272B1 /* Debug */, - D6A48F611A8448BE008272B1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D6A48F621A8448BE008272B1 /* Build configuration list for PBXNativeTarget "PromiseK-iOS Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6A48F631A8448BE008272B1 /* Debug */, - D6A48F641A8448BE008272B1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D6A48F711A84CBD3008272B1 /* Build configuration list for PBXNativeTarget "PromiseKExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D6A48F6F1A84CBD3008272B1 /* Debug */, - D6A48F701A84CBD3008272B1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D6A48F401A8448BE008272B1 /* Project object */; + archiveVersion = 1; + classes = {}; + objectVersion = 46; + rootObject = __RootObject_; + objects = { + __RootObject_ = { + isa = PBXProject; + attributes = {LastUpgradeCheck = 9999;}; + buildConfigurationList = ___RootConfs_; + compatibilityVersion = 'Xcode 3.2'; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = (en); + mainGroup = ___RootGroup_; + productRefGroup = ____Products_; + projectDirPath = ''; + projectRoot = ''; + targets = (______Target_PromiseK, ______Target_PromiseKTests); + }; + '__PBXFileRef_Package.swift' = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.swift; + path = 'Package.swift'; + sourceTree = ''; + }; + ___RootGroup_ = { + isa = PBXGroup; + children = ('__PBXFileRef_Package.swift', _____Configs_, _____Sources_, Dependencies_, _______Tests_, ____Products_); + sourceTree = ''; + }; + _______Group_PromiseK = { + isa = PBXGroup; + name = 'PromiseK'; + path = 'Sources'; + sourceTree = ''; + children = ('__PBXFileRef_Sources/Operators.swift', '__PBXFileRef_Sources/Promise.swift'); + }; + '__PBXFileRef_Sources/Operators.swift' = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.swift; + path = 'Operators.swift'; + sourceTree = ''; + }; + '__PBXFileRef_Sources/Promise.swift' = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.swift; + path = 'Promise.swift'; + sourceTree = ''; + }; + ______Target_PromiseK = { + isa = PBXNativeTarget; + buildConfigurationList = _______Confs_PromiseK; + buildPhases = (CompilePhase_PromiseK, ___LinkPhase_PromiseK); + buildRules = (); + dependencies = (); + name = 'PromiseK'; + productName = PromiseK; + productReference = _____Product_PromiseK; + productType = 'com.apple.product-type.framework'; + }; + _____Product_PromiseK = { + isa = PBXFileReference; + explicitFileType = 'wrapper.framework'; + path = 'PromiseK.framework'; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CompilePhase_PromiseK = { + isa = PBXSourcesBuildPhase; + files = ('__src_cc_ref_Sources/Operators.swift', '__src_cc_ref_Sources/Promise.swift'); + runOnlyForDeploymentPostprocessing = 0; + }; + '__src_cc_ref_Sources/Operators.swift' = { + isa = PBXBuildFile; + fileRef = '__PBXFileRef_Sources/Operators.swift'; + }; + '__src_cc_ref_Sources/Promise.swift' = { + isa = PBXBuildFile; + fileRef = '__PBXFileRef_Sources/Promise.swift'; + }; + ___LinkPhase_PromiseK = { + isa = PBXFrameworksBuildPhase; + files = (); + runOnlyForDeploymentPostprocessing = 0; + }; + _______Confs_PromiseK = { + isa = XCConfigurationList; + buildConfigurations = (___DebugConf_PromiseK, _ReleaseConf_PromiseK); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + ___DebugConf_PromiseK = { + isa = XCBuildConfiguration; + buildSettings = { SWIFT_VERSION = '3.0'; LD_RUNPATH_SEARCH_PATHS = '$(TOOLCHAIN_DIR)/usr/lib/swift/macosx'; PRODUCT_MODULE_NAME = '$(TARGET_NAME:c99extidentifier)'; ENABLE_TESTABILITY = 'YES'; OTHER_SWIFT_FLAGS = '$(inherited)'; INFOPLIST_FILE = 'PromiseK.xcodeproj/PromiseK_Info.plist'; FRAMEWORK_SEARCH_PATHS = '$(PLATFORM_DIR)/Developer/Library/Frameworks'; SWIFT_OPTIMIZATION_LEVEL = '-Onone'; PRODUCT_BUNDLE_IDENTIFIER = 'PromiseK'; PRODUCT_NAME = '$(TARGET_NAME:c99extidentifier)'; OTHER_LDFLAGS = '$(inherited)'; }; + name = Debug; + }; + _ReleaseConf_PromiseK = { + isa = XCBuildConfiguration; + buildSettings = { SWIFT_VERSION = '3.0'; LD_RUNPATH_SEARCH_PATHS = '$(TOOLCHAIN_DIR)/usr/lib/swift/macosx'; PRODUCT_MODULE_NAME = '$(TARGET_NAME:c99extidentifier)'; ENABLE_TESTABILITY = 'YES'; OTHER_SWIFT_FLAGS = '$(inherited)'; INFOPLIST_FILE = 'PromiseK.xcodeproj/PromiseK_Info.plist'; FRAMEWORK_SEARCH_PATHS = '$(PLATFORM_DIR)/Developer/Library/Frameworks'; PRODUCT_BUNDLE_IDENTIFIER = 'PromiseK'; PRODUCT_NAME = '$(TARGET_NAME:c99extidentifier)'; OTHER_LDFLAGS = '$(inherited)'; }; + name = Release; + }; + __Dependency_PromiseK = { + isa = PBXTargetDependency; + target = ______Target_PromiseK; + }; + _______Group_PromiseKTests = { + isa = PBXGroup; + name = 'PromiseKTests'; + path = 'Tests/PromiseKTests'; + sourceTree = ''; + children = ('__PBXFileRef_Tests/PromiseKTests/PromiseKTests.swift'); + }; + '__PBXFileRef_Tests/PromiseKTests/PromiseKTests.swift' = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.swift; + path = 'PromiseKTests.swift'; + sourceTree = ''; + }; + ______Target_PromiseKTests = { + isa = PBXNativeTarget; + buildConfigurationList = _______Confs_PromiseKTests; + buildPhases = (CompilePhase_PromiseKTests, ___LinkPhase_PromiseKTests); + buildRules = (); + dependencies = (__Dependency_PromiseK); + name = 'PromiseKTests'; + productName = PromiseKTests; + productReference = _____Product_PromiseKTests; + productType = 'com.apple.product-type.bundle.unit-test'; + }; + _____Product_PromiseKTests = { + isa = PBXFileReference; + explicitFileType = 'compiled.mach-o.wrapper.cfbundle'; + path = 'PromiseKTests.xctest'; + sourceTree = BUILT_PRODUCTS_DIR; + }; + CompilePhase_PromiseKTests = { + isa = PBXSourcesBuildPhase; + files = ('__src_cc_ref_Tests/PromiseKTests/PromiseKTests.swift'); + runOnlyForDeploymentPostprocessing = 0; + }; + '__src_cc_ref_Tests/PromiseKTests/PromiseKTests.swift' = { + isa = PBXBuildFile; + fileRef = '__PBXFileRef_Tests/PromiseKTests/PromiseKTests.swift'; + }; + ___LinkPhase_PromiseKTests = { + isa = PBXFrameworksBuildPhase; + files = (_LinkFileRef_PromiseK_via_PromiseKTests); + runOnlyForDeploymentPostprocessing = 0; + }; + _LinkFileRef_PromiseK_via_PromiseKTests = { + isa = PBXBuildFile; + fileRef = _____Product_PromiseK; + }; + _______Confs_PromiseKTests = { + isa = XCConfigurationList; + buildConfigurations = (___DebugConf_PromiseKTests, _ReleaseConf_PromiseKTests); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + ___DebugConf_PromiseKTests = { + isa = XCBuildConfiguration; + buildSettings = { LD_RUNPATH_SEARCH_PATHS = '@loader_path/../Frameworks'; FRAMEWORK_SEARCH_PATHS = '$(PLATFORM_DIR)/Developer/Library/Frameworks'; OTHER_SWIFT_FLAGS = '$(inherited)'; INFOPLIST_FILE = 'PromiseK.xcodeproj/PromiseKTests_Info.plist'; SWIFT_OPTIMIZATION_LEVEL = '-Onone'; EMBEDDED_CONTENT_CONTAINS_SWIFT = 'YES'; OTHER_LDFLAGS = '$(inherited)'; SWIFT_VERSION = '3.0'; }; + name = Debug; + }; + _ReleaseConf_PromiseKTests = { + isa = XCBuildConfiguration; + buildSettings = { LD_RUNPATH_SEARCH_PATHS = '@loader_path/../Frameworks'; FRAMEWORK_SEARCH_PATHS = '$(PLATFORM_DIR)/Developer/Library/Frameworks'; OTHER_SWIFT_FLAGS = '$(inherited)'; INFOPLIST_FILE = 'PromiseK.xcodeproj/PromiseKTests_Info.plist'; EMBEDDED_CONTENT_CONTAINS_SWIFT = 'YES'; OTHER_LDFLAGS = '$(inherited)'; SWIFT_VERSION = '3.0'; }; + name = Release; + }; + __Dependency_PromiseKTests = { + isa = PBXTargetDependency; + target = ______Target_PromiseKTests; + }; + '__PBXFileRef_PromiseK.xcodeproj/Configs/Project.xcconfig' = { + isa = PBXFileReference; + lastKnownFileType = text.xcconfig; + path = 'PromiseK.xcodeproj/Configs/Project.xcconfig'; + sourceTree = ''; + }; + _____Configs_ = { + isa = PBXGroup; + children = ('__PBXFileRef_PromiseK.xcodeproj/Configs/Project.xcconfig'); + name = Configs; + sourceTree = ''; + }; + _____Sources_ = { + isa = PBXGroup; + children = (_______Group_PromiseK); + name = Sources; + sourceTree = ''; + }; + _______Tests_ = { + isa = PBXGroup; + children = (_______Group_PromiseKTests); + name = Tests; + sourceTree = ''; + }; + TestProducts_ = { + isa = PBXGroup; + children = (_____Product_PromiseKTests); + name = Tests; + sourceTree = ''; + }; + ____Products_ = { + isa = PBXGroup; + children = (TestProducts_, _____Product_PromiseK); + name = Products; + sourceTree = ''; + }; + _______Debug_ = { + isa = XCBuildConfiguration; + baseConfigurationReference = '__PBXFileRef_PromiseK.xcodeproj/Configs/Project.xcconfig'; + buildSettings = {}; + name = Debug; + }; + _____Release_ = { + isa = XCBuildConfiguration; + baseConfigurationReference = '__PBXFileRef_PromiseK.xcodeproj/Configs/Project.xcconfig'; + buildSettings = {}; + name = Release; + }; + ___RootConfs_ = { + isa = XCConfigurationList; + buildConfigurations = (_______Debug_, _____Release_); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + }; } diff --git a/PromiseK.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/PromiseK.xcodeproj/project.xcworkspace/contents.xcworkspacedata index b865388..919434a 100644 --- a/PromiseK.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/PromiseK.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/PromiseK.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/PromiseK.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 54782e3..0000000 --- a/PromiseK.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-Mac.xcscheme b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-Mac.xcscheme deleted file mode 100644 index 28e801c..0000000 --- a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-Mac.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-iOS.xcscheme b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-iOS.xcscheme deleted file mode 100644 index 26572d5..0000000 --- a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-iOS.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-tvOS.xcscheme b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-tvOS.xcscheme deleted file mode 100644 index 96b4396..0000000 --- a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-tvOS.xcscheme +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-watchOS.xcscheme b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK.xcscheme similarity index 77% rename from PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-watchOS.xcscheme rename to PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK.xcscheme index 7d57ecc..6a3f3af 100644 --- a/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK-watchOS.xcscheme +++ b/PromiseK.xcodeproj/xcshareddata/xcschemes/PromiseK.xcscheme @@ -1,6 +1,6 @@ @@ -28,6 +28,16 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + @@ -45,9 +55,9 @@ @@ -60,15 +70,6 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - - - - diff --git a/PromiseK.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist b/PromiseK.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..55b2377 --- /dev/null +++ b/PromiseK.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist @@ -0,0 +1,12 @@ + + + + SchemeUserState + + PromiseK.xcscheme + + + SuppressBuildableAutocreation + + + diff --git a/Source/Info.plist b/Source/Info.plist deleted file mode 100644 index dd01cf0..0000000 --- a/Source/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 2.1 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Source/Operators.swift b/Sources/Operators.swift similarity index 100% rename from Source/Operators.swift rename to Sources/Operators.swift diff --git a/Source/Promise.swift b/Sources/Promise.swift similarity index 100% rename from Source/Promise.swift rename to Sources/Promise.swift diff --git a/Source/PromiseK.h b/Sources/PromiseK.h similarity index 100% rename from Source/PromiseK.h rename to Sources/PromiseK.h diff --git a/Tests/Info.plist b/Tests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/Tests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..7250b83 --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,6 @@ +import XCTest +@testable import PromisureTests + +XCTMain([ + testCase(PromisureTests.allTests), +]) diff --git a/Tests/PromiseKTests.swift b/Tests/PromiseKTests/PromiseKTests.swift similarity index 81% rename from Tests/PromiseKTests.swift rename to Tests/PromiseKTests/PromiseKTests.swift index 1e7d914..ea520fb 100644 --- a/Tests/PromiseKTests.swift +++ b/Tests/PromiseKTests/PromiseKTests.swift @@ -260,20 +260,67 @@ class PromiseKTests: XCTestCase { waitForExpectations(timeout: 3.0, handler: nil) } } + + func testSample() { + // `flatMap` is equivalent to `then` of JavaScript's `Promise` + let a: Promise = asyncGet(2).flatMap { asyncGet($0) }.flatMap { asyncGet($0) } + let b: Promise = asyncGet(3).map { $0 * $0 } + let sum: Promise = a.flatMap { a0 in b.flatMap{ b0 in Promise(a0 + b0) } } + + // uses `Optional` for error handling + let mightFail: Promise = asyncFailable(5).flatMap { Promise($0.map { $0 * $0 }) } + let howToCatch: Promise = asyncFailable(7).flatMap { Promise($0 ?? 0) } + + // `>>-` operator is equivalent to `>>=` in Haskell + // can use `>>-` instead of `flatMap` + let a2: Promise = asyncGet(2) >>- { asyncGet($0) } >>- { asyncGet($0) } + // a failable operation chain with `>>-` + let failableChain: Promise = asyncFailable(11) >>- { $0.map { asyncFailable($0) } } + // also `>>-?` operator is available + let failableChain2: Promise = asyncFailable(11) >>-? { asyncFailable($0) } + + sum.wait() + print(a) + print(b) + print(sum) + + mightFail.wait() + print(mightFail) + + howToCatch.wait() + print(howToCatch) + + a2.wait() + print(a2) + + failableChain.wait() + print(failableChain) + + failableChain2.wait() + print(failableChain2) + } } -func asyncGet(_ value: Int) -> Promise { - return Promise { resolve in - DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(0.1 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)) { +func async(_ value: T) -> Promise { + return Promise { resolve in + DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { resolve(Promise(value)) } } } +func asyncGet(_ value: Int) -> Promise { + return async(value) +} + func asyncGetOrFail(_ value: Int, _ fails: Bool) -> Promise { return fails ? Promise(nil) : asyncGet(value).map { $0 } } +func asyncFailable(_ value: Int) -> Promise { + return async(value).map { arc4random() % 2 == 0 ? $0 : nil } +} + func foo(_ a: Int, _ b: Int) -> (Int, Int) { return (a, b) } @@ -281,3 +328,16 @@ func foo(_ a: Int, _ b: Int) -> (Int, Int) { func curry(_ f: @escaping (A, B) -> Z) -> (A) -> (B) -> Z { return { a in { b in f(a, b) } } } + +extension Promise { + func wait() { + var finished = false + _ = self.flatMap { (value: T) -> Promise<()> in + finished = true + return Promise<()>() + } + while (!finished){ + RunLoop.current.run(until: Date(timeIntervalSinceNow: 0.1)) + } + } +}