From d794f8537ee5f1fee78e5baa095ecadbec0aa64b Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Mon, 30 May 2022 15:25:56 +0700 Subject: [PATCH] Drop support for CocoaPods and Carthage --- .swiftlint.yml | 2 +- DockProgress.podspec | 13 - .../DockProgress_Info.plist | 18 - DockProgress.xcodeproj/project.pbxproj | 590 ------------------ .../xcschemes/DockProgress-Package.xcscheme | 67 -- .../xcschemes/DockProgressExample.xcscheme | 87 --- .../xcschemes/xcschememanagement.plist | 12 - Example/Base.lproj/MainMenu.xib | 65 -- .../project.pbxproj | 367 +++++++++++ Example/DockProgress Example/App.swift | 12 + .../AppState.swift} | 29 +- .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 6 +- .../Assets.xcassets/Contents.json | 6 + .../DockProgress_Example.entitlements | 8 + .../Preview Assets.xcassets/Contents.json | 6 + Example/Info.plist | 24 - Sources/DockProgress/DockProgress.swift | 4 +- 18 files changed, 435 insertions(+), 892 deletions(-) delete mode 100644 DockProgress.podspec delete mode 100644 DockProgress.xcodeproj/DockProgress_Info.plist delete mode 100644 DockProgress.xcodeproj/project.pbxproj delete mode 100644 DockProgress.xcodeproj/xcshareddata/xcschemes/DockProgress-Package.xcscheme delete mode 100644 DockProgress.xcodeproj/xcshareddata/xcschemes/DockProgressExample.xcscheme delete mode 100644 DockProgress.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist delete mode 100644 Example/Base.lproj/MainMenu.xib create mode 100644 Example/DockProgress Example.xcodeproj/project.pbxproj create mode 100644 Example/DockProgress Example/App.swift rename Example/{AppDelegate.swift => DockProgress Example/AppState.swift} (66%) create mode 100644 Example/DockProgress Example/Assets.xcassets/AccentColor.colorset/Contents.json rename Example/{Images.xcassets => DockProgress Example/Assets.xcassets}/AppIcon.appiconset/Contents.json (95%) create mode 100644 Example/DockProgress Example/Assets.xcassets/Contents.json create mode 100644 Example/DockProgress Example/DockProgress_Example.entitlements create mode 100644 Example/DockProgress Example/Preview Content/Preview Assets.xcassets/Contents.json delete mode 100644 Example/Info.plist diff --git a/.swiftlint.yml b/.swiftlint.yml index feb2a6a..e23b8c2 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -169,7 +169,7 @@ identifier_name: - 'y2' - 'z2' deployment_target: - macOS_deployment_target: '10.12' + macOS_deployment_target: '10.15' custom_rules: no_nsrect: regex: '\bNSRect\b' diff --git a/DockProgress.podspec b/DockProgress.podspec deleted file mode 100644 index 9f1a1e4..0000000 --- a/DockProgress.podspec +++ /dev/null @@ -1,13 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'DockProgress' - s.version = '3.2.0' - s.summary = 'Show progress in your app\'s Dock icon' - s.license = 'MIT' - s.homepage = 'https://github.com/sindresorhus/DockProgress' - s.social_media_url = 'https://twitter.com/sindresorhus' - s.authors = { 'Sindre Sorhus' => 'sindresorhus@gmail.com' } - s.source = { :git => 'https://github.com/sindresorhus/DockProgress.git', :tag => "v#{s.version}" } - s.source_files = 'Sources/**/*.swift' - s.swift_version = '5.5' - s.platform = :macos, '10.12' -end diff --git a/DockProgress.xcodeproj/DockProgress_Info.plist b/DockProgress.xcodeproj/DockProgress_Info.plist deleted file mode 100644 index 2499338..0000000 --- a/DockProgress.xcodeproj/DockProgress_Info.plist +++ /dev/null @@ -1,18 +0,0 @@ - - - - - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - - diff --git a/DockProgress.xcodeproj/project.pbxproj b/DockProgress.xcodeproj/project.pbxproj deleted file mode 100644 index ffa3737..0000000 --- a/DockProgress.xcodeproj/project.pbxproj +++ /dev/null @@ -1,590 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 55; - objects = { - -/* Begin PBXBuildFile section */ - E3FB30C420EA5DBC009BA1BD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3FB30C320EA5DBC009BA1BD /* AppDelegate.swift */; }; - E3FB30C920EA5DBE009BA1BD /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = E3FB30C720EA5DBE009BA1BD /* MainMenu.xib */; }; - E3FB30CF20EA5EBD009BA1BD /* DockProgress.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "DockProgress::DockProgress::Product" /* DockProgress.framework */; }; - E3FB30D020EA5EBD009BA1BD /* DockProgress.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = "DockProgress::DockProgress::Product" /* DockProgress.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - E3FEB1AB21DC4F70009C38CA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E3FEB1AA21DC4F70009C38CA /* Images.xcassets */; }; - OBJ_19 /* DockProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* DockProgress.swift */; }; - OBJ_20 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_10 /* Utilities.swift */; }; - OBJ_27 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - E3FB30D120EA5EBD009BA1BD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = OBJ_1 /* Project object */; - proxyType = 1; - remoteGlobalIDString = "DockProgress::DockProgress"; - remoteInfo = DockProgress; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - E3FB30D320EA5EBD009BA1BD /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - E3FB30D020EA5EBD009BA1BD /* DockProgress.framework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - "DockProgress::DockProgress::Product" /* DockProgress.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DockProgress.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E3FB30C120EA5DBC009BA1BD /* DockProgressExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DockProgressExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - E3FB30C320EA5DBC009BA1BD /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AppDelegate.swift; sourceTree = ""; usesTabs = 1; }; - E3FB30C820EA5DBE009BA1BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - E3FB30CA20EA5DBE009BA1BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E3FEB1AA21DC4F70009C38CA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - OBJ_10 /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Utilities.swift; sourceTree = ""; usesTabs = 1; }; - OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lineEnding = 0; path = Package.swift; sourceTree = ""; usesTabs = 1; }; - OBJ_9 /* DockProgress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = DockProgress.swift; sourceTree = ""; usesTabs = 1; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - E3FB30BE20EA5DBC009BA1BD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E3FB30CF20EA5EBD009BA1BD /* DockProgress.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - OBJ_21 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - E3FB30C220EA5DBC009BA1BD /* Example */ = { - isa = PBXGroup; - children = ( - E3FB30C320EA5DBC009BA1BD /* AppDelegate.swift */, - E3FB30C720EA5DBE009BA1BD /* MainMenu.xib */, - E3FB30CA20EA5DBE009BA1BD /* Info.plist */, - E3FEB1AA21DC4F70009C38CA /* Images.xcassets */, - ); - path = Example; - sourceTree = ""; - }; - OBJ_12 /* Products */ = { - isa = PBXGroup; - children = ( - "DockProgress::DockProgress::Product" /* DockProgress.framework */, - E3FB30C120EA5DBC009BA1BD /* DockProgressExample.app */, - ); - name = Products; - sourceTree = BUILT_PRODUCTS_DIR; - }; - OBJ_5 = { - isa = PBXGroup; - children = ( - OBJ_6 /* Package.swift */, - OBJ_7 /* Sources */, - E3FB30C220EA5DBC009BA1BD /* Example */, - OBJ_12 /* Products */, - ); - sourceTree = ""; - usesTabs = 1; - }; - OBJ_7 /* Sources */ = { - isa = PBXGroup; - children = ( - OBJ_8 /* DockProgress */, - ); - name = Sources; - sourceTree = SOURCE_ROOT; - }; - OBJ_8 /* DockProgress */ = { - isa = PBXGroup; - children = ( - OBJ_9 /* DockProgress.swift */, - OBJ_10 /* Utilities.swift */, - ); - name = DockProgress; - path = Sources/DockProgress; - sourceTree = SOURCE_ROOT; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - "DockProgress::DockProgress" /* DockProgress */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_15 /* Build configuration list for PBXNativeTarget "DockProgress" */; - buildPhases = ( - E3BFC67621FBB9B400C16B1A /* SwiftLint */, - OBJ_18 /* Sources */, - OBJ_21 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = DockProgress; - productName = DockProgress; - productReference = "DockProgress::DockProgress::Product" /* DockProgress.framework */; - productType = "com.apple.product-type.framework"; - }; - "DockProgress::SwiftPMPackageDescription" /* DockProgressPackageDescription */ = { - isa = PBXNativeTarget; - buildConfigurationList = OBJ_23 /* Build configuration list for PBXNativeTarget "DockProgressPackageDescription" */; - buildPhases = ( - OBJ_26 /* Sources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = DockProgressPackageDescription; - productName = DockProgressPackageDescription; - productType = "com.apple.product-type.framework"; - }; - E3FB30C020EA5DBC009BA1BD /* DockProgressExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = E3FB30CE20EA5DBE009BA1BD /* Build configuration list for PBXNativeTarget "DockProgressExample" */; - buildPhases = ( - E3FB30BD20EA5DBC009BA1BD /* Sources */, - E3FB30BE20EA5DBC009BA1BD /* Frameworks */, - E3FB30BF20EA5DBC009BA1BD /* Resources */, - E3FB30D320EA5EBD009BA1BD /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - E3FB30D220EA5EBD009BA1BD /* PBXTargetDependency */, - ); - name = DockProgressExample; - productName = DockProgressExample; - productReference = E3FB30C120EA5DBC009BA1BD /* DockProgressExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - OBJ_1 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0940; - LastUpgradeCheck = 1200; - TargetAttributes = { - "DockProgress::DockProgress" = { - LastSwiftMigration = 1020; - }; - E3FB30C020EA5DBC009BA1BD = { - CreatedOnToolsVersion = 9.4.1; - LastSwiftMigration = 1020; - }; - }; - }; - buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "DockProgress" */; - compatibilityVersion = "Xcode 13.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = OBJ_5; - productRefGroup = OBJ_12 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - "DockProgress::DockProgress" /* DockProgress */, - "DockProgress::SwiftPMPackageDescription" /* DockProgressPackageDescription */, - E3FB30C020EA5DBC009BA1BD /* DockProgressExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - E3FB30BF20EA5DBC009BA1BD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E3FB30C920EA5DBE009BA1BD /* MainMenu.xib in Resources */, - E3FEB1AB21DC4F70009C38CA /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - E3BFC67621FBB9B400C16B1A /* SwiftLint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = SwiftLint; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed\"\nfi\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - E3FB30BD20EA5DBC009BA1BD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E3FB30C420EA5DBC009BA1BD /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - OBJ_18 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 0; - files = ( - OBJ_19 /* DockProgress.swift in Sources */, - OBJ_20 /* Utilities.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - OBJ_26 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 0; - files = ( - OBJ_27 /* Package.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - E3FB30D220EA5EBD009BA1BD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = "DockProgress::DockProgress" /* DockProgress */; - targetProxy = E3FB30D120EA5EBD009BA1BD /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - E3FB30C720EA5DBE009BA1BD /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - E3FB30C820EA5DBE009BA1BD /* Base */, - ); - name = MainMenu.xib; - sourceTree = ""; - usesTabs = 1; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - E3FB30CC20EA5DBE009BA1BD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - 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_WEAK = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Manual; - COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = ""; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = Example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.DockProgressExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - E3FB30CD20EA5DBE009BA1BD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - 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_WEAK = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Manual; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEVELOPMENT_TEAM = ""; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - INFOPLIST_FILE = Example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.DockProgressExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - OBJ_16 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = DockProgress.xcodeproj/DockProgress_Info.plist; - MARKETING_VERSION = 3.2.0; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = DockProgress; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; - TARGET_NAME = DockProgress; - }; - name = Debug; - }; - OBJ_17 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = DockProgress.xcodeproj/DockProgress_Info.plist; - MARKETING_VERSION = 3.2.0; - OTHER_CFLAGS = "$(inherited)"; - OTHER_LDFLAGS = "$(inherited)"; - OTHER_SWIFT_FLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = DockProgress; - PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; - TARGET_NAME = DockProgress; - }; - name = Release; - }; - OBJ_24 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"; - SWIFT_VERSION = 4.0; - }; - name = Debug; - }; - OBJ_25 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - LD = /usr/bin/true; - OTHER_SWIFT_FLAGS = "-swift-version 4 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4 -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"; - SWIFT_VERSION = 4.0; - }; - name = Release; - }; - OBJ_3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - 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_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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - 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; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_NS_ASSERTIONS = YES; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - ONLY_ACTIVE_ARCH = YES; - OTHER_SWIFT_FLAGS = "-DXcode"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SUPPORTED_PLATFORMS = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - USE_HEADERMAP = NO; - }; - name = Debug; - }; - OBJ_4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - 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_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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - 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; - COMBINE_HIDPI_IMAGES = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = s; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.15; - OTHER_SWIFT_FLAGS = "-DXcode"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = macosx; - SUPPORTED_PLATFORMS = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - USE_HEADERMAP = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - E3FB30CE20EA5DBE009BA1BD /* Build configuration list for PBXNativeTarget "DockProgressExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E3FB30CC20EA5DBE009BA1BD /* Debug */, - E3FB30CD20EA5DBE009BA1BD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_15 /* Build configuration list for PBXNativeTarget "DockProgress" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_16 /* Debug */, - OBJ_17 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_2 /* Build configuration list for PBXProject "DockProgress" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_3 /* Debug */, - OBJ_4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - OBJ_23 /* Build configuration list for PBXNativeTarget "DockProgressPackageDescription" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - OBJ_24 /* Debug */, - OBJ_25 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = OBJ_1 /* Project object */; -} diff --git a/DockProgress.xcodeproj/xcshareddata/xcschemes/DockProgress-Package.xcscheme b/DockProgress.xcodeproj/xcshareddata/xcschemes/DockProgress-Package.xcscheme deleted file mode 100644 index 7a669f5..0000000 --- a/DockProgress.xcodeproj/xcshareddata/xcschemes/DockProgress-Package.xcscheme +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DockProgress.xcodeproj/xcshareddata/xcschemes/DockProgressExample.xcscheme b/DockProgress.xcodeproj/xcshareddata/xcschemes/DockProgressExample.xcscheme deleted file mode 100644 index f37d784..0000000 --- a/DockProgress.xcodeproj/xcshareddata/xcschemes/DockProgressExample.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DockProgress.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist b/DockProgress.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist deleted file mode 100644 index d661bbd..0000000 --- a/DockProgress.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - SchemeUserState - - DockProgress-Package.xcscheme - - - SuppressBuildableAutocreation - - - diff --git a/Example/Base.lproj/MainMenu.xib b/Example/Base.lproj/MainMenu.xib deleted file mode 100644 index c2035d5..0000000 --- a/Example/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/DockProgress Example.xcodeproj/project.pbxproj b/Example/DockProgress Example.xcodeproj/project.pbxproj new file mode 100644 index 0000000..5df6346 --- /dev/null +++ b/Example/DockProgress Example.xcodeproj/project.pbxproj @@ -0,0 +1,367 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + E38AC6C72844B4DB0034B25F /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = E38AC6C62844B4DB0034B25F /* App.swift */; }; + E38AC6CB2844B4DC0034B25F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E38AC6CA2844B4DC0034B25F /* Assets.xcassets */; }; + E38AC6CE2844B4DC0034B25F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E38AC6CD2844B4DC0034B25F /* Preview Assets.xcassets */; }; + E38AC6D62844B58B0034B25F /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = E38AC6D52844B58B0034B25F /* AppState.swift */; }; + E38AC6DA2844B60D0034B25F /* DockProgress in Frameworks */ = {isa = PBXBuildFile; productRef = E38AC6D92844B60D0034B25F /* DockProgress */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + E38AC6C32844B4DB0034B25F /* DockProgress Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DockProgress Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + E38AC6C62844B4DB0034B25F /* App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = ""; }; + E38AC6CA2844B4DC0034B25F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E38AC6CD2844B4DC0034B25F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + E38AC6CF2844B4DC0034B25F /* DockProgress_Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DockProgress_Example.entitlements; sourceTree = ""; }; + E38AC6D52844B58B0034B25F /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = ""; }; + E38AC6D72844B5F50034B25F /* DockProgress */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = DockProgress; path = ..; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E38AC6C02844B4DB0034B25F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E38AC6DA2844B60D0034B25F /* DockProgress in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E38AC6BA2844B4DB0034B25F = { + isa = PBXGroup; + children = ( + E38AC6D72844B5F50034B25F /* DockProgress */, + E38AC6C52844B4DB0034B25F /* DockProgress Example */, + E38AC6C42844B4DB0034B25F /* Products */, + E38AC6D82844B60D0034B25F /* Frameworks */, + ); + sourceTree = ""; + }; + E38AC6C42844B4DB0034B25F /* Products */ = { + isa = PBXGroup; + children = ( + E38AC6C32844B4DB0034B25F /* DockProgress Example.app */, + ); + name = Products; + sourceTree = ""; + }; + E38AC6C52844B4DB0034B25F /* DockProgress Example */ = { + isa = PBXGroup; + children = ( + E38AC6C62844B4DB0034B25F /* App.swift */, + E38AC6D52844B58B0034B25F /* AppState.swift */, + E38AC6CA2844B4DC0034B25F /* Assets.xcassets */, + E38AC6CF2844B4DC0034B25F /* DockProgress_Example.entitlements */, + E38AC6CC2844B4DC0034B25F /* Preview Content */, + ); + path = "DockProgress Example"; + sourceTree = ""; + }; + E38AC6CC2844B4DC0034B25F /* Preview Content */ = { + isa = PBXGroup; + children = ( + E38AC6CD2844B4DC0034B25F /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + E38AC6D82844B60D0034B25F /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E38AC6C22844B4DB0034B25F /* DockProgress Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = E38AC6D22844B4DC0034B25F /* Build configuration list for PBXNativeTarget "DockProgress Example" */; + buildPhases = ( + E38AC6BF2844B4DB0034B25F /* Sources */, + E38AC6C02844B4DB0034B25F /* Frameworks */, + E38AC6C12844B4DB0034B25F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "DockProgress Example"; + packageProductDependencies = ( + E38AC6D92844B60D0034B25F /* DockProgress */, + ); + productName = "DockProgress Example"; + productReference = E38AC6C32844B4DB0034B25F /* DockProgress Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E38AC6BB2844B4DB0034B25F /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1340; + LastUpgradeCheck = 1340; + TargetAttributes = { + E38AC6C22844B4DB0034B25F = { + CreatedOnToolsVersion = 13.4; + }; + }; + }; + buildConfigurationList = E38AC6BE2844B4DB0034B25F /* Build configuration list for PBXProject "DockProgress Example" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E38AC6BA2844B4DB0034B25F; + productRefGroup = E38AC6C42844B4DB0034B25F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E38AC6C22844B4DB0034B25F /* DockProgress Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E38AC6C12844B4DB0034B25F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E38AC6CE2844B4DC0034B25F /* Preview Assets.xcassets in Resources */, + E38AC6CB2844B4DC0034B25F /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E38AC6BF2844B4DB0034B25F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E38AC6C72844B4DB0034B25F /* App.swift in Sources */, + E38AC6D62844B58B0034B25F /* AppState.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + E38AC6D02844B4DC0034B25F /* 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++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = 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_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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + 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 = 12.3; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + E38AC6D12844B4DC0034B25F /* 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++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = 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_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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + 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 = 12.3; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + E38AC6D32844B4DC0034B25F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "DockProgress Example/DockProgress_Example.entitlements"; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"DockProgress Example/Preview Content\""; + DEVELOPMENT_TEAM = YG56YK5RN5; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.sindresorhus.DockProgress-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + E38AC6D42844B4DC0034B25F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "DockProgress Example/DockProgress_Example.entitlements"; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"DockProgress Example/Preview Content\""; + DEVELOPMENT_TEAM = YG56YK5RN5; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.sindresorhus.DockProgress-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E38AC6BE2844B4DB0034B25F /* Build configuration list for PBXProject "DockProgress Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E38AC6D02844B4DC0034B25F /* Debug */, + E38AC6D12844B4DC0034B25F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E38AC6D22844B4DC0034B25F /* Build configuration list for PBXNativeTarget "DockProgress Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E38AC6D32844B4DC0034B25F /* Debug */, + E38AC6D42844B4DC0034B25F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + E38AC6D92844B60D0034B25F /* DockProgress */ = { + isa = XCSwiftPackageProductDependency; + productName = DockProgress; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = E38AC6BB2844B4DB0034B25F /* Project object */; +} diff --git a/Example/DockProgress Example/App.swift b/Example/DockProgress Example/App.swift new file mode 100644 index 0000000..691ba55 --- /dev/null +++ b/Example/DockProgress Example/App.swift @@ -0,0 +1,12 @@ +import SwiftUI + +@main +struct AppMain: App { + @StateObject private var appState = AppState() + + var body: some Scene { + WindowGroup { + if false {} + } + } +} diff --git a/Example/AppDelegate.swift b/Example/DockProgress Example/AppState.swift similarity index 66% rename from Example/AppDelegate.swift rename to Example/DockProgress Example/AppState.swift index aecc20a..2d1ed57 100644 --- a/Example/AppDelegate.swift +++ b/Example/DockProgress Example/AppState.swift @@ -1,19 +1,22 @@ -import Cocoa +import SwiftUI import DockProgress -@main @MainActor -final class AppDelegate: NSObject, NSApplicationDelegate { - func borrowIconFromApp(_ app: String) { - let icon = NSWorkspace.shared.icon(forFile: NSWorkspace.shared.fullPath(forApplication: app)!) - icon.size = CGSize(width: 128, height: 128) - NSApp.applicationIconImage = icon +final class AppState: ObservableObject { + init() { + DispatchQueue.main.async { [self] in + didLaunch() + } } - func applicationDidFinishLaunching(_ notification: Notification) { - borrowIconFromApp("Photos") + private func didLaunch() { + runExample() + } - let styles: [DockProgress.ProgressStyle] = [ + private func runExample() { + borrowIconFromApp("com.apple.Photos") + + let styles: [DockProgress.Style] = [ .bar, .squircle(color: .systemGray), .circle(radius: 30, color: .white), @@ -37,4 +40,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate { } } } + + private func borrowIconFromApp(_ app: String) { + let icon = NSWorkspace.shared.icon(forFile: NSWorkspace.shared.urlForApplication(withBundleIdentifier: app)!.path) + icon.size = CGSize(width: 128, height: 128) + NSApp.applicationIconImage = icon + } } diff --git a/Example/DockProgress Example/Assets.xcassets/AccentColor.colorset/Contents.json b/Example/DockProgress Example/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Example/DockProgress Example/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/DockProgress Example/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 95% rename from Example/Images.xcassets/AppIcon.appiconset/Contents.json rename to Example/DockProgress Example/Assets.xcassets/AppIcon.appiconset/Contents.json index 50ab7bd..3f00db4 100644 --- a/Example/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/DockProgress Example/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -52,7 +52,7 @@ } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Example/DockProgress Example/Assets.xcassets/Contents.json b/Example/DockProgress Example/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Example/DockProgress Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/DockProgress Example/DockProgress_Example.entitlements b/Example/DockProgress Example/DockProgress_Example.entitlements new file mode 100644 index 0000000..852fa1a --- /dev/null +++ b/Example/DockProgress Example/DockProgress_Example.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/Example/DockProgress Example/Preview Content/Preview Assets.xcassets/Contents.json b/Example/DockProgress Example/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Example/DockProgress Example/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/Info.plist b/Example/Info.plist deleted file mode 100644 index f4f42ec..0000000 --- a/Example/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0.0 - CFBundleVersion - 1 - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSMainNibFile - MainMenu - - diff --git a/Sources/DockProgress/DockProgress.swift b/Sources/DockProgress/DockProgress.swift index 8b5e609..9cdb1e9 100644 --- a/Sources/DockProgress/DockProgress.swift +++ b/Sources/DockProgress/DockProgress.swift @@ -67,7 +67,7 @@ public enum DockProgress { updateDockIcon() } - public enum ProgressStyle { + public enum Style { case bar case squircle(inset: Double? = nil, color: NSColor = .controlAccentColor) case circle(radius: Double, color: NSColor = .controlAccentColor) @@ -75,7 +75,7 @@ public enum DockProgress { case custom(drawHandler: (_ rect: CGRect) -> Void) } - public static var style = ProgressStyle.bar + public static var style = Style.bar // TODO: Make the progress smoother by also animating the steps between each call to `updateDockIcon()` private static func updateDockIcon() {