diff --git a/AwesomeCache/AwesomeCacheOSX.h b/AwesomeCache/AwesomeCacheOSX.h new file mode 100644 index 0000000..95f878d --- /dev/null +++ b/AwesomeCache/AwesomeCacheOSX.h @@ -0,0 +1,24 @@ +// +// AwesomeCacheOSX.h +// AwesomeCache +// +// Created by 北䑓 如法 on 16/2/19. +// Copyright © 2016年 Alexander Schuch. All rights reserved. + +#ifndef AwesomeCacheOSX_h +#define AwesomeCacheOSX_h + + +#endif /* AwesomeCacheOSX_h */ + +#import + +//! Project version number for AwesomeCache. +FOUNDATION_EXPORT double AwesomeCacheVersionNumber; + +//! Project version string for AwesomeCache. +FOUNDATION_EXPORT const unsigned char AwesomeCacheVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/AwesomeCacheTests/AwesomeCacheTests.swift b/AwesomeCacheTests/AwesomeCacheTests.swift index dc9bc9d..7b93291 100644 --- a/AwesomeCacheTests/AwesomeCacheTests.swift +++ b/AwesomeCacheTests/AwesomeCacheTests.swift @@ -6,7 +6,11 @@ // Copyright (c) 2015 Alexander Schuch. All rights reserved. // +#if os(iOS) import UIKit +#elseif os(OSX) +import Cocoa +#endif import XCTest @testable import AwesomeCache diff --git a/Example.xcodeproj/project.pbxproj b/Example.xcodeproj/project.pbxproj index 6c38dbe..8b0f136 100644 --- a/Example.xcodeproj/project.pbxproj +++ b/Example.xcodeproj/project.pbxproj @@ -19,6 +19,11 @@ 4DC91FB01A7C54B200C81E10 /* AwesomeCache.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4DC91F981A7C54B200C81E10 /* AwesomeCache.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4DC91FBA1A7C552900C81E10 /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DC91FB81A7C552900C81E10 /* Cache.swift */; }; 4DC91FBB1A7C552900C81E10 /* CacheObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DC91FB91A7C552900C81E10 /* CacheObject.swift */; }; + 554E42381C7748C700958E84 /* AwesomeCache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 554E422E1C7748C700958E84 /* AwesomeCache.framework */; }; + 554E42451C7758C700958E84 /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DC91FB81A7C552900C81E10 /* Cache.swift */; }; + 554E42461C7758C700958E84 /* CacheObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DC91FB91A7C552900C81E10 /* CacheObject.swift */; }; + 554E42491C775DD100958E84 /* AwesomeCacheOSX.h in Headers */ = {isa = PBXBuildFile; fileRef = 554E42481C775DD100958E84 /* AwesomeCacheOSX.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 554E424A1C77630200958E84 /* AwesomeCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DC91FAB1A7C54B200C81E10 /* AwesomeCacheTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -43,6 +48,13 @@ remoteGlobalIDString = 4DC91F971A7C54B200C81E10; remoteInfo = AwesomeCache; }; + 554E42391C7748C700958E84 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4D44D27F1971627700EC5FDB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 554E422D1C7748C700958E84; + remoteInfo = "AwesomeCache OS X"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -75,6 +87,9 @@ 4DC91FAB1A7C54B200C81E10 /* AwesomeCacheTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AwesomeCacheTests.swift; sourceTree = ""; }; 4DC91FB81A7C552900C81E10 /* Cache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Cache.swift; sourceTree = ""; }; 4DC91FB91A7C552900C81E10 /* CacheObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CacheObject.swift; sourceTree = ""; }; + 554E422E1C7748C700958E84 /* AwesomeCache.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AwesomeCache.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 554E42371C7748C700958E84 /* AwesomeCache OS XTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AwesomeCache OS XTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 554E42481C775DD100958E84 /* AwesomeCacheOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AwesomeCacheOSX.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -101,6 +116,21 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 554E422A1C7748C700958E84 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 554E42341C7748C700958E84 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 554E42381C7748C700958E84 /* AwesomeCache.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -120,6 +150,8 @@ 4D44D2871971627700EC5FDB /* Example.app */, 4DC91F981A7C54B200C81E10 /* AwesomeCache.framework */, 4DC91FA21A7C54B200C81E10 /* AwesomeCacheTests.xctest */, + 554E422E1C7748C700958E84 /* AwesomeCache.framework */, + 554E42371C7748C700958E84 /* AwesomeCache OS XTests.xctest */, ); name = Products; sourceTree = ""; @@ -151,6 +183,7 @@ 4DC91FB81A7C552900C81E10 /* Cache.swift */, 4DC91FB91A7C552900C81E10 /* CacheObject.swift */, 4DC91F9C1A7C54B200C81E10 /* AwesomeCache.h */, + 554E42481C775DD100958E84 /* AwesomeCacheOSX.h */, 4DC91F9A1A7C54B200C81E10 /* Supporting Files */, ); path = AwesomeCache; @@ -192,6 +225,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 554E422B1C7748C700958E84 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 554E42491C775DD100958E84 /* AwesomeCacheOSX.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -251,6 +292,42 @@ productReference = 4DC91FA21A7C54B200C81E10 /* AwesomeCacheTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + 554E422D1C7748C700958E84 /* AwesomeCache OS X */ = { + isa = PBXNativeTarget; + buildConfigurationList = 554E42431C7748C700958E84 /* Build configuration list for PBXNativeTarget "AwesomeCache OS X" */; + buildPhases = ( + 554E42291C7748C700958E84 /* Sources */, + 554E422A1C7748C700958E84 /* Frameworks */, + 554E422B1C7748C700958E84 /* Headers */, + 554E422C1C7748C700958E84 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "AwesomeCache OS X"; + productName = "AwesomeCache OS X"; + productReference = 554E422E1C7748C700958E84 /* AwesomeCache.framework */; + productType = "com.apple.product-type.framework"; + }; + 554E42361C7748C700958E84 /* AwesomeCache OS XTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 554E42441C7748C700958E84 /* Build configuration list for PBXNativeTarget "AwesomeCache OS XTests" */; + buildPhases = ( + 554E42331C7748C700958E84 /* Sources */, + 554E42341C7748C700958E84 /* Frameworks */, + 554E42351C7748C700958E84 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 554E423A1C7748C700958E84 /* PBXTargetDependency */, + ); + name = "AwesomeCache OS XTests"; + productName = "AwesomeCache OS XTests"; + productReference = 554E42371C7748C700958E84 /* AwesomeCache OS XTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -258,7 +335,7 @@ isa = PBXProject; attributes = { LastSwiftMigration = 0700; - LastSwiftUpdateCheck = 0700; + LastSwiftUpdateCheck = 0720; LastUpgradeCheck = 0700; ORGANIZATIONNAME = "Alexander Schuch"; TargetAttributes = { @@ -272,6 +349,12 @@ CreatedOnToolsVersion = 6.2; TestTargetID = 4D44D2861971627700EC5FDB; }; + 554E422D1C7748C700958E84 = { + CreatedOnToolsVersion = 7.2.1; + }; + 554E42361C7748C700958E84 = { + CreatedOnToolsVersion = 7.2.1; + }; }; }; buildConfigurationList = 4D44D2821971627700EC5FDB /* Build configuration list for PBXProject "Example" */; @@ -290,6 +373,8 @@ 4D44D2861971627700EC5FDB /* Example */, 4DC91F971A7C54B200C81E10 /* AwesomeCache */, 4DC91FA11A7C54B200C81E10 /* AwesomeCacheTests */, + 554E422D1C7748C700958E84 /* AwesomeCache OS X */, + 554E42361C7748C700958E84 /* AwesomeCache OS XTests */, ); }; /* End PBXProject section */ @@ -319,6 +404,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 554E422C1C7748C700958E84 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 554E42351C7748C700958E84 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -348,6 +447,23 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 554E42291C7748C700958E84 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 554E42451C7758C700958E84 /* Cache.swift in Sources */, + 554E42461C7758C700958E84 /* CacheObject.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 554E42331C7748C700958E84 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 554E424A1C77630200958E84 /* AwesomeCacheTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -366,6 +482,11 @@ target = 4DC91F971A7C54B200C81E10 /* AwesomeCache */; targetProxy = 4DC91FAD1A7C54B200C81E10 /* PBXContainerItemProxy */; }; + 554E423A1C7748C700958E84 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 554E422D1C7748C700958E84 /* AwesomeCache OS X */; + targetProxy = 554E42391C7748C700958E84 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -573,6 +694,92 @@ }; name = Release; }; + 554E423F1C7748C700958E84 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + 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 = AwesomeCache/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_BUNDLE_IDENTIFIER = com.aschuch.AwesomeCache; + PRODUCT_NAME = AwesomeCache; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 554E42401C7748C700958E84 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + 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 = AwesomeCache/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_BUNDLE_IDENTIFIER = com.aschuch.AwesomeCache; + PRODUCT_NAME = AwesomeCache; + SDKROOT = macosx; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 554E42411C7748C700958E84 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = AwesomeCache/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.AwesomeCache.AwesomeCache-OS-XTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 554E42421C7748C700958E84 /* 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 = AwesomeCache/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.AwesomeCache.AwesomeCache-OS-XTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -612,6 +819,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 554E42431C7748C700958E84 /* Build configuration list for PBXNativeTarget "AwesomeCache OS X" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 554E423F1C7748C700958E84 /* Debug */, + 554E42401C7748C700958E84 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 554E42441C7748C700958E84 /* Build configuration list for PBXNativeTarget "AwesomeCache OS XTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 554E42411C7748C700958E84 /* Debug */, + 554E42421C7748C700958E84 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 4D44D27F1971627700EC5FDB /* Project object */; diff --git a/Example.xcodeproj/xcshareddata/xcschemes/AwesomeCache OS X.xcscheme b/Example.xcodeproj/xcshareddata/xcschemes/AwesomeCache OS X.xcscheme new file mode 100644 index 0000000..c3fa367 --- /dev/null +++ b/Example.xcodeproj/xcshareddata/xcschemes/AwesomeCache OS X.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +