diff --git a/Podfile b/Podfile index ad69abf..765e499 100755 --- a/Podfile +++ b/Podfile @@ -2,7 +2,7 @@ platform :osx, '10.10' use_frameworks! target 'QBlocker' do - pod 'SRTabBarController' + pod 'SRTabBarController', :git => 'https://github.com/es-kumagai/SRTabBarController', :branch => 'swift-4.2' pod 'DevMateKit' pod 'RealmSwift' end diff --git a/Podfile.lock b/Podfile.lock index 4b34dd2..4c94e37 100755 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,21 +1,39 @@ PODS: - - DevMateKit (1.7.1) - - Realm (0.101.0): - - Realm/Headers (= 0.101.0) - - Realm/Headers (0.101.0) - - RealmSwift (0.101.0): - - Realm (= 0.101.0) + - DevMateKit (1.9.2) + - Realm (3.12.0): + - Realm/Headers (= 3.12.0) + - Realm/Headers (3.12.0) + - RealmSwift (3.12.0): + - Realm (= 3.12.0) - SRTabBarController (0.1.0) DEPENDENCIES: - DevMateKit - RealmSwift - - SRTabBarController + - SRTabBarController (from `https://github.com/es-kumagai/SRTabBarController`, branch `swift-4.2`) + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - DevMateKit + - Realm + - RealmSwift + +EXTERNAL SOURCES: + SRTabBarController: + :branch: swift-4.2 + :git: https://github.com/es-kumagai/SRTabBarController + +CHECKOUT OPTIONS: + SRTabBarController: + :commit: e8a177411da89eed41ec4192230550a1254598a1 + :git: https://github.com/es-kumagai/SRTabBarController SPEC CHECKSUMS: - DevMateKit: 3ba77083f5faa40266e0d2d70776de2a82c71dd0 - Realm: b21596d6d7e1c054f6fae967d27263d2593ca309 - RealmSwift: 5247501bcd68b9db3a718cba808e1ce45ba67034 + DevMateKit: 7900fa17efc254d318d5637559d96f7769dd0a2e + Realm: cdaef23c4ddb36ab1ddffed23f5a7f3332fc5585 + RealmSwift: 5576324033f0aa5ef1e0a839a3da2281dff47a7f SRTabBarController: aeb73a975a47aff9e14f3546da2394fce8271b09 -COCOAPODS: 0.39.0 +PODFILE CHECKSUM: 2194d8d8289ce95c05a038fac855c59f7ee0f912 + +COCOAPODS: 1.5.3 diff --git a/QBlocker.xcodeproj/project.pbxproj b/QBlocker.xcodeproj/project.pbxproj old mode 100755 new mode 100644 index edbba97..2f48b6e --- a/QBlocker.xcodeproj/project.pbxproj +++ b/QBlocker.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 07F0E51805F533AB1219CC1A /* Pods_QBlocker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9AE2D0BFC44767B8D2FE86C2 /* Pods_QBlocker.framework */; }; 13FA35AC1CF623C400A29767 /* ListMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13FA35AB1CF623C400A29767 /* ListMode.swift */; }; 280140151CDA9D5200BC2E78 /* AtLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280140141CDA9D5200BC2E78 /* AtLogin.swift */; }; 2832CA361CD688E9001D3373 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2832CA351CD688E9001D3373 /* AppDelegate.swift */; }; @@ -29,12 +30,11 @@ 28DEC8041CD950450012B5E3 /* HUDAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28DEC8031CD950450012B5E3 /* HUDAlert.swift */; }; 28DEC8061CD954EA0012B5E3 /* HUDView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28DEC8051CD954EA0012B5E3 /* HUDView.swift */; }; 28F40A711CFB61EB006719C8 /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28F40A701CFB61EB006719C8 /* TabBarController.swift */; }; - 89B8C5D3D02D89463E1239E8 /* Pods_QBlocker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1CE05FBCE54008C441D3CA3 /* Pods_QBlocker.framework */; }; + B1E907CE21AF8B460074B5DB /* CocoaSwiftSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E907CD21AF8B460074B5DB /* CocoaSwiftSupport.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 13FA35AB1CF623C400A29767 /* ListMode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListMode.swift; sourceTree = ""; }; - 18D302062F0781EB95263F14 /* Pods-QBlocker.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QBlocker.release.xcconfig"; path = "Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker.release.xcconfig"; sourceTree = ""; }; 280140141CDA9D5200BC2E78 /* AtLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AtLogin.swift; sourceTree = ""; }; 2832CA321CD688E9001D3373 /* QBlocker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QBlocker.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2832CA351CD688E9001D3373 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -59,8 +59,11 @@ 28DEC8031CD950450012B5E3 /* HUDAlert.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HUDAlert.swift; sourceTree = ""; }; 28DEC8051CD954EA0012B5E3 /* HUDView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HUDView.swift; sourceTree = ""; }; 28F40A701CFB61EB006719C8 /* TabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = ""; }; - C1CE05FBCE54008C441D3CA3 /* Pods_QBlocker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_QBlocker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - EAE265B701E85E6B909B8E2C /* Pods-QBlocker.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QBlocker.debug.xcconfig"; path = "Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker.debug.xcconfig"; sourceTree = ""; }; + 55B461F5EE3BE302188BAC0C /* Pods-QBlocker.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QBlocker.debug.xcconfig"; path = "Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker.debug.xcconfig"; sourceTree = ""; }; + 9AE2D0BFC44767B8D2FE86C2 /* Pods_QBlocker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_QBlocker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A3F762D47D17E2933604A226 /* Pods-QBlocker.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QBlocker.release.xcconfig"; path = "Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker.release.xcconfig"; sourceTree = ""; }; + B12B3DD321AEF3AC00BAE6B6 /* QBlocker.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = QBlocker.entitlements; sourceTree = ""; }; + B1E907CD21AF8B460074B5DB /* CocoaSwiftSupport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CocoaSwiftSupport.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,7 +71,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 89B8C5D3D02D89463E1239E8 /* Pods_QBlocker.framework in Frameworks */, + 07F0E51805F533AB1219CC1A /* Pods_QBlocker.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -90,6 +93,7 @@ isa = PBXGroup; children = ( 280140141CDA9D5200BC2E78 /* AtLogin.swift */, + B1E907CD21AF8B460074B5DB /* CocoaSwiftSupport.swift */, ); name = Utility; sourceTree = ""; @@ -99,8 +103,8 @@ children = ( 2832CA341CD688E9001D3373 /* QBlocker */, 2832CA331CD688E9001D3373 /* Products */, - 38D42208756B276FCDCB321A /* Pods */, - C44CD8B7A74F8347ECBD8138 /* Frameworks */, + 67690C1FE916FDD1AE76C543 /* Pods */, + C81D9C17284A4C49E807ED9E /* Frameworks */, ); sourceTree = ""; }; @@ -115,6 +119,7 @@ 2832CA341CD688E9001D3373 /* QBlocker */ = { isa = PBXGroup; children = ( + B12B3DD321AEF3AC00BAE6B6 /* QBlocker.entitlements */, 28A518591CDE415100BE7ED1 /* Preferences */, 280140161CDA9D9000BC2E78 /* Utility */, 280140131CDA9B4600BC2E78 /* First Launch */, @@ -164,19 +169,19 @@ name = Preferences; sourceTree = ""; }; - 38D42208756B276FCDCB321A /* Pods */ = { + 67690C1FE916FDD1AE76C543 /* Pods */ = { isa = PBXGroup; children = ( - EAE265B701E85E6B909B8E2C /* Pods-QBlocker.debug.xcconfig */, - 18D302062F0781EB95263F14 /* Pods-QBlocker.release.xcconfig */, + 55B461F5EE3BE302188BAC0C /* Pods-QBlocker.debug.xcconfig */, + A3F762D47D17E2933604A226 /* Pods-QBlocker.release.xcconfig */, ); name = Pods; sourceTree = ""; }; - C44CD8B7A74F8347ECBD8138 /* Frameworks */ = { + C81D9C17284A4C49E807ED9E /* Frameworks */ = { isa = PBXGroup; children = ( - C1CE05FBCE54008C441D3CA3 /* Pods_QBlocker.framework */, + 9AE2D0BFC44767B8D2FE86C2 /* Pods_QBlocker.framework */, ); name = Frameworks; sourceTree = ""; @@ -188,12 +193,12 @@ isa = PBXNativeTarget; buildConfigurationList = 2832CA411CD688E9001D3373 /* Build configuration list for PBXNativeTarget "QBlocker" */; buildPhases = ( - E382C6621D20D82AD3EE2371 /* Check Pods Manifest.lock */, + 845AE1320B9F2B12371D62FC /* [CP] Check Pods Manifest.lock */, 2832CA2E1CD688E9001D3373 /* Sources */, 2832CA2F1CD688E9001D3373 /* Frameworks */, 2832CA301CD688E9001D3373 /* Resources */, - A5F3978DEF0056344662D1D8 /* Embed Pods Frameworks */, - D83C7FD3BC174A7B11207BD0 /* Copy Pods Resources */, + A029F5A304AA443AB8C88A1B /* [CP] Embed Pods Frameworks */, + 9F8D02250EDD9278A6FB76B5 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -211,13 +216,17 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0730; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = "Cocoon Development Ltd"; TargetAttributes = { 2832CA311CD688E9001D3373 = { CreatedOnToolsVersion = 7.3; - DevelopmentTeam = B598AEF9ZM; + DevelopmentTeam = 89282N6UM7; + ProvisioningStyle = Automatic; SystemCapabilities = { + com.apple.HardenedRuntime = { + enabled = 0; + }; com.apple.Sandbox = { enabled = 0; }; @@ -257,49 +266,76 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - A5F3978DEF0056344662D1D8 /* Embed Pods Frameworks */ = { + 845AE1320B9F2B12371D62FC /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "Embed Pods Frameworks"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-QBlocker-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - D83C7FD3BC174A7B11207BD0 /* Copy Pods Resources */ = { + 9F8D02250EDD9278A6FB76B5 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker-resources.sh", + "${PODS_ROOT}/DevMateKit/DevMateKit.framework", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( ); - name = "Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DevMateKit.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker-resources.sh\"\n"; showEnvVarsInLog = 0; }; - E382C6621D20D82AD3EE2371 /* Check Pods Manifest.lock */ = { + A029F5A304AA443AB8C88A1B /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker-frameworks.sh", + "${PODS_ROOT}/DevMateKit/DevMateKit.framework", + "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework", + "${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework", + "${BUILT_PRODUCTS_DIR}/SRTabBarController/SRTabBarController.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( ); - name = "Check Pods Manifest.lock"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DevMateKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SRTabBarController.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-QBlocker/Pods-QBlocker-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -310,6 +346,7 @@ buildActionMask = 2147483647; files = ( 13FA35AC1CF623C400A29767 /* ListMode.swift in Sources */, + B1E907CE21AF8B460074B5DB /* CocoaSwiftSupport.swift in Sources */, 28DEC8061CD954EA0012B5E3 /* HUDView.swift in Sources */, 28A518631CDE91C200BE7ED1 /* ExcludeViewController + NSTableViewDataSource.swift in Sources */, 2853B63B1CD92D9700F186CE /* StatusMenuController.swift in Sources */, @@ -354,13 +391,23 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; @@ -387,6 +434,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -399,13 +447,23 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "-"; @@ -424,37 +482,47 @@ MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 4.2; }; name = Release; }; 2832CA421CD688E9001D3373 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EAE265B701E85E6B909B8E2C /* Pods-QBlocker.debug.xcconfig */; + baseConfigurationReference = 55B461F5EE3BE302188BAC0C /* Pods-QBlocker.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "Developer ID Application"; + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES; + CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 89282N6UM7; INFOPLIST_FILE = QBlocker/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_BUNDLE_IDENTIFIER = uk.co.wearecocoon.QBlocker; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/QBlocker/Bridge.h"; }; name = Debug; }; 2832CA431CD688E9001D3373 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 18D302062F0781EB95263F14 /* Pods-QBlocker.release.xcconfig */; + baseConfigurationReference = A3F762D47D17E2933604A226 /* Pods-QBlocker.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_IDENTITY = "Developer ID Application"; + CODE_SIGN_IDENTITY = "Mac Developer"; + CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES; + CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 89282N6UM7; INFOPLIST_FILE = QBlocker/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_BUNDLE_IDENTIFIER = uk.co.wearecocoon.QBlocker; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/QBlocker/Bridge.h"; }; name = Release; diff --git a/QBlocker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/QBlocker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/QBlocker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/QBlocker.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/QBlocker.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/QBlocker.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/QBlocker/AccessibilityViewController.swift b/QBlocker/AccessibilityViewController.swift index cdd2d36..310cad5 100644 --- a/QBlocker/AccessibilityViewController.swift +++ b/QBlocker/AccessibilityViewController.swift @@ -10,14 +10,14 @@ import Cocoa class AccessibilityViewController: NSViewController { - @IBAction func openPreferences(sender: AnyObject) { + @IBAction func openPreferences(_ sender: AnyObject) { - guard let scriptPath = NSBundle.mainBundle().pathForResource("OpenPreferences", ofType: "scpt") else { + guard let scriptPath = Bundle.main.path(forResource: "OpenPreferences", ofType: "scpt") else { print("Could not find applescript") return } - let task = NSTask() + let task = Process() task.launchPath = "/usr/bin/osascript" task.arguments = [scriptPath] task.launch() @@ -25,7 +25,4 @@ class AccessibilityViewController: NSViewController { // Quit the app NSApp.terminate(self) } - - - } diff --git a/QBlocker/AccessibilityWindowController.swift b/QBlocker/AccessibilityWindowController.swift index 64a50f7..68e00ef 100644 --- a/QBlocker/AccessibilityWindowController.swift +++ b/QBlocker/AccessibilityWindowController.swift @@ -13,9 +13,7 @@ class AccessibilityWindowController: NSWindowController { override func windowDidLoad() { super.windowDidLoad() - window?.level = Int(CGWindowLevelForKey(CGWindowLevelKey.PopUpMenuWindowLevelKey)) + window?.level = NSWindow.Level(.popUpMenuWindow) window?.titlebarAppearsTransparent = true - window?.backgroundColor = NSColor(calibratedHue:0.00, saturation:0.00, brightness:0.90, alpha:1.00) } - } diff --git a/QBlocker/App.swift b/QBlocker/App.swift index bbc05f5..1ca9d67 100644 --- a/QBlocker/App.swift +++ b/QBlocker/App.swift @@ -11,13 +11,13 @@ import RealmSwift class App: Object { /// The name of the app that will be displayed as a label - dynamic var name = "" + @objc dynamic var name = "" /// The bundle ID of the app. e.g. uk.co.wearecocoon.QBlocker - dynamic var bundleID = "" + @objc dynamic var bundleID = "" override static func primaryKey() -> String? { return "bundleID" } -} \ No newline at end of file +} diff --git a/QBlocker/AppDelegate.swift b/QBlocker/AppDelegate.swift index 933ccd8..76902b3 100644 --- a/QBlocker/AppDelegate.swift +++ b/QBlocker/AppDelegate.swift @@ -11,47 +11,47 @@ import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { - private var accessibilityWindowController: NSWindowController? + private var accessibilityWindowController: AccessibilityWindowController? private var firstRunWindowController: NSWindowController? private lazy var preferencesWindowController: NSWindowController = { - return NSStoryboard(name: "Main", bundle: nil).instantiateControllerWithIdentifier("preferences window") as! NSWindowController + return NSStoryboard(name: "Main", bundle: nil).instantiateController(withIdentifier: "preferences window") as! NSWindowController }() class var sharedDelegate: AppDelegate? { - return NSApplication.sharedApplication().delegate as? AppDelegate + return NSApplication.shared.delegate as? AppDelegate } // MARK: - Instantiation override init() { super.init() - NSUserDefaults.standardUserDefaults().registerDefaults([ + UserDefaults.standard.register(defaults: [ "accidentalQuits": 0, "firstRunComplete": false, - "listMode": 0, + "listMode": ListMode.blacklist.rawValue, "delay": 4 ]) } // MARK: - NSApplicationDelegate - func applicationDidFinishLaunching(aNotification: NSNotification) { + func applicationDidFinishLaunching(_ notification: Notification) { setupDevMate() - let promptFlag = kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString - let myDict: CFDictionary = [promptFlag: false] + let promptFlag = kAXTrustedCheckOptionPrompt.takeRetainedValue() + let myDict = [promptFlag: false] as CFDictionary if AXIsProcessTrustedWithOptions(myDict) { do { - try KeyListener.sharedKeyListener.start() + try KeyListener.shared.start() } catch { - NSLog("Could not launch listener") + print("Could not launch listener") } showFirstRunWindowIfRequired() } else { - if let windowController = NSStoryboard(name: "Main", bundle: nil).instantiateControllerWithIdentifier("accessibility window") as? NSWindowController { + if let windowController = NSStoryboard(name: "Main", bundle: nil).instantiateController(withIdentifier: "accessibility window") as? AccessibilityWindowController { accessibilityWindowController = windowController accessibilityWindowController?.showWindow(self) accessibilityWindowController?.window?.makeKeyAndOrderFront(self) @@ -66,16 +66,16 @@ class AppDelegate: NSObject, NSApplicationDelegate { Show the first run screen if the NSUserDefault stating it has already be run isn't set */ func showFirstRunWindowIfRequired() { - guard !NSUserDefaults.standardUserDefaults().boolForKey("firstRunComplete") else { + guard !UserDefaults.standard.bool(forKey: "firstRunComplete") else { return } - if let windowController = NSStoryboard(name: "Main", bundle: nil).instantiateControllerWithIdentifier("first run window") as? NSWindowController { + if let windowController = NSStoryboard(name: "Main", bundle: nil).instantiateController(withIdentifier: "first run window") as? NSWindowController { firstRunWindowController = windowController firstRunWindowController?.showWindow(self) firstRunWindowController?.window?.makeKeyAndOrderFront(self) - NSUserDefaults.standardUserDefaults().setBool(true, forKey: "firstRunComplete") + UserDefaults.standard.set(true, forKey: "firstRunComplete") } } @@ -83,8 +83,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { Bring the app into foreground and show the preferences window */ func showPreferencesWindow() { - NSApplication.sharedApplication().activateIgnoringOtherApps(true) - self.preferencesWindowController.showWindow(nil) + NSApplication.shared.activate(ignoringOtherApps: true) + preferencesWindowController.showWindow(nil) } /** @@ -93,8 +93,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { func setupDevMate() { DevMateKit.sendTrackingReport(nil, delegate: nil) DevMateKit.setupIssuesController(nil, reportingUnhandledIssues: true) - DM_SUUpdater.sharedUpdater().automaticallyChecksForUpdates = true - DM_SUUpdater.sharedUpdater().automaticallyDownloadsUpdates = true + DM_SUUpdater.shared().automaticallyChecksForUpdates = true + DM_SUUpdater.shared().automaticallyDownloadsUpdates = true } } diff --git a/QBlocker/AtLogin.swift b/QBlocker/AtLogin.swift index 22394ca..81e65fd 100644 --- a/QBlocker/AtLogin.swift +++ b/QBlocker/AtLogin.swift @@ -16,17 +16,12 @@ struct AtLogin { /// Whether launch at login is enabled or not static var enabled: Bool { - if launchItem != nil { - return true - } - - return false - + return launchItem != nil } /// The launch item that's stored in LSSharedFileList private static var launchItem: LSSharedFileListItem? { - let appUrl = NSURL(fileURLWithPath: NSBundle.mainBundle().bundlePath) + let appUrl = URL(fileURLWithPath: Bundle.main.bundlePath) guard let loginItemsRef = LSSharedFileListCreate(nil, kLSSharedFileListSessionLoginItems.takeRetainedValue(), nil) else { return nil @@ -36,12 +31,12 @@ struct AtLogin { for item in loginItems as NSArray { // Ensure that the item is a LSSharedFileListItem - guard CFGetTypeID(item) == LSSharedFileListItemGetTypeID() else { + guard CFGetTypeID(item as CFTypeRef) == LSSharedFileListItemGetTypeID() else { continue } var error: Unmanaged? - let itemUrl = LSSharedFileListItemCopyResolvedURL(item as! LSSharedFileListItem, 0, &error).takeRetainedValue() as NSURL + let itemUrl = LSSharedFileListItemCopyResolvedURL((item as! LSSharedFileListItem), 0, &error).takeRetainedValue() as URL if itemUrl == appUrl { return (item as! LSSharedFileListItem) @@ -64,10 +59,10 @@ struct AtLogin { if enabled { // remove it from the startup LSSharedFileListItemRemove(loginItems.takeRetainedValue(), launchItem) } else { // add it to the startup - let appUrl = NSURL(fileURLWithPath: NSBundle.mainBundle().bundlePath) + let appUrl = URL(fileURLWithPath: Bundle.main.bundlePath) LSSharedFileListInsertItemURL(loginItems.takeRetainedValue(), kLSSharedFileListItemBeforeFirst.takeUnretainedValue(), nil, nil, appUrl as CFURL, nil, nil) } } -} \ No newline at end of file +} diff --git a/QBlocker/Base.lproj/Main.storyboard b/QBlocker/Base.lproj/Main.storyboard index 6793a6a..75b5ecc 100644 --- a/QBlocker/Base.lproj/Main.storyboard +++ b/QBlocker/Base.lproj/Main.storyboard @@ -1,7 +1,9 @@ - - + + - + + + @@ -127,13 +129,10 @@ - - - - - + + @@ -143,6 +142,9 @@ + + + @@ -153,7 +155,7 @@ - + @@ -161,6 +163,9 @@ + + + @@ -186,54 +191,56 @@ - - - - - - - - - QBlocker uses OS X's accessibility features to block accidental quits. Please enable accessibility features for QBlocker in System Preferences and then re-open the app. - - - - - - - + + + + + + + + + + + + + + + + QBlocker uses OS X's accessibility features to block accidental quits. Please enable accessibility features for QBlocker in System Preferences and then re-open the app. + + + + + + - - + + + + + + + + + + - - - - - - + - - - - - + + - + @@ -246,11 +253,14 @@ - - + + + + + @@ -294,30 +304,22 @@ - - - - - - + + - + - - - - - - + + @@ -325,12 +327,8 @@ - - - - - - + + @@ -342,6 +340,8 @@ + + @@ -370,7 +370,7 @@ - + @@ -393,8 +393,8 @@ - - + + @@ -402,6 +402,11 @@ + + + + + @@ -415,59 +420,67 @@ - -