diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..161179b --- /dev/null +++ b/.gitignore @@ -0,0 +1,68 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output diff --git a/MTMR.xcodeproj/project.pbxproj b/MTMR.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b78985f --- /dev/null +++ b/MTMR.xcodeproj/project.pbxproj @@ -0,0 +1,558 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + B082B253205C7D8000BC04DC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B082B252205C7D8000BC04DC /* AppDelegate.swift */; }; + B082B255205C7D8000BC04DC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B082B254205C7D8000BC04DC /* ViewController.swift */; }; + B082B257205C7D8000BC04DC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B082B256205C7D8000BC04DC /* Assets.xcassets */; }; + B082B25A205C7D8000BC04DC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B082B258205C7D8000BC04DC /* Main.storyboard */; }; + B082B266205C7D8000BC04DC /* MTMRTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B082B265205C7D8000BC04DC /* MTMRTests.swift */; }; + B082B271205C7D8000BC04DC /* MTMRUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B082B270205C7D8000BC04DC /* MTMRUITests.swift */; }; + B0C1CFCA205C97D30021C862 /* WindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0C1CFC9205C97D30021C862 /* WindowController.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + B082B262205C7D8000BC04DC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B082B247205C7D8000BC04DC /* Project object */; + proxyType = 1; + remoteGlobalIDString = B082B24E205C7D8000BC04DC; + remoteInfo = MTMR; + }; + B082B26D205C7D8000BC04DC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = B082B247205C7D8000BC04DC /* Project object */; + proxyType = 1; + remoteGlobalIDString = B082B24E205C7D8000BC04DC; + remoteInfo = MTMR; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + B082B24F205C7D8000BC04DC /* MTMR.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MTMR.app; sourceTree = BUILT_PRODUCTS_DIR; }; + B082B252205C7D8000BC04DC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + B082B254205C7D8000BC04DC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + B082B256205C7D8000BC04DC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + B082B259205C7D8000BC04DC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + B082B25B205C7D8000BC04DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B082B25C205C7D8000BC04DC /* MTMR.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MTMR.entitlements; sourceTree = ""; }; + B082B261205C7D8000BC04DC /* MTMRTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MTMRTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B082B265205C7D8000BC04DC /* MTMRTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MTMRTests.swift; sourceTree = ""; }; + B082B267205C7D8000BC04DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B082B26C205C7D8000BC04DC /* MTMRUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MTMRUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + B082B270205C7D8000BC04DC /* MTMRUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MTMRUITests.swift; sourceTree = ""; }; + B082B272205C7D8000BC04DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B0C1CFC9205C97D30021C862 /* WindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = WindowController.swift; path = ../WindowController.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + B082B24C205C7D8000BC04DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B082B25E205C7D8000BC04DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B082B269205C7D8000BC04DC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + B082B246205C7D8000BC04DC = { + isa = PBXGroup; + children = ( + B082B251205C7D8000BC04DC /* MTMR */, + B082B264205C7D8000BC04DC /* MTMRTests */, + B082B26F205C7D8000BC04DC /* MTMRUITests */, + B082B250205C7D8000BC04DC /* Products */, + ); + sourceTree = ""; + }; + B082B250205C7D8000BC04DC /* Products */ = { + isa = PBXGroup; + children = ( + B082B24F205C7D8000BC04DC /* MTMR.app */, + B082B261205C7D8000BC04DC /* MTMRTests.xctest */, + B082B26C205C7D8000BC04DC /* MTMRUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + B082B251205C7D8000BC04DC /* MTMR */ = { + isa = PBXGroup; + children = ( + B082B252205C7D8000BC04DC /* AppDelegate.swift */, + B082B254205C7D8000BC04DC /* ViewController.swift */, + B0C1CFC9205C97D30021C862 /* WindowController.swift */, + B082B256205C7D8000BC04DC /* Assets.xcassets */, + B082B258205C7D8000BC04DC /* Main.storyboard */, + B082B25B205C7D8000BC04DC /* Info.plist */, + B082B25C205C7D8000BC04DC /* MTMR.entitlements */, + ); + path = MTMR; + sourceTree = ""; + }; + B082B264205C7D8000BC04DC /* MTMRTests */ = { + isa = PBXGroup; + children = ( + B082B265205C7D8000BC04DC /* MTMRTests.swift */, + B082B267205C7D8000BC04DC /* Info.plist */, + ); + path = MTMRTests; + sourceTree = ""; + }; + B082B26F205C7D8000BC04DC /* MTMRUITests */ = { + isa = PBXGroup; + children = ( + B082B270205C7D8000BC04DC /* MTMRUITests.swift */, + B082B272205C7D8000BC04DC /* Info.plist */, + ); + path = MTMRUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + B082B24E205C7D8000BC04DC /* MTMR */ = { + isa = PBXNativeTarget; + buildConfigurationList = B082B275205C7D8000BC04DC /* Build configuration list for PBXNativeTarget "MTMR" */; + buildPhases = ( + B082B24B205C7D8000BC04DC /* Sources */, + B082B24C205C7D8000BC04DC /* Frameworks */, + B082B24D205C7D8000BC04DC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MTMR; + productName = MTMR; + productReference = B082B24F205C7D8000BC04DC /* MTMR.app */; + productType = "com.apple.product-type.application"; + }; + B082B260205C7D8000BC04DC /* MTMRTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B082B278205C7D8000BC04DC /* Build configuration list for PBXNativeTarget "MTMRTests" */; + buildPhases = ( + B082B25D205C7D8000BC04DC /* Sources */, + B082B25E205C7D8000BC04DC /* Frameworks */, + B082B25F205C7D8000BC04DC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B082B263205C7D8000BC04DC /* PBXTargetDependency */, + ); + name = MTMRTests; + productName = MTMRTests; + productReference = B082B261205C7D8000BC04DC /* MTMRTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + B082B26B205C7D8000BC04DC /* MTMRUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = B082B27B205C7D8000BC04DC /* Build configuration list for PBXNativeTarget "MTMRUITests" */; + buildPhases = ( + B082B268205C7D8000BC04DC /* Sources */, + B082B269205C7D8000BC04DC /* Frameworks */, + B082B26A205C7D8000BC04DC /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B082B26E205C7D8000BC04DC /* PBXTargetDependency */, + ); + name = MTMRUITests; + productName = MTMRUITests; + productReference = B082B26C205C7D8000BC04DC /* MTMRUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + B082B247205C7D8000BC04DC /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0920; + ORGANIZATIONNAME = "Anton Palgunov"; + TargetAttributes = { + B082B24E205C7D8000BC04DC = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + B082B260205C7D8000BC04DC = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + TestTargetID = B082B24E205C7D8000BC04DC; + }; + B082B26B205C7D8000BC04DC = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + TestTargetID = B082B24E205C7D8000BC04DC; + }; + }; + }; + buildConfigurationList = B082B24A205C7D8000BC04DC /* Build configuration list for PBXProject "MTMR" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = B082B246205C7D8000BC04DC; + productRefGroup = B082B250205C7D8000BC04DC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + B082B24E205C7D8000BC04DC /* MTMR */, + B082B260205C7D8000BC04DC /* MTMRTests */, + B082B26B205C7D8000BC04DC /* MTMRUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + B082B24D205C7D8000BC04DC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B082B257205C7D8000BC04DC /* Assets.xcassets in Resources */, + B082B25A205C7D8000BC04DC /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B082B25F205C7D8000BC04DC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B082B26A205C7D8000BC04DC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + B082B24B205C7D8000BC04DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B082B255205C7D8000BC04DC /* ViewController.swift in Sources */, + B0C1CFCA205C97D30021C862 /* WindowController.swift in Sources */, + B082B253205C7D8000BC04DC /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B082B25D205C7D8000BC04DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B082B266205C7D8000BC04DC /* MTMRTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B082B268205C7D8000BC04DC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B082B271205C7D8000BC04DC /* MTMRUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + B082B263205C7D8000BC04DC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B082B24E205C7D8000BC04DC /* MTMR */; + targetProxy = B082B262205C7D8000BC04DC /* PBXContainerItemProxy */; + }; + B082B26E205C7D8000BC04DC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = B082B24E205C7D8000BC04DC /* MTMR */; + targetProxy = B082B26D205C7D8000BC04DC /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + B082B258205C7D8000BC04DC /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + B082B259205C7D8000BC04DC /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + B082B273205C7D8000BC04DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + 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_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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + B082B274205C7D8000BC04DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + 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_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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + }; + name = Release; + }; + B082B276205C7D8000BC04DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = MTMR/MTMR.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = D6D8BR2QNB; + INFOPLIST_FILE = MTMR/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMR; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + }; + name = Debug; + }; + B082B277205C7D8000BC04DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = MTMR/MTMR.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = D6D8BR2QNB; + INFOPLIST_FILE = MTMR/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMR; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + B082B279205C7D8000BC04DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = D6D8BR2QNB; + INFOPLIST_FILE = MTMRTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MTMR.app/Contents/MacOS/MTMR"; + }; + name = Debug; + }; + B082B27A205C7D8000BC04DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = D6D8BR2QNB; + INFOPLIST_FILE = MTMRTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MTMR.app/Contents/MacOS/MTMR"; + }; + name = Release; + }; + B082B27C205C7D8000BC04DC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = D6D8BR2QNB; + INFOPLIST_FILE = MTMRUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TEST_TARGET_NAME = MTMR; + }; + name = Debug; + }; + B082B27D205C7D8000BC04DC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = D6D8BR2QNB; + INFOPLIST_FILE = MTMRUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TEST_TARGET_NAME = MTMR; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B082B24A205C7D8000BC04DC /* Build configuration list for PBXProject "MTMR" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B082B273205C7D8000BC04DC /* Debug */, + B082B274205C7D8000BC04DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B082B275205C7D8000BC04DC /* Build configuration list for PBXNativeTarget "MTMR" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B082B276205C7D8000BC04DC /* Debug */, + B082B277205C7D8000BC04DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B082B278205C7D8000BC04DC /* Build configuration list for PBXNativeTarget "MTMRTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B082B279205C7D8000BC04DC /* Debug */, + B082B27A205C7D8000BC04DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B082B27B205C7D8000BC04DC /* Build configuration list for PBXNativeTarget "MTMRUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B082B27C205C7D8000BC04DC /* Debug */, + B082B27D205C7D8000BC04DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = B082B247205C7D8000BC04DC /* Project object */; +} diff --git a/MTMR.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MTMR.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..404db79 --- /dev/null +++ b/MTMR.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MTMR/AppDelegate.swift b/MTMR/AppDelegate.swift new file mode 100644 index 0000000..feae374 --- /dev/null +++ b/MTMR/AppDelegate.swift @@ -0,0 +1,27 @@ +// +// AppDelegate.swift +// MTMR +// +// Created by Anton Palgunov on 16/03/2018. +// Copyright © 2018 Anton Palgunov. All rights reserved. +// + +import Cocoa + +@NSApplicationMain +class AppDelegate: NSObject, NSApplicationDelegate { + + + + func applicationDidFinishLaunching(_ aNotification: Notification) { + // Insert code here to initialize your application + + } + + func applicationWillTerminate(_ aNotification: Notification) { + // Insert code here to tear down your application + } + + +} + diff --git a/MTMR/Assets.xcassets/AppIcon.appiconset/Contents.json b/MTMR/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/MTMR/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MTMR/Base.lproj/Main.storyboard b/MTMR/Base.lproj/Main.storyboard new file mode 100644 index 0000000..1274c44 --- /dev/null +++ b/MTMR/Base.lproj/Main.storyboard @@ -0,0 +1,805 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MTMR/Info.plist b/MTMR/Info.plist new file mode 100644 index 0000000..9475e3d --- /dev/null +++ b/MTMR/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2018 Anton Palgunov. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/MTMR/MTMR.entitlements b/MTMR/MTMR.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/MTMR/MTMR.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/MTMR/ViewController.swift b/MTMR/ViewController.swift new file mode 100644 index 0000000..db56ed6 --- /dev/null +++ b/MTMR/ViewController.swift @@ -0,0 +1,27 @@ +// +// ViewController.swift +// MTMR +// +// Created by Anton Palgunov on 16/03/2018. +// Copyright © 2018 Anton Palgunov. All rights reserved. +// + +import Cocoa + +class ViewController: NSViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + override var representedObject: Any? { + didSet { + // Update the view, if already loaded. + } + } + + +} + diff --git a/MTMR/WindowController.swift b/MTMR/WindowController.swift new file mode 100644 index 0000000..7d992b2 --- /dev/null +++ b/MTMR/WindowController.swift @@ -0,0 +1,26 @@ +// +// WindowController.swift +// MTMR +// +// Created by Anton Palgunov on 16/03/2018. +// Copyright © 2018 Anton Palgunov. All rights reserved. +// + +import Cocoa + +fileprivate extension NSTouchBar.CustomizationIdentifier { + static let touchBar = NSTouchBar.CustomizationIdentifier("com.MTMR.touchBar") +} + +fileprivate extension NSTouchBarItem.Identifier { + static let popover = NSTouchBarItem.Identifier("com.MTMR.TouchBarItem.popover") + static let fontStyle = NSTouchBarItem.Identifier("com.MTMR.TouchBarItem.fontStyle") + static let popoverSlider = NSTouchBarItem.Identifier("com.MTMR.popoverBar.slider") +} + +class WindowController: NSWindowController, NSToolbarDelegate { + let FontSizeToolbarItemID = "FontSize" + let FontStyleToolbarItemID = "FontStyle" + let DefaultFontSize : Int = 18 +} + diff --git a/MTMRTests/Info.plist b/MTMRTests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/MTMRTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/MTMRTests/MTMRTests.swift b/MTMRTests/MTMRTests.swift new file mode 100644 index 0000000..aeab5e1 --- /dev/null +++ b/MTMRTests/MTMRTests.swift @@ -0,0 +1,36 @@ +// +// MTMRTests.swift +// MTMRTests +// +// Created by Anton Palgunov on 16/03/2018. +// Copyright © 2018 Anton Palgunov. All rights reserved. +// + +import XCTest +@testable import MTMR + +class MTMRTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/MTMRUITests/Info.plist b/MTMRUITests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/MTMRUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/MTMRUITests/MTMRUITests.swift b/MTMRUITests/MTMRUITests.swift new file mode 100644 index 0000000..da595e4 --- /dev/null +++ b/MTMRUITests/MTMRUITests.swift @@ -0,0 +1,36 @@ +// +// MTMRUITests.swift +// MTMRUITests +// +// Created by Anton Palgunov on 16/03/2018. +// Copyright © 2018 Anton Palgunov. All rights reserved. +// + +import XCTest + +class MTMRUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/WindowController.swift b/WindowController.swift new file mode 100644 index 0000000..dbfcd49 --- /dev/null +++ b/WindowController.swift @@ -0,0 +1,82 @@ +// +// WindowController.swift +// MTMR +// +// Created by Anton Palgunov on 17/03/2018. +// Copyright © 2018 Anton Palgunov. All rights reserved. +// + +import Cocoa + +class WindowController: NSWindowController { + + func volume(directon: String) { + var myAppleScript = "set volume output volume (output volume of (get volume settings) - 5)" + + if (directon == "up") { + myAppleScript = "set volume output volume (output volume of (get volume settings) + 5)" + } + + var error: NSDictionary? + if let scriptObject = NSAppleScript(source: myAppleScript) { + if let output: NSAppleEventDescriptor = scriptObject.executeAndReturnError( + &error) { + print(output.stringValue as Any) + } else if (error != nil) { + print("error: \(String(describing: error))") + } + } + } + + func brightness(directon: String) { + let CodeUp: UInt16 = 107 + let CodeDown: UInt16 = 113 + let src = CGEventSource(stateID: .hidSystemState) + + let upd = CGEvent(keyboardEventSource: src, virtualKey: CodeUp, keyDown: true) + let upu = CGEvent(keyboardEventSource: src, virtualKey: CodeUp, keyDown: false) + let downd = CGEvent(keyboardEventSource: src, virtualKey: CodeDown, keyDown: true) + let downu = CGEvent(keyboardEventSource: src, virtualKey: CodeDown, keyDown: false) + + let loc = CGEventTapLocation.cghidEventTap + + if (directon == "up") { + upd?.post(tap: loc) + upu?.post(tap: loc) + print(CodeUp) + } else { + downd?.post(tap: loc) + downu?.post(tap: loc) + print(CodeDown) + } + } + + + @IBAction func brightUp(_ sender: Any) { + NSHapticFeedbackManager.defaultPerformer.perform(.generic, performanceTime: .now) + brightness(directon: "up") + } + + @IBAction func brightDown(_ sender: Any) { + NSHapticFeedbackManager.defaultPerformer.perform(.alignment, performanceTime: .now) + brightness(directon: "down") + } + + + @IBAction func volumeUp(_ sender: Any) { + NSHapticFeedbackManager.defaultPerformer.perform(.levelChange, performanceTime: .now); + self.volume(directon: "up") + } + + @IBAction func volumeDown(_ sender: Any) { + NSHapticFeedbackManager.defaultPerformer.perform(.generic, performanceTime: .now) + self.volume(directon: "down") + } + + @IBOutlet weak var timeLabel: NSTextField! + + override func windowDidLoad() { + super.windowDidLoad() + + } +}