├── .swift-version ├── Package.swift ├── Strand-NoSPM.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcshareddata │ └── xcschemes │ │ ├── Strand.xcscheme │ │ └── Strand-NoSPM.xcscheme └── project.pbxproj ├── Strand.h ├── README.md ├── .gitignore ├── NoSPM └── Info.plist └── Sources └── Strand.swift /.swift-version: -------------------------------------------------------------------------------- 1 | DEVELOPMENT-SNAPSHOT-2016-06-20-a 2 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "Strand", 5 | dependencies: [] 6 | ) 7 | 8 | -------------------------------------------------------------------------------- /Strand-NoSPM.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Strand.h: -------------------------------------------------------------------------------- 1 | // 2 | // Strand.h 3 | // Strand 4 | // 5 | // Created by James Richard on 3/1/16. 6 | // Copyright © 2016 MagicalPenguin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Strand. 12 | FOUNDATION_EXPORT double StrandVersionNumber; 13 | 14 | //! Project version string for Strand. 15 | FOUNDATION_EXPORT const unsigned char StrandVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | Strand is a simple Swift wrapper for pthread. I put this together to avoid working with libdispatch on Linux. Libdispatch has some complicated macros that aren't imported nicely as a C module, particularly around concurrent queues. Strand makes concurrent operations easy. 4 | 5 | # Usage 6 | 7 | When you create a new `Strand` instance a new thread is created immediately. You can join, cancel, or just ignore the resulting 8 | instance. The thread will run as expected. 9 | 10 | ```swift 11 | var data: String? 12 | 13 | let s = try Strand { 14 | data = "Hi~" 15 | } 16 | 17 | try s.join() 18 | 19 | print(data) // Prints Optional("Hi~") 20 | ``` 21 | 22 | # License 23 | 24 | MIT 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | Strand.xcodeproj 5 | 6 | # Created by https://www.gitignore.io/api/xcode 7 | 8 | ### Xcode ### 9 | # Xcode 10 | # 11 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 12 | 13 | ## Build generated 14 | build/ 15 | DerivedData/ 16 | 17 | ## Various settings 18 | *.pbxuser 19 | !default.pbxuser 20 | *.mode1v3 21 | !default.mode1v3 22 | *.mode2v3 23 | !default.mode2v3 24 | *.perspectivev3 25 | !default.perspectivev3 26 | xcuserdata/ 27 | 28 | ## Other 29 | *.moved-aside 30 | *.xccheckout 31 | *.xcscmblueprint 32 | 33 | # Created by https://www.gitignore.io/api/carthage 34 | 35 | ### Carthage ### 36 | # Carthage - A simple, decentralized dependency manager for Cocoa 37 | Carthage.checkout 38 | Carthage.buildCarthage/ 39 | Carthage/ 40 | -------------------------------------------------------------------------------- /NoSPM/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Strand-NoSPM.xcodeproj/xcshareddata/xcschemes/Strand.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Sources/Strand.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Strand.swift 3 | // Strand 4 | // 5 | // Created by James Richard on 3/1/16. 6 | // 7 | 8 | #if os(Linux) 9 | import Glibc 10 | #else 11 | import Darwin.C 12 | #endif 13 | 14 | #if !swift(>=3.0) 15 | typealias Error = ErrorType 16 | typealias OpaquePointer = COpaquePointer 17 | #endif 18 | 19 | public enum StrandError: Error { 20 | case threadCreationFailed 21 | case threadCancellationFailed(Int) 22 | case threadJoinFailed(Int) 23 | } 24 | 25 | public class Strand { 26 | #if swift(>=3.0) 27 | #if os(Linux) 28 | private var pthread: pthread_t = 0 29 | #else 30 | private var pthread: pthread_t 31 | #endif 32 | #else 33 | #if os(Linux) 34 | private var pthread: pthread_t = 0 35 | #else 36 | private var pthread: pthread_t = nil 37 | #endif 38 | #endif 39 | 40 | public init(closure: () -> Void) throws { 41 | let holder = Unmanaged.passRetained(StrandClosure(closure: closure)) 42 | 43 | #if swift(>=3.0) 44 | let pointer = UnsafeMutablePointer(holder.toOpaque()) 45 | #if os(Linux) 46 | guard pthread_create(&pthread, nil, runner, pointer) == 0 else { 47 | holder.release() 48 | throw StrandError.threadCreationFailed 49 | } 50 | #else 51 | var pt: pthread_t? 52 | guard pthread_create(&pt, nil, runner, pointer) == 0 && pt != nil else { 53 | holder.release() 54 | throw StrandError.threadCreationFailed 55 | } 56 | pthread = pt! 57 | #endif 58 | #else 59 | let pointer = UnsafeMutablePointer(OpaquePointer(bitPattern: holder)) 60 | guard pthread_create(&pthread, nil, runner, pointer) == 0 else { 61 | holder.release() 62 | throw StrandError.threadCreationFailed 63 | } 64 | #endif 65 | } 66 | 67 | public func join() throws { 68 | let status = pthread_join(pthread, nil) 69 | if status != 0 { 70 | throw StrandError.threadJoinFailed(Int(status)) 71 | } 72 | } 73 | 74 | public func cancel() throws { 75 | let status = pthread_cancel(pthread) 76 | if status != 0 { 77 | throw StrandError.threadCancellationFailed(Int(status)) 78 | } 79 | } 80 | 81 | #if swift(>=3.0) 82 | public class func exit(code: inout Int) { 83 | pthread_exit(&code) 84 | } 85 | #else 86 | public class func exit(inout code: Int) { 87 | pthread_exit(&code) 88 | } 89 | #endif 90 | 91 | deinit { 92 | pthread_detach(pthread) 93 | } 94 | } 95 | 96 | #if swift(>=3.0) 97 | #if os(Linux) 98 | private func runner(arg: UnsafeMutablePointer?) -> UnsafeMutablePointer? { 99 | guard let arg = arg else { return nil } 100 | let unmanaged = Unmanaged.fromOpaque(arg) 101 | unmanaged.takeUnretainedValue().closure() 102 | unmanaged.release() 103 | return nil 104 | } 105 | #else 106 | private func runner(arg: UnsafeMutablePointer) -> UnsafeMutablePointer? { 107 | let unmanaged = Unmanaged.fromOpaque(arg) 108 | unmanaged.takeUnretainedValue().closure() 109 | unmanaged.release() 110 | return nil 111 | } 112 | #endif 113 | #else 114 | private func runner(arg: UnsafeMutablePointer) -> UnsafeMutablePointer { 115 | let unmanaged = Unmanaged.fromOpaque(OpaquePointer(arg)) 116 | unmanaged.takeUnretainedValue().closure() 117 | unmanaged.release() 118 | return nil 119 | } 120 | #endif 121 | 122 | private class StrandClosure { 123 | let closure: () -> Void 124 | 125 | init(closure: () -> Void) { 126 | self.closure = closure 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /Strand-NoSPM.xcodeproj/xcshareddata/xcschemes/Strand-NoSPM.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Strand-NoSPM.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0A4B17851D04B506004F2DB2 /* Strand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A4B177B1D04AEB9004F2DB2 /* Strand.swift */; }; 11 | /* End PBXBuildFile section */ 12 | 13 | /* Begin PBXContainerItemProxy section */ 14 | 7FAC709E085EBBF2B5B20A9A /* PBXContainerItemProxy */ = { 15 | isa = PBXContainerItemProxy; 16 | containerPortal = 518FDEA44E1648E87092D954 /* Project object */; 17 | proxyType = 1; 18 | remoteGlobalIDString = 3EC42E65FA86DBBE05A0F952; 19 | remoteInfo = "Strand-NoSPM"; 20 | }; 21 | /* End PBXContainerItemProxy section */ 22 | 23 | /* Begin PBXFileReference section */ 24 | 0A4B17761D04AE8B004F2DB2 /* NoSPM */ = {isa = PBXFileReference; lastKnownFileType = folder; path = NoSPM; sourceTree = ""; }; 25 | 0A4B17771D04AE92004F2DB2 /* Strand.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Strand.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 0A4B177B1D04AEB9004F2DB2 /* Strand.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Strand.swift; path = Sources/Strand.swift; sourceTree = ""; }; 27 | 0A4B17831D04B4C8004F2DB2 /* Strand-NoSPM.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Strand-NoSPM.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 0A4B17841D04B4C8004F2DB2 /* UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 0A4B176A1D04AE68004F2DB2 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | 729C7EA9CFC0B5811BEB4712 /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | 8D26B4D94085E27171152196 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 2B467E9A047F3FC4D11A5E02 = { 57 | isa = PBXGroup; 58 | children = ( 59 | 0A4B177B1D04AEB9004F2DB2 /* Strand.swift */, 60 | 0A4B17761D04AE8B004F2DB2 /* NoSPM */, 61 | 0A4B17771D04AE92004F2DB2 /* Strand.framework */, 62 | 0A4B17831D04B4C8004F2DB2 /* Strand-NoSPM.app */, 63 | 0A4B17841D04B4C8004F2DB2 /* UnitTests.xctest */, 64 | ); 65 | indentWidth = 4; 66 | sourceTree = ""; 67 | tabWidth = 4; 68 | usesTabs = 0; 69 | }; 70 | /* End PBXGroup section */ 71 | 72 | /* Begin PBXHeadersBuildPhase section */ 73 | 0A4B176B1D04AE68004F2DB2 /* Headers */ = { 74 | isa = PBXHeadersBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | /* End PBXHeadersBuildPhase section */ 81 | 82 | /* Begin PBXNativeTarget section */ 83 | 0A4B176D1D04AE68004F2DB2 /* Strand */ = { 84 | isa = PBXNativeTarget; 85 | buildConfigurationList = 0A4B17731D04AE68004F2DB2 /* Build configuration list for PBXNativeTarget "Strand" */; 86 | buildPhases = ( 87 | 0A4B17691D04AE68004F2DB2 /* Sources */, 88 | 0A4B176A1D04AE68004F2DB2 /* Frameworks */, 89 | 0A4B176B1D04AE68004F2DB2 /* Headers */, 90 | 0A4B176C1D04AE68004F2DB2 /* Resources */, 91 | ); 92 | buildRules = ( 93 | ); 94 | dependencies = ( 95 | ); 96 | name = Strand; 97 | productName = Strand; 98 | productReference = 0A4B17771D04AE92004F2DB2 /* Strand.framework */; 99 | productType = "com.apple.product-type.framework"; 100 | }; 101 | 17D2F55495E5CF23CC09E7FC /* UnitTests */ = { 102 | isa = PBXNativeTarget; 103 | buildConfigurationList = 004BFF49B4577C9FCE5E1F09 /* Build configuration list for PBXNativeTarget "UnitTests" */; 104 | buildPhases = ( 105 | 47BBD2404BEB3FDE88CAAB13 /* Sources */, 106 | 8D26B4D94085E27171152196 /* Frameworks */, 107 | AC2345A82FDA7012452CF50D /* Resources */, 108 | ); 109 | buildRules = ( 110 | ); 111 | dependencies = ( 112 | 8C0EAD448D8BA13B203853F6 /* PBXTargetDependency */, 113 | ); 114 | name = UnitTests; 115 | productName = UnitTests; 116 | productReference = 0A4B17841D04B4C8004F2DB2 /* UnitTests.xctest */; 117 | productType = "com.apple.product-type.bundle.unit-test"; 118 | }; 119 | 3EC42E65FA86DBBE05A0F952 /* Strand-NoSPM */ = { 120 | isa = PBXNativeTarget; 121 | buildConfigurationList = E92CA0F7FD729B8686462064 /* Build configuration list for PBXNativeTarget "Strand-NoSPM" */; 122 | buildPhases = ( 123 | 83CC70F08147B97034ADD4A3 /* Sources */, 124 | 729C7EA9CFC0B5811BEB4712 /* Frameworks */, 125 | 32300536B161FA10C28D88BD /* Resources */, 126 | D656E038D36FD04FA30EBFF0 /* Warn for TODO and FIXME comments */, 127 | AA0A7CCE6956D9068C56E2ED /* Set version number */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = "Strand-NoSPM"; 134 | productName = "Strand-NoSPM"; 135 | productReference = 0A4B17831D04B4C8004F2DB2 /* Strand-NoSPM.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | /* End PBXNativeTarget section */ 139 | 140 | /* Begin PBXProject section */ 141 | 518FDEA44E1648E87092D954 /* Project object */ = { 142 | isa = PBXProject; 143 | attributes = { 144 | CLASSPREFIX = ""; 145 | LastSwiftUpdateCheck = 0730; 146 | LastUpgradeCheck = 0700; 147 | ORGANIZATIONNAME = ""; 148 | TargetAttributes = { 149 | 0A4B176D1D04AE68004F2DB2 = { 150 | CreatedOnToolsVersion = 7.3; 151 | }; 152 | 3EC42E65FA86DBBE05A0F952 = { 153 | LastSwiftMigration = 0800; 154 | }; 155 | }; 156 | }; 157 | buildConfigurationList = 32B8E9BB67D165D16892A7F0 /* Build configuration list for PBXProject "Strand-NoSPM" */; 158 | compatibilityVersion = "Xcode 3.2"; 159 | developmentRegion = English; 160 | hasScannedForEncodings = 0; 161 | knownRegions = ( 162 | en, 163 | ); 164 | mainGroup = 2B467E9A047F3FC4D11A5E02; 165 | productRefGroup = 2B467E9A047F3FC4D11A5E02; 166 | projectDirPath = ""; 167 | projectRoot = ""; 168 | targets = ( 169 | 3EC42E65FA86DBBE05A0F952 /* Strand-NoSPM */, 170 | 17D2F55495E5CF23CC09E7FC /* UnitTests */, 171 | 0A4B176D1D04AE68004F2DB2 /* Strand */, 172 | ); 173 | }; 174 | /* End PBXProject section */ 175 | 176 | /* Begin PBXResourcesBuildPhase section */ 177 | 0A4B176C1D04AE68004F2DB2 /* Resources */ = { 178 | isa = PBXResourcesBuildPhase; 179 | buildActionMask = 2147483647; 180 | files = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | 32300536B161FA10C28D88BD /* Resources */ = { 185 | isa = PBXResourcesBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | AC2345A82FDA7012452CF50D /* Resources */ = { 192 | isa = PBXResourcesBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXResourcesBuildPhase section */ 199 | 200 | /* Begin PBXShellScriptBuildPhase section */ 201 | AA0A7CCE6956D9068C56E2ED /* Set version number */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | inputPaths = ( 207 | ); 208 | name = "Set version number"; 209 | outputPaths = ( 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | shellPath = /bin/sh; 213 | shellScript = "git=$(sh /etc/profile; which git)\ngit_release_version=$(\"$git\" describe --tags --always --abbrev=0)\nnumber_of_commits=$(\"$git\" rev-list master --count)\ntarget_plist=\"$TARGET_BUILD_DIR/$INFOPLIST_PATH\"\ndsym_plist=\"$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME/Contents/Info.plist\"\n\nfor plist in \"$target_plist\" \"$dsym_plist\"; do\n if [ -f \"$plist\" ]; then\n /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $number_of_commits\" \"$plist\"\n /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString ${git_release_version#*v}\" \"$plist\"\n fi\ndone\n"; 214 | }; 215 | D656E038D36FD04FA30EBFF0 /* Warn for TODO and FIXME comments */ = { 216 | isa = PBXShellScriptBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | inputPaths = ( 221 | ); 222 | name = "Warn for TODO and FIXME comments"; 223 | outputPaths = ( 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | shellPath = /bin/sh; 227 | shellScript = "KEYWORDS=\"TODO:|FIXME:|\\?\\?\\?:|\\!\\!\\!:\"\nFILE_EXTENSIONS=\"swift|h|m|mm|c|cpp\"\nfind -E \"${SRCROOT}\" -ipath \"${SRCROOT}/Carthage\" -o -ipath \"${SRCROOT}/pods\" -prune -o \\( -regex \".*\\.($FILE_EXTENSIONS)$\" \\) -print0 | xargs -0 egrep --with-filename --line-number --only-matching \"($KEYWORDS).*\\$\" | perl -p -e \"s/($KEYWORDS)/ warning: \\$1/\"\n"; 228 | }; 229 | /* End PBXShellScriptBuildPhase section */ 230 | 231 | /* Begin PBXSourcesBuildPhase section */ 232 | 0A4B17691D04AE68004F2DB2 /* Sources */ = { 233 | isa = PBXSourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | 0A4B17851D04B506004F2DB2 /* Strand.swift in Sources */, 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | 47BBD2404BEB3FDE88CAAB13 /* Sources */ = { 241 | isa = PBXSourcesBuildPhase; 242 | buildActionMask = 2147483647; 243 | files = ( 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | 83CC70F08147B97034ADD4A3 /* Sources */ = { 248 | isa = PBXSourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | /* End PBXSourcesBuildPhase section */ 255 | 256 | /* Begin PBXTargetDependency section */ 257 | 8C0EAD448D8BA13B203853F6 /* PBXTargetDependency */ = { 258 | isa = PBXTargetDependency; 259 | name = "Strand-NoSPM"; 260 | target = 3EC42E65FA86DBBE05A0F952 /* Strand-NoSPM */; 261 | targetProxy = 7FAC709E085EBBF2B5B20A9A /* PBXContainerItemProxy */; 262 | }; 263 | /* End PBXTargetDependency section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 0A4B17741D04AE68004F2DB2 /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | CLANG_ANALYZER_NONNULL = YES; 270 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 271 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 272 | CODE_SIGN_IDENTITY = "-"; 273 | COMBINE_HIDPI_IMAGES = YES; 274 | CURRENT_PROJECT_VERSION = 1; 275 | DEBUG_INFORMATION_FORMAT = dwarf; 276 | DEFINES_MODULE = YES; 277 | DYLIB_COMPATIBILITY_VERSION = 1; 278 | DYLIB_CURRENT_VERSION = 1; 279 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 280 | ENABLE_STRICT_OBJC_MSGSEND = YES; 281 | ENABLE_TESTABILITY = YES; 282 | FRAMEWORK_VERSION = A; 283 | GCC_NO_COMMON_BLOCKS = YES; 284 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 285 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 286 | INFOPLIST_FILE = "$(SRCROOT)/NoSPM/Info.plist"; 287 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 288 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 289 | MACOSX_DEPLOYMENT_TARGET = 10.11; 290 | MTL_ENABLE_DEBUG_INFO = YES; 291 | PRODUCT_BUNDLE_IDENTIFIER = nl.orlandos.Strand; 292 | PRODUCT_NAME = "$(TARGET_NAME)"; 293 | SDKROOT = macosx; 294 | SKIP_INSTALL = YES; 295 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 296 | VERSIONING_SYSTEM = "apple-generic"; 297 | VERSION_INFO_PREFIX = ""; 298 | }; 299 | name = Debug; 300 | }; 301 | 0A4B17751D04AE68004F2DB2 /* Release */ = { 302 | isa = XCBuildConfiguration; 303 | buildSettings = { 304 | CLANG_ANALYZER_NONNULL = YES; 305 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 307 | CODE_SIGN_IDENTITY = "-"; 308 | COMBINE_HIDPI_IMAGES = YES; 309 | COPY_PHASE_STRIP = NO; 310 | CURRENT_PROJECT_VERSION = 1; 311 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 312 | DEFINES_MODULE = YES; 313 | DYLIB_COMPATIBILITY_VERSION = 1; 314 | DYLIB_CURRENT_VERSION = 1; 315 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 316 | ENABLE_STRICT_OBJC_MSGSEND = YES; 317 | FRAMEWORK_VERSION = A; 318 | GCC_NO_COMMON_BLOCKS = YES; 319 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 320 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 321 | INFOPLIST_FILE = "$(SRCROOT)/NoSPM/Info.plist"; 322 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 323 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 324 | MACOSX_DEPLOYMENT_TARGET = 10.11; 325 | MTL_ENABLE_DEBUG_INFO = NO; 326 | PRODUCT_BUNDLE_IDENTIFIER = nl.orlandos.Strand; 327 | PRODUCT_NAME = "$(TARGET_NAME)"; 328 | SDKROOT = macosx; 329 | SKIP_INSTALL = YES; 330 | VERSIONING_SYSTEM = "apple-generic"; 331 | VERSION_INFO_PREFIX = ""; 332 | }; 333 | name = Release; 334 | }; 335 | 0C6116FF28B7F328D2E68560 /* Debug */ = { 336 | isa = XCBuildConfiguration; 337 | buildSettings = { 338 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Strand-NoSPM.app/Strand-NoSPM"; 339 | ENABLE_STRICT_OBJC_MSGSEND = YES; 340 | FRAMEWORK_SEARCH_PATHS = ( 341 | "$(SDKROOT)/Developer/Library/Frameworks", 342 | "$(inherited)", 343 | "$(DEVELOPER_FRAMEWORKS_DIR)", 344 | ); 345 | INFOPLIST_FILE = "UnitTests/Resources/UnitTests-Info.plist"; 346 | PRODUCT_NAME = "$(TARGET_NAME)"; 347 | SDKROOT = iphoneos; 348 | SKIP_INSTALL = YES; 349 | TEST_HOST = "$(BUNDLE_LOADER)"; 350 | WRAPPER_EXTENSION = xctest; 351 | }; 352 | name = Debug; 353 | }; 354 | 1D4531DBA66F8C9B2844D967 /* Release */ = { 355 | isa = XCBuildConfiguration; 356 | buildSettings = { 357 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Strand-NoSPM.app/Strand-NoSPM"; 358 | ENABLE_STRICT_OBJC_MSGSEND = YES; 359 | FRAMEWORK_SEARCH_PATHS = ( 360 | "$(SDKROOT)/Developer/Library/Frameworks", 361 | "$(inherited)", 362 | "$(DEVELOPER_FRAMEWORKS_DIR)", 363 | ); 364 | INFOPLIST_FILE = "UnitTests/Resources/UnitTests-Info.plist"; 365 | PRODUCT_NAME = "$(TARGET_NAME)"; 366 | SDKROOT = iphoneos; 367 | SKIP_INSTALL = YES; 368 | TEST_HOST = "$(BUNDLE_LOADER)"; 369 | WRAPPER_EXTENSION = xctest; 370 | }; 371 | name = Release; 372 | }; 373 | 3ED1A39D70F582AC2AF1A5B9 /* Debug */ = { 374 | isa = XCBuildConfiguration; 375 | buildSettings = { 376 | ALWAYS_SEARCH_USER_PATHS = NO; 377 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 379 | CLANG_CXX_LIBRARY = "libc++"; 380 | CLANG_ENABLE_MODULES = YES; 381 | CLANG_ENABLE_OBJC_ARC = YES; 382 | CLANG_WARN_BOOL_CONVERSION = YES; 383 | CLANG_WARN_CONSTANT_CONVERSION = YES; 384 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 385 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 386 | CLANG_WARN_EMPTY_BODY = YES; 387 | CLANG_WARN_ENUM_CONVERSION = YES; 388 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 389 | CLANG_WARN_INT_CONVERSION = YES; 390 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 391 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 392 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 393 | CLANG_WARN_UNREACHABLE_CODE = YES; 394 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 395 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 396 | COPY_PHASE_STRIP = NO; 397 | GCC_C_LANGUAGE_STANDARD = gnu99; 398 | GCC_DYNAMIC_NO_PIC = NO; 399 | GCC_OPTIMIZATION_LEVEL = 0; 400 | GCC_PREPROCESSOR_DEFINITIONS = ( 401 | "DEBUG=1", 402 | "$(inherited)", 403 | ); 404 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 405 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 406 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 407 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 408 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 410 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 411 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 412 | GCC_WARN_MISSING_PARENTHESES = YES; 413 | GCC_WARN_SHADOW = YES; 414 | GCC_WARN_SIGN_COMPARE = YES; 415 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; 416 | GCC_WARN_UNDECLARED_SELECTOR = YES; 417 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 418 | GCC_WARN_UNUSED_FUNCTION = YES; 419 | GCC_WARN_UNUSED_LABEL = YES; 420 | GCC_WARN_UNUSED_VALUE = YES; 421 | GCC_WARN_UNUSED_VARIABLE = YES; 422 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 423 | ONLY_ACTIVE_ARCH = YES; 424 | RUN_CLANG_STATIC_ANALYZER = YES; 425 | SDKROOT = iphoneos; 426 | }; 427 | name = Debug; 428 | }; 429 | 4957A76FF94548EFE6F28543 /* Release */ = { 430 | isa = XCBuildConfiguration; 431 | buildSettings = { 432 | ALWAYS_SEARCH_USER_PATHS = NO; 433 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 435 | CLANG_CXX_LIBRARY = "libc++"; 436 | CLANG_ENABLE_MODULES = YES; 437 | CLANG_ENABLE_OBJC_ARC = YES; 438 | CLANG_WARN_BOOL_CONVERSION = YES; 439 | CLANG_WARN_CONSTANT_CONVERSION = YES; 440 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 441 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 442 | CLANG_WARN_EMPTY_BODY = YES; 443 | CLANG_WARN_ENUM_CONVERSION = YES; 444 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 445 | CLANG_WARN_INT_CONVERSION = YES; 446 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 447 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 448 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 449 | CLANG_WARN_UNREACHABLE_CODE = YES; 450 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 451 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 452 | COPY_PHASE_STRIP = YES; 453 | ENABLE_NS_ASSERTIONS = NO; 454 | GCC_C_LANGUAGE_STANDARD = gnu99; 455 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 456 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 457 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 458 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 459 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 460 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 461 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 462 | GCC_WARN_MISSING_PARENTHESES = YES; 463 | GCC_WARN_SHADOW = YES; 464 | GCC_WARN_SIGN_COMPARE = YES; 465 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; 466 | GCC_WARN_UNDECLARED_SELECTOR = YES; 467 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 468 | GCC_WARN_UNUSED_FUNCTION = YES; 469 | GCC_WARN_UNUSED_LABEL = YES; 470 | GCC_WARN_UNUSED_VALUE = YES; 471 | GCC_WARN_UNUSED_VARIABLE = YES; 472 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 473 | RUN_CLANG_STATIC_ANALYZER = YES; 474 | SDKROOT = iphoneos; 475 | VALIDATE_PRODUCT = YES; 476 | }; 477 | name = Release; 478 | }; 479 | 4BBE7C211F6B80A1D0D4B226 /* Release */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 483 | CLANG_ENABLE_MODULES = YES; 484 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 485 | ENABLE_STRICT_OBJC_MSGSEND = YES; 486 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 487 | INFOPLIST_FILE = "$(SRCROOT)/NoSPM/Info.plist"; 488 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 489 | MTL_ENABLE_DEBUG_INFO = NO; 490 | PRODUCT_NAME = "$(TARGET_NAME)"; 491 | SDKROOT = iphoneos; 492 | SWIFT_VERSION = 3.0; 493 | }; 494 | name = Release; 495 | }; 496 | F67993800BF8DE5D4838427F /* Debug */ = { 497 | isa = XCBuildConfiguration; 498 | buildSettings = { 499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 500 | CLANG_ENABLE_MODULES = YES; 501 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 502 | ENABLE_STRICT_OBJC_MSGSEND = YES; 503 | INFOPLIST_FILE = "$(SRCROOT)/NoSPM/Info.plist"; 504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 505 | MTL_ENABLE_DEBUG_INFO = YES; 506 | PRODUCT_NAME = "$(TARGET_NAME)"; 507 | SDKROOT = iphoneos; 508 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 509 | SWIFT_VERSION = 3.0; 510 | }; 511 | name = Debug; 512 | }; 513 | /* End XCBuildConfiguration section */ 514 | 515 | /* Begin XCConfigurationList section */ 516 | 004BFF49B4577C9FCE5E1F09 /* Build configuration list for PBXNativeTarget "UnitTests" */ = { 517 | isa = XCConfigurationList; 518 | buildConfigurations = ( 519 | 1D4531DBA66F8C9B2844D967 /* Release */, 520 | 0C6116FF28B7F328D2E68560 /* Debug */, 521 | ); 522 | defaultConfigurationIsVisible = 0; 523 | defaultConfigurationName = Release; 524 | }; 525 | 0A4B17731D04AE68004F2DB2 /* Build configuration list for PBXNativeTarget "Strand" */ = { 526 | isa = XCConfigurationList; 527 | buildConfigurations = ( 528 | 0A4B17741D04AE68004F2DB2 /* Debug */, 529 | 0A4B17751D04AE68004F2DB2 /* Release */, 530 | ); 531 | defaultConfigurationIsVisible = 0; 532 | defaultConfigurationName = Release; 533 | }; 534 | 32B8E9BB67D165D16892A7F0 /* Build configuration list for PBXProject "Strand-NoSPM" */ = { 535 | isa = XCConfigurationList; 536 | buildConfigurations = ( 537 | 3ED1A39D70F582AC2AF1A5B9 /* Debug */, 538 | 4957A76FF94548EFE6F28543 /* Release */, 539 | ); 540 | defaultConfigurationIsVisible = 0; 541 | defaultConfigurationName = Release; 542 | }; 543 | E92CA0F7FD729B8686462064 /* Build configuration list for PBXNativeTarget "Strand-NoSPM" */ = { 544 | isa = XCConfigurationList; 545 | buildConfigurations = ( 546 | 4BBE7C211F6B80A1D0D4B226 /* Release */, 547 | F67993800BF8DE5D4838427F /* Debug */, 548 | ); 549 | defaultConfigurationIsVisible = 0; 550 | defaultConfigurationName = Release; 551 | }; 552 | /* End XCConfigurationList section */ 553 | }; 554 | rootObject = 518FDEA44E1648E87092D954 /* Project object */; 555 | } 556 | --------------------------------------------------------------------------------