From 1229115841664a95e4843365664822ec50ca6481 Mon Sep 17 00:00:00 2001 From: Alasdair Law Date: Wed, 18 Jan 2017 22:53:00 +0000 Subject: [PATCH] Add macOS target --- NetworkOperation.xcodeproj/project.pbxproj | 336 +++++++++++++++++- .../xcschemes/xcschememanagement.plist | 25 ++ NetworkOperation/JSONResponse.swift | 2 + NetworkOperation/NetworkOperation.swift | 2 + NetworkOperation/NetworkResponse.swift | 2 + NetworkOperationMacOS/Info.plist | 26 ++ NetworkOperationMacOS/NetworkOperationMacOS.h | 19 + NetworkOperationMacOSTests/Info.plist | 22 ++ 8 files changed, 418 insertions(+), 16 deletions(-) create mode 100644 NetworkOperationMacOS/Info.plist create mode 100644 NetworkOperationMacOS/NetworkOperationMacOS.h create mode 100644 NetworkOperationMacOSTests/Info.plist diff --git a/NetworkOperation.xcodeproj/project.pbxproj b/NetworkOperation.xcodeproj/project.pbxproj index 84ee333..8a412f4 100644 --- a/NetworkOperation.xcodeproj/project.pbxproj +++ b/NetworkOperation.xcodeproj/project.pbxproj @@ -11,6 +11,14 @@ 816D2CFD1E07572500300E28 /* NetworkResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816D2CFC1E07572500300E28 /* NetworkResponse.swift */; }; 816D2CFF1E07573000300E28 /* JSONResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816D2CFE1E07573000300E28 /* JSONResponse.swift */; }; 816D2D011E0760B100300E28 /* MockSessionDataTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816D2D001E0760B100300E28 /* MockSessionDataTask.swift */; }; + 81739F2D1E3025970044DB83 /* NetworkOperation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81739F241E3025970044DB83 /* NetworkOperation.framework */; }; + 81739F341E3025970044DB83 /* NetworkOperationMacOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 81739F261E3025970044DB83 /* NetworkOperationMacOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 81739F3B1E3025A70044DB83 /* NetworkOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818A206F1E05EF5F00B835F6 /* NetworkOperation.swift */; }; + 81739F3C1E3025A70044DB83 /* NetworkResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816D2CFC1E07572500300E28 /* NetworkResponse.swift */; }; + 81739F3D1E3025A70044DB83 /* JSONResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816D2CFE1E07573000300E28 /* JSONResponse.swift */; }; + 81739F3E1E3025AE0044DB83 /* NetworkOperationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818A20631E05EECF00B835F6 /* NetworkOperationTests.swift */; }; + 81739F3F1E3025AE0044DB83 /* MockURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816D2CF81E07309200300E28 /* MockURLSession.swift */; }; + 81739F401E3025AE0044DB83 /* MockSessionDataTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 816D2D001E0760B100300E28 /* MockSessionDataTask.swift */; }; 818A205F1E05EECF00B835F6 /* NetworkOperation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 818A20551E05EECF00B835F6 /* NetworkOperation.framework */; }; 818A20641E05EECF00B835F6 /* NetworkOperationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818A20631E05EECF00B835F6 /* NetworkOperationTests.swift */; }; 818A20661E05EECF00B835F6 /* NetworkOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 818A20581E05EECF00B835F6 /* NetworkOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -18,6 +26,13 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 81739F2E1E3025970044DB83 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 818A204C1E05EECF00B835F6 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 81739F231E3025970044DB83; + remoteInfo = NetworkOperationMacOS; + }; 818A20601E05EECF00B835F6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 818A204C1E05EECF00B835F6 /* Project object */; @@ -29,19 +44,39 @@ /* Begin PBXFileReference section */ 816D2CF81E07309200300E28 /* MockURLSession.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockURLSession.swift; sourceTree = ""; }; - 816D2CFC1E07572500300E28 /* NetworkResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkResponse.swift; sourceTree = ""; }; - 816D2CFE1E07573000300E28 /* JSONResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSONResponse.swift; sourceTree = ""; }; + 816D2CFC1E07572500300E28 /* NetworkResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NetworkResponse.swift; path = NetworkOperation/NetworkResponse.swift; sourceTree = ""; }; + 816D2CFE1E07573000300E28 /* JSONResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JSONResponse.swift; path = NetworkOperation/JSONResponse.swift; sourceTree = ""; }; 816D2D001E0760B100300E28 /* MockSessionDataTask.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockSessionDataTask.swift; sourceTree = ""; }; + 81739F241E3025970044DB83 /* NetworkOperation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NetworkOperation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 81739F261E3025970044DB83 /* NetworkOperationMacOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkOperationMacOS.h; sourceTree = ""; }; + 81739F271E3025970044DB83 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 81739F2C1E3025970044DB83 /* NetworkOperationMacOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NetworkOperationMacOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 81739F331E3025970044DB83 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 818A20551E05EECF00B835F6 /* NetworkOperation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NetworkOperation.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 818A20581E05EECF00B835F6 /* NetworkOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkOperation.h; sourceTree = ""; }; 818A20591E05EECF00B835F6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 818A205E1E05EECF00B835F6 /* NetworkOperationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NetworkOperationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 818A20631E05EECF00B835F6 /* NetworkOperationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkOperationTests.swift; sourceTree = ""; }; + 818A20631E05EECF00B835F6 /* NetworkOperationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = NetworkOperationTests.swift; path = NetworkOperationTests/NetworkOperationTests.swift; sourceTree = SOURCE_ROOT; }; 818A20651E05EECF00B835F6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 818A206F1E05EF5F00B835F6 /* NetworkOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkOperation.swift; sourceTree = ""; }; + 818A206F1E05EF5F00B835F6 /* NetworkOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NetworkOperation.swift; path = NetworkOperation/NetworkOperation.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 81739F201E3025970044DB83 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81739F291E3025970044DB83 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 81739F2D1E3025970044DB83 /* NetworkOperation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 818A20511E05EECF00B835F6 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -63,17 +98,91 @@ 816D2D021E0760DA00300E28 /* Mocking */ = { isa = PBXGroup; children = ( - 816D2CF81E07309200300E28 /* MockURLSession.swift */, 816D2D001E0760B100300E28 /* MockSessionDataTask.swift */, + 816D2CF81E07309200300E28 /* MockURLSession.swift */, ); name = Mocking; + path = NetworkOperationTests; + sourceTree = SOURCE_ROOT; + }; + 81739F251E3025970044DB83 /* NetworkOperationMacOS */ = { + isa = PBXGroup; + children = ( + 81739F261E3025970044DB83 /* NetworkOperationMacOS.h */, + 81739F271E3025970044DB83 /* Info.plist */, + ); + path = NetworkOperationMacOS; sourceTree = ""; }; - 818A204B1E05EECF00B835F6 = { + 81739F301E3025970044DB83 /* NetworkOperationMacOSTests */ = { + isa = PBXGroup; + children = ( + 81739F331E3025970044DB83 /* Info.plist */, + ); + path = NetworkOperationMacOSTests; + sourceTree = ""; + }; + 81739F411E30288C0044DB83 /* Tests */ = { + isa = PBXGroup; + children = ( + 816D2D021E0760DA00300E28 /* Mocking */, + 81739F461E30290A0044DB83 /* Unit Tests */, + ); + name = Tests; + path = NetworkOperation; + sourceTree = ""; + }; + 81739F421E3028A20044DB83 /* Shared */ = { + isa = PBXGroup; + children = ( + 81739F431E3028AA0044DB83 /* NetworkOperation */, + 81739F411E30288C0044DB83 /* Tests */, + ); + name = Shared; + sourceTree = ""; + }; + 81739F431E3028AA0044DB83 /* NetworkOperation */ = { + isa = PBXGroup; + children = ( + 818A206F1E05EF5F00B835F6 /* NetworkOperation.swift */, + 81739F471E30291A0044DB83 /* Response */, + ); + name = NetworkOperation; + sourceTree = ""; + }; + 81739F451E3028EB0044DB83 /* Targets */ = { isa = PBXGroup; children = ( 818A20571E05EECF00B835F6 /* NetworkOperation */, 818A20621E05EECF00B835F6 /* NetworkOperationTests */, + 81739F251E3025970044DB83 /* NetworkOperationMacOS */, + 81739F301E3025970044DB83 /* NetworkOperationMacOSTests */, + ); + name = Targets; + sourceTree = ""; + }; + 81739F461E30290A0044DB83 /* Unit Tests */ = { + isa = PBXGroup; + children = ( + 818A20631E05EECF00B835F6 /* NetworkOperationTests.swift */, + ); + name = "Unit Tests"; + sourceTree = ""; + }; + 81739F471E30291A0044DB83 /* Response */ = { + isa = PBXGroup; + children = ( + 816D2CFE1E07573000300E28 /* JSONResponse.swift */, + 816D2CFC1E07572500300E28 /* NetworkResponse.swift */, + ); + name = Response; + sourceTree = ""; + }; + 818A204B1E05EECF00B835F6 = { + isa = PBXGroup; + children = ( + 81739F421E3028A20044DB83 /* Shared */, + 81739F451E3028EB0044DB83 /* Targets */, 818A20561E05EECF00B835F6 /* Products */, ); sourceTree = ""; @@ -83,6 +192,8 @@ children = ( 818A20551E05EECF00B835F6 /* NetworkOperation.framework */, 818A205E1E05EECF00B835F6 /* NetworkOperationTests.xctest */, + 81739F241E3025970044DB83 /* NetworkOperation.framework */, + 81739F2C1E3025970044DB83 /* NetworkOperationMacOSTests.xctest */, ); name = Products; sourceTree = ""; @@ -92,9 +203,6 @@ children = ( 818A20581E05EECF00B835F6 /* NetworkOperation.h */, 818A20591E05EECF00B835F6 /* Info.plist */, - 818A206F1E05EF5F00B835F6 /* NetworkOperation.swift */, - 816D2CFC1E07572500300E28 /* NetworkResponse.swift */, - 816D2CFE1E07573000300E28 /* JSONResponse.swift */, ); path = NetworkOperation; sourceTree = ""; @@ -102,16 +210,22 @@ 818A20621E05EECF00B835F6 /* NetworkOperationTests */ = { isa = PBXGroup; children = ( - 818A20631E05EECF00B835F6 /* NetworkOperationTests.swift */, - 816D2D021E0760DA00300E28 /* Mocking */, 818A20651E05EECF00B835F6 /* Info.plist */, ); path = NetworkOperationTests; - sourceTree = ""; + sourceTree = SOURCE_ROOT; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 81739F211E3025970044DB83 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 81739F341E3025970044DB83 /* NetworkOperationMacOS.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 818A20521E05EECF00B835F6 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -123,6 +237,42 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 81739F231E3025970044DB83 /* NetworkOperationMacOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 81739F391E3025970044DB83 /* Build configuration list for PBXNativeTarget "NetworkOperationMacOS" */; + buildPhases = ( + 81739F1F1E3025970044DB83 /* Sources */, + 81739F201E3025970044DB83 /* Frameworks */, + 81739F211E3025970044DB83 /* Headers */, + 81739F221E3025970044DB83 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = NetworkOperationMacOS; + productName = NetworkOperationMacOS; + productReference = 81739F241E3025970044DB83 /* NetworkOperation.framework */; + productType = "com.apple.product-type.framework"; + }; + 81739F2B1E3025970044DB83 /* NetworkOperationMacOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 81739F3A1E3025970044DB83 /* Build configuration list for PBXNativeTarget "NetworkOperationMacOSTests" */; + buildPhases = ( + 81739F281E3025970044DB83 /* Sources */, + 81739F291E3025970044DB83 /* Frameworks */, + 81739F2A1E3025970044DB83 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 81739F2F1E3025970044DB83 /* PBXTargetDependency */, + ); + name = NetworkOperationMacOSTests; + productName = NetworkOperationMacOSTests; + productReference = 81739F2C1E3025970044DB83 /* NetworkOperationMacOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 818A20541E05EECF00B835F6 /* NetworkOperation */ = { isa = PBXNativeTarget; buildConfigurationList = 818A20691E05EECF00B835F6 /* Build configuration list for PBXNativeTarget "NetworkOperation" */; @@ -169,6 +319,14 @@ LastUpgradeCheck = 0820; ORGANIZATIONNAME = "Alasdair Law"; TargetAttributes = { + 81739F231E3025970044DB83 = { + CreatedOnToolsVersion = 8.2; + ProvisioningStyle = Manual; + }; + 81739F2B1E3025970044DB83 = { + CreatedOnToolsVersion = 8.2; + ProvisioningStyle = Automatic; + }; 818A20541E05EECF00B835F6 = { CreatedOnToolsVersion = 8.2; DevelopmentTeam = 59KHF7ER3M; @@ -177,8 +335,7 @@ }; 818A205D1E05EECF00B835F6 = { CreatedOnToolsVersion = 8.2; - DevelopmentTeam = 59KHF7ER3M; - ProvisioningStyle = Automatic; + ProvisioningStyle = Manual; }; }; }; @@ -196,11 +353,27 @@ targets = ( 818A20541E05EECF00B835F6 /* NetworkOperation */, 818A205D1E05EECF00B835F6 /* NetworkOperationTests */, + 81739F231E3025970044DB83 /* NetworkOperationMacOS */, + 81739F2B1E3025970044DB83 /* NetworkOperationMacOSTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 81739F221E3025970044DB83 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81739F2A1E3025970044DB83 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 818A20531E05EECF00B835F6 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -218,6 +391,26 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 81739F1F1E3025970044DB83 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81739F3D1E3025A70044DB83 /* JSONResponse.swift in Sources */, + 81739F3B1E3025A70044DB83 /* NetworkOperation.swift in Sources */, + 81739F3C1E3025A70044DB83 /* NetworkResponse.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 81739F281E3025970044DB83 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 81739F3F1E3025AE0044DB83 /* MockURLSession.swift in Sources */, + 81739F3E1E3025AE0044DB83 /* NetworkOperationTests.swift in Sources */, + 81739F401E3025AE0044DB83 /* MockSessionDataTask.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 818A20501E05EECF00B835F6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -241,6 +434,11 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 81739F2F1E3025970044DB83 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 81739F231E3025970044DB83 /* NetworkOperationMacOS */; + targetProxy = 81739F2E1E3025970044DB83 /* PBXContainerItemProxy */; + }; 818A20611E05EECF00B835F6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 818A20541E05EECF00B835F6 /* NetworkOperation */; @@ -249,6 +447,90 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 81739F351E3025970044DB83 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = NetworkOperationMacOS/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = com.alasdairlaw.NetworkOperationMacOS; + PRODUCT_MODULE_NAME = NetworkOperation; + PRODUCT_NAME = NetworkOperation; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + 81739F361E3025970044DB83 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = NO; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = NetworkOperationMacOS/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = com.alasdairlaw.NetworkOperationMacOS; + PRODUCT_MODULE_NAME = NetworkOperation; + PRODUCT_NAME = NetworkOperation; + SDKROOT = macosx; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; + 81739F371E3025970044DB83 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = NetworkOperationMacOSTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = com.alasdairlaw.NetworkOperationMacOSTests; + PRODUCT_MODULE_NAME = NetworkOperationMacOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + 81739F381E3025970044DB83 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = NetworkOperationMacOSTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = com.alasdairlaw.NetworkOperationMacOSTests; + PRODUCT_MODULE_NAME = NetworkOperationMacOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; 818A20671E05EECF00B835F6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -274,6 +556,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -293,6 +576,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 10.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + PRODUCT_MODULE_NAME = NetworkOperation; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -327,6 +611,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -339,6 +624,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.2; MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_MODULE_NAME = NetworkOperation; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -393,10 +679,11 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - DEVELOPMENT_TEAM = 59KHF7ER3M; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = NetworkOperationTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.alasdairlaw.NetworkOperationTests; + PRODUCT_MODULE_NAME = NetworkOperationTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; }; @@ -406,10 +693,11 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - DEVELOPMENT_TEAM = 59KHF7ER3M; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = NetworkOperationTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.alasdairlaw.NetworkOperationTests; + PRODUCT_MODULE_NAME = NetworkOperationTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 3.0; }; @@ -418,6 +706,22 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 81739F391E3025970044DB83 /* Build configuration list for PBXNativeTarget "NetworkOperationMacOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 81739F351E3025970044DB83 /* Debug */, + 81739F361E3025970044DB83 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 81739F3A1E3025970044DB83 /* Build configuration list for PBXNativeTarget "NetworkOperationMacOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 81739F371E3025970044DB83 /* Debug */, + 81739F381E3025970044DB83 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; 818A204F1E05EECF00B835F6 /* Build configuration list for PBXProject "NetworkOperation" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/NetworkOperation.xcodeproj/xcuserdata/alasdairlaw.xcuserdatad/xcschemes/xcschememanagement.plist b/NetworkOperation.xcodeproj/xcuserdata/alasdairlaw.xcuserdatad/xcschemes/xcschememanagement.plist index 21b9b7a..cb91593 100644 --- a/NetworkOperation.xcodeproj/xcuserdata/alasdairlaw.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/NetworkOperation.xcodeproj/xcuserdata/alasdairlaw.xcuserdatad/xcschemes/xcschememanagement.plist @@ -9,9 +9,34 @@ orderHint 0 + NetworkOperationMacOS.xcscheme + + orderHint + 2 + + NetworkOperationMacOSTests.xcscheme + + orderHint + 3 + + NetworkOperationTests.xcscheme + + orderHint + 1 + SuppressBuildableAutocreation + 81739F231E3025970044DB83 + + primary + + + 81739F2B1E3025970044DB83 + + primary + + 818A20541E05EECF00B835F6 primary diff --git a/NetworkOperation/JSONResponse.swift b/NetworkOperation/JSONResponse.swift index 217837d..b4f2072 100644 --- a/NetworkOperation/JSONResponse.swift +++ b/NetworkOperation/JSONResponse.swift @@ -6,6 +6,8 @@ // Copyright © 2016 Alasdair Law. All rights reserved. // +import Foundation + public struct JSONResponse: NetworkResponse { public typealias T = Any diff --git a/NetworkOperation/NetworkOperation.swift b/NetworkOperation/NetworkOperation.swift index b7903b8..315a5db 100644 --- a/NetworkOperation/NetworkOperation.swift +++ b/NetworkOperation/NetworkOperation.swift @@ -6,6 +6,8 @@ // Copyright © 2016 Alasdair Law. All rights reserved. // +import Foundation + /** NSOperation subclass which performs a network request. */ diff --git a/NetworkOperation/NetworkResponse.swift b/NetworkOperation/NetworkResponse.swift index e0a2dc9..d0f7ea3 100644 --- a/NetworkOperation/NetworkResponse.swift +++ b/NetworkOperation/NetworkResponse.swift @@ -6,6 +6,8 @@ // Copyright © 2016 Alasdair Law. All rights reserved. // +import Foundation + public protocol NetworkResponse { associatedtype T diff --git a/NetworkOperationMacOS/Info.plist b/NetworkOperationMacOS/Info.plist new file mode 100644 index 0000000..fef69f1 --- /dev/null +++ b/NetworkOperationMacOS/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2017 Alasdair Law. All rights reserved. + NSPrincipalClass + + + diff --git a/NetworkOperationMacOS/NetworkOperationMacOS.h b/NetworkOperationMacOS/NetworkOperationMacOS.h new file mode 100644 index 0000000..fb646c9 --- /dev/null +++ b/NetworkOperationMacOS/NetworkOperationMacOS.h @@ -0,0 +1,19 @@ +// +// NetworkOperationMacOS.h +// NetworkOperationMacOS +// +// Created by Alasdair Law on 18/01/2017. +// Copyright © 2017 Alasdair Law. All rights reserved. +// + +#import + +//! Project version number for NetworkOperationMacOS. +FOUNDATION_EXPORT double NetworkOperationMacOSVersionNumber; + +//! Project version string for NetworkOperationMacOS. +FOUNDATION_EXPORT const unsigned char NetworkOperationMacOSVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/NetworkOperationMacOSTests/Info.plist b/NetworkOperationMacOSTests/Info.plist new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ b/NetworkOperationMacOSTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + +