├── .gitignore ├── LICENSE ├── Package.swift ├── README.md ├── Sources └── Witness │ ├── EventStream.swift │ ├── FileEvent.swift │ ├── Info.plist │ ├── Witness.h │ └── Witness.swift ├── Tests └── WitnessTests │ ├── Info.plist │ └── WitnessTests.swift ├── Witness.xcodeproj ├── WitnessTests_Info.plist ├── Witness_Info.plist ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── xcshareddata │ └── xcschemes │ ├── Witness-Package.xcscheme │ └── Witness.xcscheme └── WitnessDemo ├── WitnessDemo.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist └── WitnessDemo ├── AppDelegate.swift ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json ├── Base.lproj └── Main.storyboard ├── Info.plist └── ViewController.swift /.gitignore: -------------------------------------------------------------------------------- 1 | ######################### 2 | # .gitignore file for Xcode / OS X Source projects 3 | # 4 | # Version 2.0 5 | # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects 6 | # 7 | # 2013 updates: 8 | # - fixed the broken "save personal Schemes" 9 | # 10 | # NB: if you are storing "built" products, this WILL NOT WORK, 11 | # and you should use a different .gitignore (or none at all) 12 | # This file is for SOURCE projects, where there are many extra 13 | # files that we want to exclude 14 | # 15 | ######################### 16 | 17 | ##### 18 | # OS X temporary files that should never be committed 19 | 20 | .DS_Store 21 | *.swp 22 | *.lock 23 | profile 24 | 25 | 26 | #### 27 | # Xcode temporary files that should never be committed 28 | # 29 | # NB: NIB/XIB files still exist even on Storyboard projects, so we want this... 30 | 31 | *~.nib 32 | 33 | 34 | #### 35 | # Xcode build files - 36 | # 37 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData" 38 | 39 | DerivedData/ 40 | 41 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build" 42 | 43 | build/ 44 | 45 | 46 | #### 47 | # Swift Package Manager files - 48 | # 49 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named ".build" 50 | .build/ 51 | Packages/ 52 | Package.pins 53 | Package.resolved 54 | 55 | ##### 56 | # Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) 57 | # 58 | # This is complicated: 59 | # 60 | # SOMETIMES you need to put this file in version control. 61 | # Apple designed it poorly - if you use "custom executables", they are 62 | # saved in this file. 63 | # 99% of projects do NOT use those, so they do NOT want to version control this file. 64 | # ..but if you're in the 1%, comment out the line "*.pbxuser" 65 | 66 | *.pbxuser 67 | *.mode1v3 68 | *.mode2v3 69 | *.perspectivev3 70 | # NB: also, whitelist the default ones, some projects need to use these 71 | !default.pbxuser 72 | !default.mode1v3 73 | !default.mode2v3 74 | !default.perspectivev3 75 | 76 | 77 | #### 78 | # Xcode 4 - semi-personal settings 79 | # 80 | # 81 | # OPTION 1: --------------------------------- 82 | # throw away ALL personal settings (including custom schemes! 83 | # - unless they are "shared") 84 | # 85 | # NB: this is exclusive with OPTION 2 below 86 | xcuserdata 87 | 88 | # OPTION 2: --------------------------------- 89 | # get rid of ALL personal settings, but KEEP SOME OF THEM 90 | # - NB: you must manually uncomment the bits you want to keep 91 | # 92 | # NB: this is exclusive with OPTION 1 above 93 | # 94 | #xcuserdata/**/* 95 | 96 | # (requires option 2 above): Personal Schemes 97 | # 98 | #!xcuserdata/**/xcschemes/* 99 | 100 | #### 101 | # XCode 4 workspaces - more detailed 102 | # 103 | # Workspaces are important! They are a core feature of Xcode - don't exclude them :) 104 | # 105 | # Workspace layout is quite spammy. For reference: 106 | # 107 | # /(root)/ 108 | # /(project-name).xcodeproj/ 109 | # project.pbxproj 110 | # /project.xcworkspace/ 111 | # contents.xcworkspacedata 112 | # /xcuserdata/ 113 | # /(your name)/xcuserdatad/ 114 | # UserInterfaceState.xcuserstate 115 | # /xcsshareddata/ 116 | # /xcschemes/ 117 | # (shared scheme name).xcscheme 118 | # /xcuserdata/ 119 | # /(your name)/xcuserdatad/ 120 | # (private scheme).xcscheme 121 | # xcschememanagement.plist 122 | # 123 | # 124 | 125 | #### 126 | # Xcode 4 - Deprecated classes 127 | # 128 | # Allegedly, if you manually "deprecate" your classes, they get moved here. 129 | # 130 | # We're using source-control, so this is a "feature" that we do not want! 131 | 132 | *.moved-aside 133 | 134 | 135 | #### 136 | # Cocoapods: cocoapods.org 137 | # 138 | # Ignoring these files means that whoever uses the code will first have to run: 139 | # pod install 140 | # in the App.xcodeproj directory. 141 | # This ensures the latest dependencies are used. 142 | # SK: We don't want to include the Pod source in our repo, but the lock file is 143 | # needed for Pod sha management among the team. 144 | Pods/ 145 | !Podfile.lock 146 | 147 | #### 148 | # Xcode 5 - Source Control files 149 | # 150 | # Xcode 5 introduced a new file type .xccheckout. This files contains VCS metadata 151 | # and should therefore not be checked into the VCS. 152 | 153 | *.xccheckout 154 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Niels de Hoog 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.2 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "Witness", 7 | products: [ 8 | .library( 9 | name: "Witness", 10 | targets: ["Witness"]), 11 | ], 12 | dependencies: [ 13 | ], 14 | targets: [ 15 | .target( 16 | name: "Witness", 17 | dependencies: []), 18 | .testTarget( 19 | name: "WitnessTests", 20 | dependencies: ["Witness"]), 21 | ], 22 | swiftLanguageVersions: [.v4, .v4_2] 23 | ) 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Witness 2 | Monitor file system changes using Swift. Witness provides a wrapper around the [File System Events](https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html) API for OS X. 3 | 4 | ## Installation 5 | 6 | The recommended way to include Witness in your project is by using [Carthage](https://github.com/Carthage/Carthage). Simply add this line to your `Cartfile`: 7 | 8 | github "njdehoog/Witness" ~> 0.1 9 | 10 | ## Usage 11 | 12 | Import the framework 13 | ```swift 14 | import Witness 15 | ``` 16 | 17 | ### Monitor file system events 18 | 19 | This will trigger an event when a file in the Desktop directory is created, deleted or modified. 20 | ```swift 21 | if let desktopPath = NSSearchPathForDirectoriesInDomains(.desktopDirectory, .userDomainMask, true).first { 22 | self.witness = Witness(paths: [desktopPath], flags: .FileEvents, latency: 0.3) { events in 23 | print("file system events received: \(events)") 24 | } 25 | } 26 | ``` 27 | 28 | ## Contributing 29 | 30 | 1. Fork it! 31 | 2. Create your feature branch: `git checkout -b my-new-feature` 32 | 3. Commit your changes: `git commit -am 'Add some feature'` 33 | 4. Push to the branch: `git push origin my-new-feature` 34 | 5. Submit a pull request :D 35 | 36 | ## Credits 37 | 38 | Witness was developed for use in [Spelt](http://spelt.io). If you like this library, please consider supporting development by purchasing the app. 39 | 40 | ## License 41 | 42 | Witness is released under the MIT license. See LICENSE for details. 43 | -------------------------------------------------------------------------------- /Sources/Witness/EventStream.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EventStream.swift 3 | // Witness 4 | // 5 | // Created by Niels de Hoog on 23/09/15. 6 | // Copyright © 2015 Invisible Pixel. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | /** 12 | * The type of event stream to be used. For more information, please refer to the File System Events Programming Guide: https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/FSEvents_ProgGuide/UsingtheFSEventsFramework/UsingtheFSEventsFramework.html#//apple_ref/doc/uid/TP40005289-CH4-SW6 13 | */ 14 | 15 | public enum StreamType { 16 | case hostBased // default 17 | case diskBased 18 | } 19 | 20 | class EventStream { 21 | let paths: [String] 22 | 23 | // use explicitly unwrapped optional so we can pass self as context to stream 24 | private var stream: FSEventStreamRef! 25 | private let changeHandler: FileEventHandler 26 | 27 | init(paths: [String], type: StreamType = .hostBased, flags: EventStreamCreateFlags, latency: TimeInterval, deviceToWatch: dev_t = 0, changeHandler: @escaping FileEventHandler) { 28 | self.paths = paths 29 | self.changeHandler = changeHandler 30 | 31 | func callBack(stream: ConstFSEventStreamRef, clientCallbackInfo: UnsafeMutableRawPointer?, numEvents: Int, eventPaths: UnsafeMutableRawPointer, eventFlags: UnsafePointer, eventIDs: UnsafePointer) { 32 | 33 | let eventStream = unsafeBitCast(clientCallbackInfo, to: EventStream.self) 34 | let paths = unsafeBitCast(eventPaths, to: NSArray.self) 35 | 36 | var events = [FileEvent]() 37 | for i in 0.. 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 | NSHumanReadableCopyright 24 | Copyright © 2015 Invisible Pixel. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Sources/Witness/Witness.h: -------------------------------------------------------------------------------- 1 | // 2 | // Witness.h 3 | // Witness 4 | // 5 | // Created by Niels de Hoog on 23/09/15. 6 | // Copyright © 2015 Invisible Pixel. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | //! Project version number for Witness. 13 | FOUNDATION_EXPORT double WitnessVersionNumber; 14 | 15 | //! Project version string for Witness. 16 | FOUNDATION_EXPORT const unsigned char WitnessVersionString[]; 17 | 18 | // In this header, you should import all the public headers of your framework using statements like #import 19 | 20 | 21 | -------------------------------------------------------------------------------- /Sources/Witness/Witness.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Witness.swift 3 | // Witness 4 | // 5 | // Created by Niels de Hoog on 23/09/15. 6 | // Copyright © 2015 Invisible Pixel. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public typealias FileEventHandler = (_ events: [FileEvent]) -> () 12 | 13 | public struct Witness { 14 | private let stream: EventStream 15 | var paths: [String] { 16 | return stream.paths 17 | } 18 | 19 | public init(paths: [String], flags: EventStreamCreateFlags = .None, latency: TimeInterval = 1.0, changeHandler: @escaping FileEventHandler) { 20 | self.stream = EventStream(paths: paths, flags: flags, latency: latency, changeHandler: changeHandler) 21 | } 22 | 23 | public init(paths: [String], streamType: StreamType, flags: EventStreamCreateFlags = .None, latency: TimeInterval = 1.0, deviceToWatch: dev_t, changeHandler: @escaping FileEventHandler) { 24 | self.stream = EventStream(paths: paths, type: streamType, flags: flags, latency: latency, deviceToWatch: deviceToWatch, changeHandler: changeHandler) 25 | } 26 | 27 | public func flush() { 28 | self.stream.flush() 29 | } 30 | 31 | public func flushAsync() { 32 | self.stream.flushAsync() 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Tests/WitnessTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Tests/WitnessTests/WitnessTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WitnessTests.swift 3 | // WitnessTests 4 | // 5 | // Created by Niels de Hoog on 23/09/15. 6 | // Copyright © 2015 Invisible Pixel. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Witness 11 | 12 | class WitnessTests: XCTestCase { 13 | static let expectationTimeout = 2.0 14 | static let latency: TimeInterval = 0.1 15 | 16 | let fileManager = FileManager() 17 | var witness: Witness? 18 | 19 | var temporaryDirectory: String { 20 | return NSTemporaryDirectory() 21 | } 22 | 23 | var testsDirectory: String { 24 | return (temporaryDirectory as NSString).appendingPathComponent("WitnessTests") 25 | } 26 | 27 | var filePath: String { 28 | return (testsDirectory as NSString).appendingPathComponent("file.txt") 29 | } 30 | 31 | override func setUp() { 32 | super.setUp() 33 | 34 | // create tests directory 35 | print("create tests directory at path: \(testsDirectory)") 36 | try! fileManager.createDirectory(atPath: testsDirectory, withIntermediateDirectories: true, attributes: nil) 37 | } 38 | 39 | override func tearDown() { 40 | witness?.flush() 41 | witness = nil 42 | 43 | do { 44 | // remove tests directory 45 | try fileManager.removeItem(atPath: testsDirectory) 46 | } 47 | catch {} 48 | 49 | super.tearDown() 50 | } 51 | 52 | func waitForPendingEvents() { 53 | print("wait for pending changes...") 54 | 55 | var didArrive = false 56 | witness = Witness(paths: [testsDirectory], flags: [.NoDefer, .WatchRoot], latency: WitnessTests.latency) { events in 57 | print("pending changes arrived") 58 | didArrive = true 59 | } 60 | 61 | while !didArrive { 62 | CFRunLoopRunInMode(CFRunLoopMode.defaultMode, 0.02, true); 63 | } 64 | } 65 | 66 | func delay(_ interval: TimeInterval, block: @escaping () -> ()) { 67 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(interval * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), execute: block) 68 | } 69 | 70 | func testThatFileCreationIsObserved() { 71 | var expectation: XCTestExpectation? = self.expectation(description: "File creation should trigger event") 72 | witness = Witness(paths: [testsDirectory], flags: .FileEvents) { events in 73 | for event in events { 74 | if event.flags.contains(.ItemCreated) { 75 | expectation?.fulfill() 76 | expectation = nil 77 | } 78 | } 79 | } 80 | fileManager.createFile(atPath: filePath, contents: nil, attributes: nil) 81 | waitForExpectations(timeout: WitnessTests.expectationTimeout, handler: nil) 82 | } 83 | 84 | func testThatFileRemovalIsObserved() { 85 | let expectation = self.expectation(description: "File removal should trigger event") 86 | fileManager.createFile(atPath: filePath, contents: nil, attributes: nil) 87 | waitForPendingEvents() 88 | witness = Witness(paths: [testsDirectory]) { events in 89 | expectation.fulfill() 90 | } 91 | try! fileManager.removeItem(atPath: filePath) 92 | waitForExpectations(timeout: WitnessTests.expectationTimeout, handler: nil) 93 | } 94 | 95 | func testThatFileChangesAreObserved() { 96 | let expectation = self.expectation(description: "File changes should trigger event") 97 | fileManager.createFile(atPath: filePath, contents: nil, attributes: nil) 98 | waitForPendingEvents() 99 | witness = Witness(paths: [testsDirectory]) { events in 100 | expectation.fulfill() 101 | } 102 | try! "Hello changes".write(toFile: filePath, atomically: true, encoding: String.Encoding.utf8) 103 | waitForExpectations(timeout: WitnessTests.expectationTimeout, handler: nil) 104 | } 105 | 106 | func testThatRootDirectoryIsNotObserved() { 107 | let expectation = self.expectation(description: "Removing root directory should not trigger event if .WatchRoot flag is not set") 108 | var didReceiveEvent = false 109 | witness = Witness(paths: [testsDirectory], flags: .NoDefer) { events in 110 | didReceiveEvent = true 111 | } 112 | 113 | delay(WitnessTests.latency * 2) { 114 | if didReceiveEvent == false { 115 | expectation.fulfill() 116 | } 117 | } 118 | 119 | try! fileManager.removeItem(atPath: testsDirectory) 120 | waitForExpectations(timeout: WitnessTests.expectationTimeout, handler: nil) 121 | } 122 | 123 | func testThatRootDirectoryIsObserved() { 124 | let expectation = self.expectation(description: "Removing root directory should trigger event if .WatchRoot flag is set") 125 | witness = Witness(paths: [testsDirectory], flags: .WatchRoot) { events in 126 | expectation.fulfill() 127 | } 128 | try! fileManager.removeItem(atPath: testsDirectory) 129 | waitForExpectations(timeout: WitnessTests.expectationTimeout, handler: nil) 130 | } 131 | 132 | } 133 | -------------------------------------------------------------------------------- /Witness.xcodeproj/WitnessTests_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | BNDL 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Witness.xcodeproj/Witness_Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDevelopmentRegion 5 | en 6 | CFBundleExecutable 7 | $(EXECUTABLE_NAME) 8 | CFBundleIdentifier 9 | $(PRODUCT_BUNDLE_IDENTIFIER) 10 | CFBundleInfoDictionaryVersion 11 | 6.0 12 | CFBundleName 13 | $(PRODUCT_NAME) 14 | CFBundlePackageType 15 | FMWK 16 | CFBundleShortVersionString 17 | 1.0 18 | CFBundleSignature 19 | ???? 20 | CFBundleVersion 21 | $(CURRENT_PROJECT_VERSION) 22 | NSPrincipalClass 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Witness.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXAggregateTarget section */ 10 | "Witness::WitnessPackageTests::ProductTarget" /* WitnessPackageTests */ = { 11 | isa = PBXAggregateTarget; 12 | buildConfigurationList = OBJ_35 /* Build configuration list for PBXAggregateTarget "WitnessPackageTests" */; 13 | buildPhases = ( 14 | ); 15 | dependencies = ( 16 | OBJ_38 /* PBXTargetDependency */, 17 | ); 18 | name = WitnessPackageTests; 19 | productName = WitnessPackageTests; 20 | }; 21 | /* End PBXAggregateTarget section */ 22 | 23 | /* Begin PBXBuildFile section */ 24 | OBJ_24 /* EventStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* EventStream.swift */; }; 25 | OBJ_25 /* FileEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* FileEvent.swift */; }; 26 | OBJ_26 /* Witness.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_11 /* Witness.swift */; }; 27 | OBJ_33 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; 28 | OBJ_44 /* WitnessTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_14 /* WitnessTests.swift */; }; 29 | OBJ_46 /* Witness.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "Witness::Witness::Product" /* Witness.framework */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | B30EE3EC228342FD000A3DDE /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = OBJ_1 /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = "Witness::Witness"; 38 | remoteInfo = Witness; 39 | }; 40 | B30EE3ED228342FD000A3DDE /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = OBJ_1 /* Project object */; 43 | proxyType = 1; 44 | remoteGlobalIDString = "Witness::WitnessTests"; 45 | remoteInfo = WitnessTests; 46 | }; 47 | /* End PBXContainerItemProxy section */ 48 | 49 | /* Begin PBXFileReference section */ 50 | OBJ_10 /* FileEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileEvent.swift; sourceTree = ""; }; 51 | OBJ_11 /* Witness.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Witness.swift; sourceTree = ""; }; 52 | OBJ_14 /* WitnessTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WitnessTests.swift; sourceTree = ""; }; 53 | OBJ_15 /* WitnessDemo */ = {isa = PBXFileReference; lastKnownFileType = folder; path = WitnessDemo; sourceTree = SOURCE_ROOT; }; 54 | OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; 55 | OBJ_9 /* EventStream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventStream.swift; sourceTree = ""; }; 56 | "Witness::Witness::Product" /* Witness.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Witness.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | "Witness::WitnessTests::Product" /* WitnessTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = WitnessTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | OBJ_27 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 0; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | OBJ_45 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 0; 71 | files = ( 72 | OBJ_46 /* Witness.framework in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | OBJ_12 /* Tests */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | OBJ_13 /* WitnessTests */, 83 | ); 84 | name = Tests; 85 | sourceTree = SOURCE_ROOT; 86 | }; 87 | OBJ_13 /* WitnessTests */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | OBJ_14 /* WitnessTests.swift */, 91 | ); 92 | name = WitnessTests; 93 | path = Tests/WitnessTests; 94 | sourceTree = SOURCE_ROOT; 95 | }; 96 | OBJ_16 /* Products */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | "Witness::Witness::Product" /* Witness.framework */, 100 | "Witness::WitnessTests::Product" /* WitnessTests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = BUILT_PRODUCTS_DIR; 104 | }; 105 | OBJ_5 = { 106 | isa = PBXGroup; 107 | children = ( 108 | OBJ_6 /* Package.swift */, 109 | OBJ_7 /* Sources */, 110 | OBJ_12 /* Tests */, 111 | OBJ_15 /* WitnessDemo */, 112 | OBJ_16 /* Products */, 113 | ); 114 | sourceTree = ""; 115 | }; 116 | OBJ_7 /* Sources */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | OBJ_8 /* Witness */, 120 | ); 121 | name = Sources; 122 | sourceTree = SOURCE_ROOT; 123 | }; 124 | OBJ_8 /* Witness */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | OBJ_9 /* EventStream.swift */, 128 | OBJ_10 /* FileEvent.swift */, 129 | OBJ_11 /* Witness.swift */, 130 | ); 131 | name = Witness; 132 | path = Sources/Witness; 133 | sourceTree = SOURCE_ROOT; 134 | }; 135 | /* End PBXGroup section */ 136 | 137 | /* Begin PBXNativeTarget section */ 138 | "Witness::SwiftPMPackageDescription" /* WitnessPackageDescription */ = { 139 | isa = PBXNativeTarget; 140 | buildConfigurationList = OBJ_29 /* Build configuration list for PBXNativeTarget "WitnessPackageDescription" */; 141 | buildPhases = ( 142 | OBJ_32 /* Sources */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = WitnessPackageDescription; 149 | productName = WitnessPackageDescription; 150 | productType = "com.apple.product-type.framework"; 151 | }; 152 | "Witness::Witness" /* Witness */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = OBJ_20 /* Build configuration list for PBXNativeTarget "Witness" */; 155 | buildPhases = ( 156 | OBJ_23 /* Sources */, 157 | OBJ_27 /* Frameworks */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = Witness; 164 | productName = Witness; 165 | productReference = "Witness::Witness::Product" /* Witness.framework */; 166 | productType = "com.apple.product-type.framework"; 167 | }; 168 | "Witness::WitnessTests" /* WitnessTests */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = OBJ_40 /* Build configuration list for PBXNativeTarget "WitnessTests" */; 171 | buildPhases = ( 172 | OBJ_43 /* Sources */, 173 | OBJ_45 /* Frameworks */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | OBJ_47 /* PBXTargetDependency */, 179 | ); 180 | name = WitnessTests; 181 | productName = WitnessTests; 182 | productReference = "Witness::WitnessTests::Product" /* WitnessTests.xctest */; 183 | productType = "com.apple.product-type.bundle.unit-test"; 184 | }; 185 | /* End PBXNativeTarget section */ 186 | 187 | /* Begin PBXProject section */ 188 | OBJ_1 /* Project object */ = { 189 | isa = PBXProject; 190 | attributes = { 191 | LastUpgradeCheck = 1020; 192 | TargetAttributes = { 193 | "Witness::Witness" = { 194 | LastSwiftMigration = 1020; 195 | }; 196 | }; 197 | }; 198 | buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "Witness" */; 199 | compatibilityVersion = "Xcode 3.2"; 200 | developmentRegion = English; 201 | hasScannedForEncodings = 0; 202 | knownRegions = ( 203 | English, 204 | en, 205 | ); 206 | mainGroup = OBJ_5; 207 | productRefGroup = OBJ_16 /* Products */; 208 | projectDirPath = ""; 209 | projectRoot = ""; 210 | targets = ( 211 | "Witness::Witness" /* Witness */, 212 | "Witness::SwiftPMPackageDescription" /* WitnessPackageDescription */, 213 | "Witness::WitnessPackageTests::ProductTarget" /* WitnessPackageTests */, 214 | "Witness::WitnessTests" /* WitnessTests */, 215 | ); 216 | }; 217 | /* End PBXProject section */ 218 | 219 | /* Begin PBXSourcesBuildPhase section */ 220 | OBJ_23 /* Sources */ = { 221 | isa = PBXSourcesBuildPhase; 222 | buildActionMask = 0; 223 | files = ( 224 | OBJ_24 /* EventStream.swift in Sources */, 225 | OBJ_25 /* FileEvent.swift in Sources */, 226 | OBJ_26 /* Witness.swift in Sources */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | OBJ_32 /* Sources */ = { 231 | isa = PBXSourcesBuildPhase; 232 | buildActionMask = 0; 233 | files = ( 234 | OBJ_33 /* Package.swift in Sources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | OBJ_43 /* Sources */ = { 239 | isa = PBXSourcesBuildPhase; 240 | buildActionMask = 0; 241 | files = ( 242 | OBJ_44 /* WitnessTests.swift in Sources */, 243 | ); 244 | runOnlyForDeploymentPostprocessing = 0; 245 | }; 246 | /* End PBXSourcesBuildPhase section */ 247 | 248 | /* Begin PBXTargetDependency section */ 249 | OBJ_38 /* PBXTargetDependency */ = { 250 | isa = PBXTargetDependency; 251 | target = "Witness::WitnessTests" /* WitnessTests */; 252 | targetProxy = B30EE3ED228342FD000A3DDE /* PBXContainerItemProxy */; 253 | }; 254 | OBJ_47 /* PBXTargetDependency */ = { 255 | isa = PBXTargetDependency; 256 | target = "Witness::Witness" /* Witness */; 257 | targetProxy = B30EE3EC228342FD000A3DDE /* PBXContainerItemProxy */; 258 | }; 259 | /* End PBXTargetDependency section */ 260 | 261 | /* Begin XCBuildConfiguration section */ 262 | OBJ_21 /* Debug */ = { 263 | isa = XCBuildConfiguration; 264 | buildSettings = { 265 | ENABLE_TESTABILITY = YES; 266 | FRAMEWORK_SEARCH_PATHS = ( 267 | "$(inherited)", 268 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 269 | ); 270 | HEADER_SEARCH_PATHS = "$(inherited)"; 271 | INFOPLIST_FILE = Witness.xcodeproj/Witness_Info.plist; 272 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; 273 | OTHER_CFLAGS = "$(inherited)"; 274 | OTHER_LDFLAGS = "$(inherited)"; 275 | OTHER_SWIFT_FLAGS = "$(inherited)"; 276 | PRODUCT_BUNDLE_IDENTIFIER = Witness; 277 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; 278 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 279 | SKIP_INSTALL = YES; 280 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; 281 | SWIFT_VERSION = 5.0; 282 | TARGET_NAME = Witness; 283 | }; 284 | name = Debug; 285 | }; 286 | OBJ_22 /* Release */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ENABLE_TESTABILITY = YES; 290 | FRAMEWORK_SEARCH_PATHS = ( 291 | "$(inherited)", 292 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 293 | ); 294 | HEADER_SEARCH_PATHS = "$(inherited)"; 295 | INFOPLIST_FILE = Witness.xcodeproj/Witness_Info.plist; 296 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; 297 | OTHER_CFLAGS = "$(inherited)"; 298 | OTHER_LDFLAGS = "$(inherited)"; 299 | OTHER_SWIFT_FLAGS = "$(inherited)"; 300 | PRODUCT_BUNDLE_IDENTIFIER = Witness; 301 | PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; 302 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 303 | SKIP_INSTALL = YES; 304 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; 305 | SWIFT_VERSION = 5.0; 306 | TARGET_NAME = Witness; 307 | }; 308 | name = Release; 309 | }; 310 | OBJ_3 /* Debug */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 314 | CLANG_ENABLE_OBJC_ARC = YES; 315 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 316 | CLANG_WARN_BOOL_CONVERSION = YES; 317 | CLANG_WARN_COMMA = YES; 318 | CLANG_WARN_CONSTANT_CONVERSION = YES; 319 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 320 | CLANG_WARN_EMPTY_BODY = YES; 321 | CLANG_WARN_ENUM_CONVERSION = YES; 322 | CLANG_WARN_INFINITE_RECURSION = YES; 323 | CLANG_WARN_INT_CONVERSION = YES; 324 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 325 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 326 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 327 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 328 | CLANG_WARN_STRICT_PROTOTYPES = YES; 329 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 330 | CLANG_WARN_UNREACHABLE_CODE = YES; 331 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 332 | COMBINE_HIDPI_IMAGES = YES; 333 | COPY_PHASE_STRIP = NO; 334 | DEBUG_INFORMATION_FORMAT = dwarf; 335 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 336 | ENABLE_NS_ASSERTIONS = YES; 337 | ENABLE_STRICT_OBJC_MSGSEND = YES; 338 | ENABLE_TESTABILITY = YES; 339 | GCC_NO_COMMON_BLOCKS = YES; 340 | GCC_OPTIMIZATION_LEVEL = 0; 341 | GCC_PREPROCESSOR_DEFINITIONS = ( 342 | "DEBUG=1", 343 | "$(inherited)", 344 | ); 345 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 346 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 347 | GCC_WARN_UNDECLARED_SELECTOR = YES; 348 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 349 | GCC_WARN_UNUSED_FUNCTION = YES; 350 | GCC_WARN_UNUSED_VARIABLE = YES; 351 | MACOSX_DEPLOYMENT_TARGET = 10.10; 352 | ONLY_ACTIVE_ARCH = YES; 353 | OTHER_SWIFT_FLAGS = "-DXcode"; 354 | PRODUCT_NAME = "$(TARGET_NAME)"; 355 | SDKROOT = macosx; 356 | SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; 357 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "SWIFT_PACKAGE DEBUG"; 358 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 359 | USE_HEADERMAP = NO; 360 | }; 361 | name = Debug; 362 | }; 363 | OBJ_30 /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | LD = /usr/bin/true; 367 | OTHER_SWIFT_FLAGS = "-swift-version 4.2 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; 368 | SWIFT_VERSION = 4.2; 369 | }; 370 | name = Debug; 371 | }; 372 | OBJ_31 /* Release */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | LD = /usr/bin/true; 376 | OTHER_SWIFT_FLAGS = "-swift-version 4.2 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"; 377 | SWIFT_VERSION = 4.2; 378 | }; 379 | name = Release; 380 | }; 381 | OBJ_36 /* Debug */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | }; 385 | name = Debug; 386 | }; 387 | OBJ_37 /* Release */ = { 388 | isa = XCBuildConfiguration; 389 | buildSettings = { 390 | }; 391 | name = Release; 392 | }; 393 | OBJ_4 /* Release */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_COMMA = YES; 401 | CLANG_WARN_CONSTANT_CONVERSION = YES; 402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 403 | CLANG_WARN_EMPTY_BODY = YES; 404 | CLANG_WARN_ENUM_CONVERSION = YES; 405 | CLANG_WARN_INFINITE_RECURSION = YES; 406 | CLANG_WARN_INT_CONVERSION = YES; 407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 410 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 411 | CLANG_WARN_STRICT_PROTOTYPES = YES; 412 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | COMBINE_HIDPI_IMAGES = YES; 416 | COPY_PHASE_STRIP = YES; 417 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 418 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 419 | ENABLE_STRICT_OBJC_MSGSEND = YES; 420 | GCC_NO_COMMON_BLOCKS = YES; 421 | GCC_OPTIMIZATION_LEVEL = s; 422 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 423 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 424 | GCC_WARN_UNDECLARED_SELECTOR = YES; 425 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 426 | GCC_WARN_UNUSED_FUNCTION = YES; 427 | GCC_WARN_UNUSED_VARIABLE = YES; 428 | MACOSX_DEPLOYMENT_TARGET = 10.10; 429 | OTHER_SWIFT_FLAGS = "-DXcode"; 430 | PRODUCT_NAME = "$(TARGET_NAME)"; 431 | SDKROOT = macosx; 432 | SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; 433 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; 434 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 435 | USE_HEADERMAP = NO; 436 | }; 437 | name = Release; 438 | }; 439 | OBJ_41 /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | buildSettings = { 442 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 443 | CLANG_ENABLE_MODULES = YES; 444 | FRAMEWORK_SEARCH_PATHS = ( 445 | "$(inherited)", 446 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 447 | ); 448 | HEADER_SEARCH_PATHS = "$(inherited)"; 449 | INFOPLIST_FILE = Witness.xcodeproj/WitnessTests_Info.plist; 450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; 451 | OTHER_CFLAGS = "$(inherited)"; 452 | OTHER_LDFLAGS = "$(inherited)"; 453 | OTHER_SWIFT_FLAGS = "$(inherited)"; 454 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; 455 | SWIFT_VERSION = 4.2; 456 | TARGET_NAME = WitnessTests; 457 | }; 458 | name = Debug; 459 | }; 460 | OBJ_42 /* Release */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 464 | CLANG_ENABLE_MODULES = YES; 465 | FRAMEWORK_SEARCH_PATHS = ( 466 | "$(inherited)", 467 | "$(PLATFORM_DIR)/Developer/Library/Frameworks", 468 | ); 469 | HEADER_SEARCH_PATHS = "$(inherited)"; 470 | INFOPLIST_FILE = Witness.xcodeproj/WitnessTests_Info.plist; 471 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; 472 | OTHER_CFLAGS = "$(inherited)"; 473 | OTHER_LDFLAGS = "$(inherited)"; 474 | OTHER_SWIFT_FLAGS = "$(inherited)"; 475 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; 476 | SWIFT_VERSION = 4.2; 477 | TARGET_NAME = WitnessTests; 478 | }; 479 | name = Release; 480 | }; 481 | /* End XCBuildConfiguration section */ 482 | 483 | /* Begin XCConfigurationList section */ 484 | OBJ_2 /* Build configuration list for PBXProject "Witness" */ = { 485 | isa = XCConfigurationList; 486 | buildConfigurations = ( 487 | OBJ_3 /* Debug */, 488 | OBJ_4 /* Release */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | OBJ_20 /* Build configuration list for PBXNativeTarget "Witness" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | OBJ_21 /* Debug */, 497 | OBJ_22 /* Release */, 498 | ); 499 | defaultConfigurationIsVisible = 0; 500 | defaultConfigurationName = Release; 501 | }; 502 | OBJ_29 /* Build configuration list for PBXNativeTarget "WitnessPackageDescription" */ = { 503 | isa = XCConfigurationList; 504 | buildConfigurations = ( 505 | OBJ_30 /* Debug */, 506 | OBJ_31 /* Release */, 507 | ); 508 | defaultConfigurationIsVisible = 0; 509 | defaultConfigurationName = Release; 510 | }; 511 | OBJ_35 /* Build configuration list for PBXAggregateTarget "WitnessPackageTests" */ = { 512 | isa = XCConfigurationList; 513 | buildConfigurations = ( 514 | OBJ_36 /* Debug */, 515 | OBJ_37 /* Release */, 516 | ); 517 | defaultConfigurationIsVisible = 0; 518 | defaultConfigurationName = Release; 519 | }; 520 | OBJ_40 /* Build configuration list for PBXNativeTarget "WitnessTests" */ = { 521 | isa = XCConfigurationList; 522 | buildConfigurations = ( 523 | OBJ_41 /* Debug */, 524 | OBJ_42 /* Release */, 525 | ); 526 | defaultConfigurationIsVisible = 0; 527 | defaultConfigurationName = Release; 528 | }; 529 | /* End XCConfigurationList section */ 530 | }; 531 | rootObject = OBJ_1 /* Project object */; 532 | } 533 | -------------------------------------------------------------------------------- /Witness.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /Witness.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Witness.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | -------------------------------------------------------------------------------- /Witness.xcodeproj/xcshareddata/xcschemes/Witness-Package.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 55 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 74 | 76 | 77 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Witness.xcodeproj/xcshareddata/xcschemes/Witness.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 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /WitnessDemo/WitnessDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B30EE3EE2283430E000A3DDE /* Witness.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B30EE3E9228342FD000A3DDE /* Witness.framework */; }; 11 | B30EE3EF2283430E000A3DDE /* Witness.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B30EE3E9228342FD000A3DDE /* Witness.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 12 | FD8F2FE81D06C87E004B9DD4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD8F2FE71D06C87E004B9DD4 /* AppDelegate.swift */; }; 13 | FD8F2FEA1D06C87E004B9DD4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD8F2FE91D06C87E004B9DD4 /* ViewController.swift */; }; 14 | FD8F2FEC1D06C87E004B9DD4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FD8F2FEB1D06C87E004B9DD4 /* Assets.xcassets */; }; 15 | FD8F2FEF1D06C87E004B9DD4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FD8F2FED1D06C87E004B9DD4 /* Main.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | B30EE3E8228342FD000A3DDE /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = B30EE3E1228342FD000A3DDE /* Witness.xcodeproj */; 22 | proxyType = 2; 23 | remoteGlobalIDString = "Witness::Witness::Product"; 24 | remoteInfo = Witness; 25 | }; 26 | B30EE3EA228342FD000A3DDE /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = B30EE3E1228342FD000A3DDE /* Witness.xcodeproj */; 29 | proxyType = 2; 30 | remoteGlobalIDString = "Witness::WitnessTests::Product"; 31 | remoteInfo = WitnessTests; 32 | }; 33 | B30EE3F02283430E000A3DDE /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = B30EE3E1228342FD000A3DDE /* Witness.xcodeproj */; 36 | proxyType = 1; 37 | remoteGlobalIDString = "Witness::Witness"; 38 | remoteInfo = Witness; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXCopyFilesBuildPhase section */ 43 | FD8F30001D06EE28004B9DD4 /* Embed Frameworks */ = { 44 | isa = PBXCopyFilesBuildPhase; 45 | buildActionMask = 2147483647; 46 | dstPath = ""; 47 | dstSubfolderSpec = 10; 48 | files = ( 49 | B30EE3EF2283430E000A3DDE /* Witness.framework in Embed Frameworks */, 50 | ); 51 | name = "Embed Frameworks"; 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXCopyFilesBuildPhase section */ 55 | 56 | /* Begin PBXFileReference section */ 57 | B30EE3E1228342FD000A3DDE /* Witness.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Witness.xcodeproj; path = ../Witness.xcodeproj; sourceTree = ""; }; 58 | FD8F2FE41D06C87E004B9DD4 /* WitnessDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WitnessDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | FD8F2FE71D06C87E004B9DD4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 60 | FD8F2FE91D06C87E004B9DD4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 61 | FD8F2FEB1D06C87E004B9DD4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 62 | FD8F2FEE1D06C87E004B9DD4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 63 | FD8F2FF01D06C87E004B9DD4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | /* End PBXFileReference section */ 65 | 66 | /* Begin PBXFrameworksBuildPhase section */ 67 | FD8F2FE11D06C87E004B9DD4 /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | B30EE3EE2283430E000A3DDE /* Witness.framework in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | B30EE3E2228342FD000A3DDE /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | B30EE3E9228342FD000A3DDE /* Witness.framework */, 82 | B30EE3EB228342FD000A3DDE /* WitnessTests.xctest */, 83 | ); 84 | name = Products; 85 | sourceTree = ""; 86 | }; 87 | FD8F2FDB1D06C87E004B9DD4 = { 88 | isa = PBXGroup; 89 | children = ( 90 | B30EE3E1228342FD000A3DDE /* Witness.xcodeproj */, 91 | FD8F2FE61D06C87E004B9DD4 /* WitnessDemo */, 92 | FD8F2FE51D06C87E004B9DD4 /* Products */, 93 | ); 94 | sourceTree = ""; 95 | }; 96 | FD8F2FE51D06C87E004B9DD4 /* Products */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | FD8F2FE41D06C87E004B9DD4 /* WitnessDemo.app */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | FD8F2FE61D06C87E004B9DD4 /* WitnessDemo */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | FD8F2FE71D06C87E004B9DD4 /* AppDelegate.swift */, 108 | FD8F2FE91D06C87E004B9DD4 /* ViewController.swift */, 109 | FD8F2FEB1D06C87E004B9DD4 /* Assets.xcassets */, 110 | FD8F2FED1D06C87E004B9DD4 /* Main.storyboard */, 111 | FD8F2FF01D06C87E004B9DD4 /* Info.plist */, 112 | ); 113 | path = WitnessDemo; 114 | sourceTree = ""; 115 | }; 116 | /* End PBXGroup section */ 117 | 118 | /* Begin PBXNativeTarget section */ 119 | FD8F2FE31D06C87E004B9DD4 /* WitnessDemo */ = { 120 | isa = PBXNativeTarget; 121 | buildConfigurationList = FD8F2FF31D06C87E004B9DD4 /* Build configuration list for PBXNativeTarget "WitnessDemo" */; 122 | buildPhases = ( 123 | FD8F2FE01D06C87E004B9DD4 /* Sources */, 124 | FD8F2FE11D06C87E004B9DD4 /* Frameworks */, 125 | FD8F2FE21D06C87E004B9DD4 /* Resources */, 126 | FD8F30001D06EE28004B9DD4 /* Embed Frameworks */, 127 | ); 128 | buildRules = ( 129 | ); 130 | dependencies = ( 131 | B30EE3F12283430E000A3DDE /* PBXTargetDependency */, 132 | ); 133 | name = WitnessDemo; 134 | productName = WitnessDemo; 135 | productReference = FD8F2FE41D06C87E004B9DD4 /* WitnessDemo.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | /* End PBXNativeTarget section */ 139 | 140 | /* Begin PBXProject section */ 141 | FD8F2FDC1D06C87E004B9DD4 /* Project object */ = { 142 | isa = PBXProject; 143 | attributes = { 144 | LastSwiftUpdateCheck = 0730; 145 | LastUpgradeCheck = 1020; 146 | ORGANIZATIONNAME = "Invisible Pixel"; 147 | TargetAttributes = { 148 | FD8F2FE31D06C87E004B9DD4 = { 149 | CreatedOnToolsVersion = 7.3.1; 150 | }; 151 | }; 152 | }; 153 | buildConfigurationList = FD8F2FDF1D06C87E004B9DD4 /* Build configuration list for PBXProject "WitnessDemo" */; 154 | compatibilityVersion = "Xcode 3.2"; 155 | developmentRegion = en; 156 | hasScannedForEncodings = 0; 157 | knownRegions = ( 158 | en, 159 | Base, 160 | ); 161 | mainGroup = FD8F2FDB1D06C87E004B9DD4; 162 | productRefGroup = FD8F2FE51D06C87E004B9DD4 /* Products */; 163 | projectDirPath = ""; 164 | projectReferences = ( 165 | { 166 | ProductGroup = B30EE3E2228342FD000A3DDE /* Products */; 167 | ProjectRef = B30EE3E1228342FD000A3DDE /* Witness.xcodeproj */; 168 | }, 169 | ); 170 | projectRoot = ""; 171 | targets = ( 172 | FD8F2FE31D06C87E004B9DD4 /* WitnessDemo */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXReferenceProxy section */ 178 | B30EE3E9228342FD000A3DDE /* Witness.framework */ = { 179 | isa = PBXReferenceProxy; 180 | fileType = wrapper.framework; 181 | path = Witness.framework; 182 | remoteRef = B30EE3E8228342FD000A3DDE /* PBXContainerItemProxy */; 183 | sourceTree = BUILT_PRODUCTS_DIR; 184 | }; 185 | B30EE3EB228342FD000A3DDE /* WitnessTests.xctest */ = { 186 | isa = PBXReferenceProxy; 187 | fileType = wrapper.cfbundle; 188 | path = WitnessTests.xctest; 189 | remoteRef = B30EE3EA228342FD000A3DDE /* PBXContainerItemProxy */; 190 | sourceTree = BUILT_PRODUCTS_DIR; 191 | }; 192 | /* End PBXReferenceProxy section */ 193 | 194 | /* Begin PBXResourcesBuildPhase section */ 195 | FD8F2FE21D06C87E004B9DD4 /* Resources */ = { 196 | isa = PBXResourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | FD8F2FEC1D06C87E004B9DD4 /* Assets.xcassets in Resources */, 200 | FD8F2FEF1D06C87E004B9DD4 /* Main.storyboard in Resources */, 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | /* End PBXResourcesBuildPhase section */ 205 | 206 | /* Begin PBXSourcesBuildPhase section */ 207 | FD8F2FE01D06C87E004B9DD4 /* Sources */ = { 208 | isa = PBXSourcesBuildPhase; 209 | buildActionMask = 2147483647; 210 | files = ( 211 | FD8F2FEA1D06C87E004B9DD4 /* ViewController.swift in Sources */, 212 | FD8F2FE81D06C87E004B9DD4 /* AppDelegate.swift in Sources */, 213 | ); 214 | runOnlyForDeploymentPostprocessing = 0; 215 | }; 216 | /* End PBXSourcesBuildPhase section */ 217 | 218 | /* Begin PBXTargetDependency section */ 219 | B30EE3F12283430E000A3DDE /* PBXTargetDependency */ = { 220 | isa = PBXTargetDependency; 221 | name = Witness; 222 | targetProxy = B30EE3F02283430E000A3DDE /* PBXContainerItemProxy */; 223 | }; 224 | /* End PBXTargetDependency section */ 225 | 226 | /* Begin PBXVariantGroup section */ 227 | FD8F2FED1D06C87E004B9DD4 /* Main.storyboard */ = { 228 | isa = PBXVariantGroup; 229 | children = ( 230 | FD8F2FEE1D06C87E004B9DD4 /* Base */, 231 | ); 232 | name = Main.storyboard; 233 | sourceTree = ""; 234 | }; 235 | /* End PBXVariantGroup section */ 236 | 237 | /* Begin XCBuildConfiguration section */ 238 | FD8F2FF11D06C87E004B9DD4 /* Debug */ = { 239 | isa = XCBuildConfiguration; 240 | buildSettings = { 241 | ALWAYS_SEARCH_USER_PATHS = NO; 242 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 243 | CLANG_ANALYZER_NONNULL = YES; 244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 245 | CLANG_CXX_LIBRARY = "libc++"; 246 | CLANG_ENABLE_MODULES = YES; 247 | CLANG_ENABLE_OBJC_ARC = YES; 248 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 249 | CLANG_WARN_BOOL_CONVERSION = YES; 250 | CLANG_WARN_COMMA = YES; 251 | CLANG_WARN_CONSTANT_CONVERSION = YES; 252 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 254 | CLANG_WARN_EMPTY_BODY = YES; 255 | CLANG_WARN_ENUM_CONVERSION = YES; 256 | CLANG_WARN_INFINITE_RECURSION = YES; 257 | CLANG_WARN_INT_CONVERSION = YES; 258 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 259 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 260 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 261 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 262 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 263 | CLANG_WARN_STRICT_PROTOTYPES = YES; 264 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 265 | CLANG_WARN_UNREACHABLE_CODE = YES; 266 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 267 | CODE_SIGN_IDENTITY = "-"; 268 | COPY_PHASE_STRIP = NO; 269 | DEBUG_INFORMATION_FORMAT = dwarf; 270 | ENABLE_STRICT_OBJC_MSGSEND = YES; 271 | ENABLE_TESTABILITY = YES; 272 | GCC_C_LANGUAGE_STANDARD = gnu99; 273 | GCC_DYNAMIC_NO_PIC = NO; 274 | GCC_NO_COMMON_BLOCKS = YES; 275 | GCC_OPTIMIZATION_LEVEL = 0; 276 | GCC_PREPROCESSOR_DEFINITIONS = ( 277 | "DEBUG=1", 278 | "$(inherited)", 279 | ); 280 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 281 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 282 | GCC_WARN_UNDECLARED_SELECTOR = YES; 283 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 284 | GCC_WARN_UNUSED_FUNCTION = YES; 285 | GCC_WARN_UNUSED_VARIABLE = YES; 286 | MACOSX_DEPLOYMENT_TARGET = 10.11; 287 | MTL_ENABLE_DEBUG_INFO = YES; 288 | ONLY_ACTIVE_ARCH = YES; 289 | SDKROOT = macosx; 290 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 291 | }; 292 | name = Debug; 293 | }; 294 | FD8F2FF21D06C87E004B9DD4 /* Release */ = { 295 | isa = XCBuildConfiguration; 296 | buildSettings = { 297 | ALWAYS_SEARCH_USER_PATHS = NO; 298 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 299 | CLANG_ANALYZER_NONNULL = YES; 300 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 301 | CLANG_CXX_LIBRARY = "libc++"; 302 | CLANG_ENABLE_MODULES = YES; 303 | CLANG_ENABLE_OBJC_ARC = YES; 304 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 305 | CLANG_WARN_BOOL_CONVERSION = YES; 306 | CLANG_WARN_COMMA = YES; 307 | CLANG_WARN_CONSTANT_CONVERSION = YES; 308 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 309 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 310 | CLANG_WARN_EMPTY_BODY = YES; 311 | CLANG_WARN_ENUM_CONVERSION = YES; 312 | CLANG_WARN_INFINITE_RECURSION = YES; 313 | CLANG_WARN_INT_CONVERSION = YES; 314 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 315 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 316 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 317 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 318 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 319 | CLANG_WARN_STRICT_PROTOTYPES = YES; 320 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 321 | CLANG_WARN_UNREACHABLE_CODE = YES; 322 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 323 | CODE_SIGN_IDENTITY = "-"; 324 | COPY_PHASE_STRIP = NO; 325 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 326 | ENABLE_NS_ASSERTIONS = NO; 327 | ENABLE_STRICT_OBJC_MSGSEND = YES; 328 | GCC_C_LANGUAGE_STANDARD = gnu99; 329 | GCC_NO_COMMON_BLOCKS = YES; 330 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 331 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 332 | GCC_WARN_UNDECLARED_SELECTOR = YES; 333 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 334 | GCC_WARN_UNUSED_FUNCTION = YES; 335 | GCC_WARN_UNUSED_VARIABLE = YES; 336 | MACOSX_DEPLOYMENT_TARGET = 10.11; 337 | MTL_ENABLE_DEBUG_INFO = NO; 338 | SDKROOT = macosx; 339 | SWIFT_COMPILATION_MODE = wholemodule; 340 | }; 341 | name = Release; 342 | }; 343 | FD8F2FF41D06C87E004B9DD4 /* Debug */ = { 344 | isa = XCBuildConfiguration; 345 | buildSettings = { 346 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 347 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 348 | COMBINE_HIDPI_IMAGES = YES; 349 | FRAMEWORK_SEARCH_PATHS = ( 350 | "$(inherited)", 351 | "$(PROJECT_DIR)/../Carthage/Build/Mac", 352 | ); 353 | INFOPLIST_FILE = WitnessDemo/Info.plist; 354 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 355 | PRODUCT_BUNDLE_IDENTIFIER = com.invisiblepixel.WitnessDemo; 356 | PRODUCT_NAME = "$(TARGET_NAME)"; 357 | SWIFT_VERSION = 5.0; 358 | }; 359 | name = Debug; 360 | }; 361 | FD8F2FF51D06C87E004B9DD4 /* Release */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 365 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 366 | COMBINE_HIDPI_IMAGES = YES; 367 | FRAMEWORK_SEARCH_PATHS = ( 368 | "$(inherited)", 369 | "$(PROJECT_DIR)/../Carthage/Build/Mac", 370 | ); 371 | INFOPLIST_FILE = WitnessDemo/Info.plist; 372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 373 | PRODUCT_BUNDLE_IDENTIFIER = com.invisiblepixel.WitnessDemo; 374 | PRODUCT_NAME = "$(TARGET_NAME)"; 375 | SWIFT_VERSION = 5.0; 376 | }; 377 | name = Release; 378 | }; 379 | /* End XCBuildConfiguration section */ 380 | 381 | /* Begin XCConfigurationList section */ 382 | FD8F2FDF1D06C87E004B9DD4 /* Build configuration list for PBXProject "WitnessDemo" */ = { 383 | isa = XCConfigurationList; 384 | buildConfigurations = ( 385 | FD8F2FF11D06C87E004B9DD4 /* Debug */, 386 | FD8F2FF21D06C87E004B9DD4 /* Release */, 387 | ); 388 | defaultConfigurationIsVisible = 0; 389 | defaultConfigurationName = Release; 390 | }; 391 | FD8F2FF31D06C87E004B9DD4 /* Build configuration list for PBXNativeTarget "WitnessDemo" */ = { 392 | isa = XCConfigurationList; 393 | buildConfigurations = ( 394 | FD8F2FF41D06C87E004B9DD4 /* Debug */, 395 | FD8F2FF51D06C87E004B9DD4 /* Release */, 396 | ); 397 | defaultConfigurationIsVisible = 0; 398 | defaultConfigurationName = Release; 399 | }; 400 | /* End XCConfigurationList section */ 401 | }; 402 | rootObject = FD8F2FDC1D06C87E004B9DD4 /* Project object */; 403 | } 404 | -------------------------------------------------------------------------------- /WitnessDemo/WitnessDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WitnessDemo/WitnessDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WitnessDemo/WitnessDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WitnessDemo 4 | // 5 | // Created by Niels de Hoog on 07/06/16. 6 | // Copyright © 2016 Invisible Pixel. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import Witness 11 | 12 | @NSApplicationMain 13 | class AppDelegate: NSObject, NSApplicationDelegate { 14 | var witness: Witness? 15 | 16 | func applicationDidFinishLaunching(_ notification: Notification) { 17 | if let desktopPath = NSSearchPathForDirectoriesInDomains(.desktopDirectory, .userDomainMask, true).first { 18 | self.witness = Witness(paths: [desktopPath], flags: .FileEvents, latency: 0.3) { events in 19 | // create/delete or modify a file on the Desktop to see this event triggered 20 | print("file system events received: \(events)") 21 | } 22 | } 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /WitnessDemo/WitnessDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /WitnessDemo/WitnessDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | Default 510 | 511 | 512 | 513 | 514 | 515 | 516 | Left to Right 517 | 518 | 519 | 520 | 521 | 522 | 523 | Right to Left 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | Default 535 | 536 | 537 | 538 | 539 | 540 | 541 | Left to Right 542 | 543 | 544 | 545 | 546 | 547 | 548 | Right to Left 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | -------------------------------------------------------------------------------- /WitnessDemo/WitnessDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2016 Invisible Pixel. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /WitnessDemo/WitnessDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // WitnessDemo 4 | // 5 | // Created by Niels de Hoog on 07/06/16. 6 | // Copyright © 2016 Invisible Pixel. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | override var representedObject: Any? { 20 | didSet { 21 | // Update the view, if already loaded. 22 | } 23 | } 24 | 25 | 26 | } 27 | 28 | --------------------------------------------------------------------------------