From 6626257dff85168a95b0b5f0b8807cf442ccdaa6 Mon Sep 17 00:00:00 2001 From: Rahul Date: Fri, 23 Apr 2021 12:59:48 +0530 Subject: [PATCH] SPM support --- .../contents.xcworkspacedata | 7 + Example/ExampleApp.xcodeproj/project.pbxproj | 473 +++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/ExampleApp.xcscheme | 78 +++ .../AccentColor.colorset/Contents.json | 0 .../AppIcon.appiconset/Contents.json | 0 .../ExampleApp}/Assets.xcassets/Contents.json | 0 .../ExampleApp}/ContentView.swift | 19 +- Example/ExampleApp/ExampleApp.swift | 17 + .../ExampleApp}/Info.plist | 4 +- .../Preview Assets.xcassets/Contents.json | 0 Package.swift | 30 + README.md | 6 +- .../RRRangeSliderSwiftUITests_Info.plist | 25 + .../RRRangeSliderSwiftUI_Info.plist | 26 + .../project.pbxproj | 559 +++++++++++------- .../contents.xcworkspacedata | 10 + .../RRRangeSliderSwiftUI-Package.xcscheme | 68 +++ .../contents.xcworkspacedata | 10 + .../RRRangeSliderSwiftUIApp.swift | 17 - .../RRRangeSliderSwiftUI.swift | 66 ++- Tests/LinuxMain.swift | 7 + .../RRRangeSliderSwiftUITests.swift | 15 + .../XCTestManifests.swift | 9 + 24 files changed, 1196 insertions(+), 257 deletions(-) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 Example/ExampleApp.xcodeproj/project.pbxproj create mode 100644 Example/ExampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Example/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme rename {RRRangeSliderSwiftUI => Example/ExampleApp}/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename {RRRangeSliderSwiftUI => Example/ExampleApp}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {RRRangeSliderSwiftUI => Example/ExampleApp}/Assets.xcassets/Contents.json (100%) rename {RRRangeSliderSwiftUI => Example/ExampleApp}/ContentView.swift (63%) create mode 100644 Example/ExampleApp/ExampleApp.swift rename {RRRangeSliderSwiftUI => Example/ExampleApp}/Info.plist (92%) rename {RRRangeSliderSwiftUI => Example/ExampleApp}/Preview Content/Preview Assets.xcassets/Contents.json (100%) create mode 100644 Package.swift create mode 100644 RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUITests_Info.plist create mode 100644 RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUI_Info.plist create mode 100644 RRRangeSliderSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 RRRangeSliderSwiftUI.xcodeproj/xcshareddata/xcschemes/RRRangeSliderSwiftUI-Package.xcscheme create mode 100644 RRRangeSliderSwiftUI.xcworkspace/contents.xcworkspacedata delete mode 100644 RRRangeSliderSwiftUI/RRRangeSliderSwiftUIApp.swift rename RRRangeSliderSwiftUI/RRRangeSlider.swift => Sources/RRRangeSliderSwiftUI/RRRangeSliderSwiftUI.swift (67%) create mode 100644 Tests/LinuxMain.swift create mode 100644 Tests/RRRangeSliderSwiftUITests/RRRangeSliderSwiftUITests.swift create mode 100644 Tests/RRRangeSliderSwiftUITests/XCTestManifests.swift diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/ExampleApp.xcodeproj/project.pbxproj b/Example/ExampleApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..dec7781 --- /dev/null +++ b/Example/ExampleApp.xcodeproj/project.pbxproj @@ -0,0 +1,473 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + EE1EDC2E262AB164000B9FBD /* ExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1EDC28262AB164000B9FBD /* ExampleApp.swift */; }; + EE1EDC2F262AB164000B9FBD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EE1EDC29262AB164000B9FBD /* Assets.xcassets */; }; + EE1EDC30262AB164000B9FBD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EE1EDC2B262AB164000B9FBD /* Preview Assets.xcassets */; }; + EE1EDC31262AB164000B9FBD /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE1EDC2C262AB164000B9FBD /* ContentView.swift */; }; + EE1EDCEB262AC559000B9FBD /* RRRangeSliderSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE1EDC76262ABD73000B9FBD /* RRRangeSliderSwiftUI.framework */; }; + EE1EDCEC262AC559000B9FBD /* RRRangeSliderSwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EE1EDC76262ABD73000B9FBD /* RRRangeSliderSwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + EE1EDC75262ABD73000B9FBD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EE1EDC6E262ABD73000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI::Product"; + remoteInfo = RRRangeSliderSwiftUI; + }; + EE1EDC77262ABD73000B9FBD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EE1EDC6E262ABD73000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests::Product"; + remoteInfo = RRRangeSliderSwiftUITests; + }; + EE1EDC84262ABDC8000B9FBD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EE1EDC6E262ABD73000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI"; + remoteInfo = RRRangeSliderSwiftUI; + }; + EE1EDCB5262AC0B1000B9FBD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EE1EDCAE262AC0B1000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI::Product"; + remoteInfo = RRRangeSliderSwiftUI; + }; + EE1EDCB7262AC0B1000B9FBD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EE1EDCAE262AC0B1000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests::Product"; + remoteInfo = RRRangeSliderSwiftUITests; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + EE1EDCED262AC559000B9FBD /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + EE1EDCEC262AC559000B9FBD /* RRRangeSliderSwiftUI.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 2DADBE9625CEB01B00518AFF /* ExampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + EE1EDC28262AB164000B9FBD /* ExampleApp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleApp.swift; sourceTree = ""; }; + EE1EDC29262AB164000B9FBD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + EE1EDC2B262AB164000B9FBD /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + EE1EDC2C262AB164000B9FBD /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + EE1EDC2D262AB164000B9FBD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EE1EDC5C262AB4BA000B9FBD /* RRRangeSliderSwiftUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RRRangeSliderSwiftUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EE1EDC6E262ABD73000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RRRangeSliderSwiftUI.xcodeproj; path = ../RRRangeSliderSwiftUI.xcodeproj; sourceTree = ""; }; + EE1EDCAE262AC0B1000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RRRangeSliderSwiftUI.xcodeproj; path = ../RRRangeSliderSwiftUI.xcodeproj; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2DADBE9325CEB01B00518AFF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EE1EDCEB262AC559000B9FBD /* RRRangeSliderSwiftUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2DADBE8D25CEB01B00518AFF = { + isa = PBXGroup; + children = ( + EE1EDC27262AB164000B9FBD /* ExampleApp */, + 2DADBE9725CEB01B00518AFF /* Products */, + EE1EDC5B262AB4BA000B9FBD /* Frameworks */, + EE1EDCAE262AC0B1000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */, + ); + sourceTree = ""; + }; + 2DADBE9725CEB01B00518AFF /* Products */ = { + isa = PBXGroup; + children = ( + 2DADBE9625CEB01B00518AFF /* ExampleApp.app */, + ); + name = Products; + sourceTree = ""; + }; + EE1EDC27262AB164000B9FBD /* ExampleApp */ = { + isa = PBXGroup; + children = ( + EE1EDC28262AB164000B9FBD /* ExampleApp.swift */, + EE1EDC2C262AB164000B9FBD /* ContentView.swift */, + EE1EDC29262AB164000B9FBD /* Assets.xcassets */, + EE1EDC2A262AB164000B9FBD /* Preview Content */, + EE1EDC2D262AB164000B9FBD /* Info.plist */, + ); + path = ExampleApp; + sourceTree = ""; + }; + EE1EDC2A262AB164000B9FBD /* Preview Content */ = { + isa = PBXGroup; + children = ( + EE1EDC2B262AB164000B9FBD /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + EE1EDC5B262AB4BA000B9FBD /* Frameworks */ = { + isa = PBXGroup; + children = ( + EE1EDC6E262ABD73000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */, + EE1EDC5C262AB4BA000B9FBD /* RRRangeSliderSwiftUI.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + EE1EDC6F262ABD73000B9FBD /* Products */ = { + isa = PBXGroup; + children = ( + EE1EDC76262ABD73000B9FBD /* RRRangeSliderSwiftUI.framework */, + EE1EDC78262ABD73000B9FBD /* RRRangeSliderSwiftUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + EE1EDCAF262AC0B1000B9FBD /* Products */ = { + isa = PBXGroup; + children = ( + EE1EDCB6262AC0B1000B9FBD /* RRRangeSliderSwiftUI.framework */, + EE1EDCB8262AC0B1000B9FBD /* RRRangeSliderSwiftUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2DADBE9525CEB01B00518AFF /* ExampleApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2DADBEA525CEB01C00518AFF /* Build configuration list for PBXNativeTarget "ExampleApp" */; + buildPhases = ( + 2DADBE9225CEB01B00518AFF /* Sources */, + 2DADBE9325CEB01B00518AFF /* Frameworks */, + 2DADBE9425CEB01B00518AFF /* Resources */, + EE1EDCED262AC559000B9FBD /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + EE1EDC85262ABDC8000B9FBD /* PBXTargetDependency */, + ); + name = ExampleApp; + productName = RRRangeSliderSwiftUI; + productReference = 2DADBE9625CEB01B00518AFF /* ExampleApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2DADBE8E25CEB01B00518AFF /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1230; + LastUpgradeCheck = 1230; + TargetAttributes = { + 2DADBE9525CEB01B00518AFF = { + CreatedOnToolsVersion = 12.3; + }; + }; + }; + buildConfigurationList = 2DADBE9125CEB01B00518AFF /* Build configuration list for PBXProject "ExampleApp" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2DADBE8D25CEB01B00518AFF; + productRefGroup = 2DADBE9725CEB01B00518AFF /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = EE1EDCAF262AC0B1000B9FBD /* Products */; + ProjectRef = EE1EDCAE262AC0B1000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */; + }, + { + ProductGroup = EE1EDC6F262ABD73000B9FBD /* Products */; + ProjectRef = EE1EDC6E262ABD73000B9FBD /* RRRangeSliderSwiftUI.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 2DADBE9525CEB01B00518AFF /* ExampleApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + EE1EDC76262ABD73000B9FBD /* RRRangeSliderSwiftUI.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = RRRangeSliderSwiftUI.framework; + remoteRef = EE1EDC75262ABD73000B9FBD /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + EE1EDC78262ABD73000B9FBD /* RRRangeSliderSwiftUITests.xctest */ = { + isa = PBXReferenceProxy; + fileType = file; + path = RRRangeSliderSwiftUITests.xctest; + remoteRef = EE1EDC77262ABD73000B9FBD /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + EE1EDCB6262AC0B1000B9FBD /* RRRangeSliderSwiftUI.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = RRRangeSliderSwiftUI.framework; + remoteRef = EE1EDCB5262AC0B1000B9FBD /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + EE1EDCB8262AC0B1000B9FBD /* RRRangeSliderSwiftUITests.xctest */ = { + isa = PBXReferenceProxy; + fileType = file; + path = RRRangeSliderSwiftUITests.xctest; + remoteRef = EE1EDCB7262AC0B1000B9FBD /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 2DADBE9425CEB01B00518AFF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EE1EDC30262AB164000B9FBD /* Preview Assets.xcassets in Resources */, + EE1EDC2F262AB164000B9FBD /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2DADBE9225CEB01B00518AFF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EE1EDC31262AB164000B9FBD /* ContentView.swift in Sources */, + EE1EDC2E262AB164000B9FBD /* ExampleApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + EE1EDC85262ABDC8000B9FBD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = RRRangeSliderSwiftUI; + targetProxy = EE1EDC84262ABDC8000B9FBD /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 2DADBEA325CEB01C00518AFF /* 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_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; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 2DADBEA425CEB01C00518AFF /* 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_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; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2DADBEA625CEB01C00518AFF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = ""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = "$(SRCROOT)/ExampleApp/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.RRRangeSliderSwiftUI; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 2DADBEA725CEB01C00518AFF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = ""; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = "$(SRCROOT)/ExampleApp/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + ONLY_ACTIVE_ARCH = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.RRRangeSliderSwiftUI; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2DADBE9125CEB01B00518AFF /* Build configuration list for PBXProject "ExampleApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2DADBEA325CEB01C00518AFF /* Debug */, + 2DADBEA425CEB01C00518AFF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2DADBEA525CEB01C00518AFF /* Build configuration list for PBXNativeTarget "ExampleApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2DADBEA625CEB01C00518AFF /* Debug */, + 2DADBEA725CEB01C00518AFF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2DADBE8E25CEB01B00518AFF /* Project object */; +} diff --git a/Example/ExampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/ExampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Example/ExampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme b/Example/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme new file mode 100644 index 0000000..5e475da --- /dev/null +++ b/Example/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RRRangeSliderSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json b/Example/ExampleApp/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from RRRangeSliderSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json rename to Example/ExampleApp/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/RRRangeSliderSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/ExampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from RRRangeSliderSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Example/ExampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/RRRangeSliderSwiftUI/Assets.xcassets/Contents.json b/Example/ExampleApp/Assets.xcassets/Contents.json similarity index 100% rename from RRRangeSliderSwiftUI/Assets.xcassets/Contents.json rename to Example/ExampleApp/Assets.xcassets/Contents.json diff --git a/RRRangeSliderSwiftUI/ContentView.swift b/Example/ExampleApp/ContentView.swift similarity index 63% rename from RRRangeSliderSwiftUI/ContentView.swift rename to Example/ExampleApp/ContentView.swift index 998c8e6..86ca3f3 100644 --- a/RRRangeSliderSwiftUI/ContentView.swift +++ b/Example/ExampleApp/ContentView.swift @@ -1,15 +1,19 @@ // // ContentView.swift -// RRRangeSliderSwiftUI +// Example // -// Created by Rahul Mayani on 06/02/21. +// Created by Rahul Mayani on 17/04/21. // import SwiftUI +import RRRangeSliderSwiftUI + +let sliderWidth = Float(UIScreen.main.bounds.width - 50.0) struct ContentView: View { + @State var minValue: Float = 0.0 - @State var maxValue: Float = Float(UIScreen.main.bounds.width - 50.0) + @State var maxValue: Float = sliderWidth var body: some View { @@ -17,15 +21,17 @@ struct ContentView: View { Text("Range Slider") - RRRangeSlider( + RRRangeSliderSwiftUI( minValue: self.$minValue, // mimimum value maxValue: self.$maxValue, // maximum value - sliderWidth: CGFloat(maxValue), // set slider width + minLabel: "0", // mimimum Label text + maxLabel: "100", // maximum Label text + sliderWidth: sliderWidth, // set slider width backgroundTrackColor: Color(UIColor.systemTeal).opacity(0.5), // track color selectedTrackColor: Color.blue.opacity(25), // track color globeColor: Color.orange, // globe background color globeBackgroundColor: Color.black, // globe rounded border color - globeMinMaxValuesColor: Color.black // all text label color + sliderMinMaxValuesColor: Color.black // all text label color ) } } @@ -36,3 +42,4 @@ struct ContentView_Previews: PreviewProvider { ContentView() } } + diff --git a/Example/ExampleApp/ExampleApp.swift b/Example/ExampleApp/ExampleApp.swift new file mode 100644 index 0000000..0c4096c --- /dev/null +++ b/Example/ExampleApp/ExampleApp.swift @@ -0,0 +1,17 @@ +// +// ExampleApp.swift +// Example +// +// Created by Rahul Mayani on 17/04/21. +// + +import SwiftUI + +@main +struct ExampleApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/RRRangeSliderSwiftUI/Info.plist b/Example/ExampleApp/Info.plist similarity index 92% rename from RRRangeSliderSwiftUI/Info.plist rename to Example/ExampleApp/Info.plist index efc211a..7b78419 100644 --- a/RRRangeSliderSwiftUI/Info.plist +++ b/Example/ExampleApp/Info.plist @@ -23,7 +23,7 @@ UIApplicationSceneManifest UIApplicationSupportsMultipleScenes - + UIApplicationSupportsIndirectInputEvents @@ -36,8 +36,6 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad diff --git a/RRRangeSliderSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json b/Example/ExampleApp/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from RRRangeSliderSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json rename to Example/ExampleApp/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..32d390f --- /dev/null +++ b/Package.swift @@ -0,0 +1,30 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "RRRangeSliderSwiftUI", + platforms: [.iOS(.v13)], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "RRRangeSliderSwiftUI", + targets: ["RRRangeSliderSwiftUI"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Rahul-Mayani/RRRangeSliderSwiftUI", from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "RRRangeSliderSwiftUI", + dependencies: []), + .testTarget( + name: "RRRangeSliderSwiftUITests", + dependencies: ["RRRangeSliderSwiftUI"]) + ], + swiftLanguageVersions: [.v5] +) diff --git a/README.md b/README.md index 565b40f..f010251 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,18 @@ [![Swift 5+](https://img.shields.io/badge/Swift-5+-orange.svg?style=flat)](https://developer.apple.com/swift/) [![RangeSlider](https://img.shields.io/badge/Range-Slider-orange.svg?style=flat)](https://github.com/Rahul-Mayani/RRRangeSliderSwiftUI/) [![SwiftUI](https://img.shields.io/badge/SwiftUI-orange.svg?style=flat)](https://developer.apple.com/swiftui/) +[![SPM](https://img.shields.io/badge/SPM-orange.svg?style=flat)](https://swift.org/package-manager/) Custom range slider in SwiftUI ## Installation +#### SPM (Swift Package Manager) +In Xcode, use the menu File > Swift Packages > Add Package Dependency... and enter the package URL `https://github.com/Rahul-Mayani/RRRangeSliderSwiftUI`. + #### Manually 1. Download the project. -2. Add `RRRangeSlider.swift` file for slider view +2. Add `RRRangeSliderSwiftUI.swift` file for slider view 3. Add necessary files in your project. 4. Congratulations! diff --git a/RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUITests_Info.plist b/RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUITests_Info.plist new file mode 100644 index 0000000..7c23420 --- /dev/null +++ b/RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUITests_Info.plist @@ -0,0 +1,25 @@ + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUI_Info.plist b/RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUI_Info.plist new file mode 100644 index 0000000..ca23c84 --- /dev/null +++ b/RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUI_Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/RRRangeSliderSwiftUI.xcodeproj/project.pbxproj b/RRRangeSliderSwiftUI.xcodeproj/project.pbxproj index 0317799..8384ebf 100644 --- a/RRRangeSliderSwiftUI.xcodeproj/project.pbxproj +++ b/RRRangeSliderSwiftUI.xcodeproj/project.pbxproj @@ -3,99 +3,139 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 46; objects = { +/* Begin PBXAggregateTarget section */ + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUIPackageTests::ProductTarget" /* RRRangeSliderSwiftUIPackageTests */ = { + isa = PBXAggregateTarget; + buildConfigurationList = OBJ_31 /* Build configuration list for PBXAggregateTarget "RRRangeSliderSwiftUIPackageTests" */; + buildPhases = ( + ); + dependencies = ( + OBJ_34 /* PBXTargetDependency */, + ); + name = RRRangeSliderSwiftUIPackageTests; + productName = RRRangeSliderSwiftUIPackageTests; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ - 2DADBE9A25CEB01B00518AFF /* RRRangeSliderSwiftUIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DADBE9925CEB01B00518AFF /* RRRangeSliderSwiftUIApp.swift */; }; - 2DADBE9C25CEB01B00518AFF /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DADBE9B25CEB01B00518AFF /* ContentView.swift */; }; - 2DADBE9E25CEB01C00518AFF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2DADBE9D25CEB01C00518AFF /* Assets.xcassets */; }; - 2DADBEA125CEB01C00518AFF /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2DADBEA025CEB01C00518AFF /* Preview Assets.xcassets */; }; - 2DADBF2D25CEC0B200518AFF /* RRRangeSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DADBF2C25CEC0B200518AFF /* RRRangeSlider.swift */; }; + OBJ_22 /* RRRangeSliderSwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* RRRangeSliderSwiftUI.swift */; }; + OBJ_29 /* Package.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_6 /* Package.swift */; }; + OBJ_40 /* RRRangeSliderSwiftUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_12 /* RRRangeSliderSwiftUITests.swift */; }; + OBJ_41 /* XCTestManifests.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_13 /* XCTestManifests.swift */; }; + OBJ_43 /* RRRangeSliderSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI::Product" /* RRRangeSliderSwiftUI.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXCopyFilesBuildPhase section */ - 2DADBEBA25CEB11000518AFF /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; +/* Begin PBXContainerItemProxy section */ + EE40F24C262AA4080075FA3D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI"; + remoteInfo = RRRangeSliderSwiftUI; }; -/* End PBXCopyFilesBuildPhase section */ + EE40F24F262AA40A0075FA3D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = OBJ_1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests"; + remoteInfo = RRRangeSliderSwiftUITests; + }; +/* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 2DADBE9625CEB01B00518AFF /* RRRangeSliderSwiftUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RRRangeSliderSwiftUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 2DADBE9925CEB01B00518AFF /* RRRangeSliderSwiftUIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RRRangeSliderSwiftUIApp.swift; sourceTree = ""; }; - 2DADBE9B25CEB01B00518AFF /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 2DADBE9D25CEB01C00518AFF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 2DADBEA025CEB01C00518AFF /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 2DADBEA225CEB01C00518AFF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2DADBF2C25CEC0B200518AFF /* RRRangeSlider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RRRangeSlider.swift; sourceTree = ""; }; + OBJ_12 /* RRRangeSliderSwiftUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RRRangeSliderSwiftUITests.swift; sourceTree = ""; }; + OBJ_13 /* XCTestManifests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = ""; }; + OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + OBJ_9 /* RRRangeSliderSwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RRRangeSliderSwiftUI.swift; sourceTree = ""; }; + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI::Product" /* RRRangeSliderSwiftUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RRRangeSliderSwiftUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests::Product" /* RRRangeSliderSwiftUITests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = RRRangeSliderSwiftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 2DADBE9325CEB01B00518AFF /* Frameworks */ = { + OBJ_23 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; + OBJ_42 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 0; + files = ( + OBJ_43 /* RRRangeSliderSwiftUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2DADBE8D25CEB01B00518AFF = { + OBJ_10 /* Tests */ = { isa = PBXGroup; children = ( - 2DADBE9825CEB01B00518AFF /* RRRangeSliderSwiftUI */, - 2DADBE9725CEB01B00518AFF /* Products */, + OBJ_11 /* RRRangeSliderSwiftUITests */, ); - sourceTree = ""; + name = Tests; + sourceTree = SOURCE_ROOT; }; - 2DADBE9725CEB01B00518AFF /* Products */ = { + OBJ_11 /* RRRangeSliderSwiftUITests */ = { isa = PBXGroup; children = ( - 2DADBE9625CEB01B00518AFF /* RRRangeSliderSwiftUI.app */, + OBJ_12 /* RRRangeSliderSwiftUITests.swift */, + OBJ_13 /* XCTestManifests.swift */, + ); + name = RRRangeSliderSwiftUITests; + path = Tests/RRRangeSliderSwiftUITests; + sourceTree = SOURCE_ROOT; + }; + OBJ_14 /* Products */ = { + isa = PBXGroup; + children = ( + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI::Product" /* RRRangeSliderSwiftUI.framework */, + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests::Product" /* RRRangeSliderSwiftUITests.xctest */, ); name = Products; - sourceTree = ""; + sourceTree = BUILT_PRODUCTS_DIR; }; - 2DADBE9825CEB01B00518AFF /* RRRangeSliderSwiftUI */ = { + OBJ_5 = { isa = PBXGroup; children = ( - 2DADBF2C25CEC0B200518AFF /* RRRangeSlider.swift */, - 2DADBE9925CEB01B00518AFF /* RRRangeSliderSwiftUIApp.swift */, - 2DADBE9B25CEB01B00518AFF /* ContentView.swift */, - 2DADBE9D25CEB01C00518AFF /* Assets.xcassets */, - 2DADBEA225CEB01C00518AFF /* Info.plist */, - 2DADBE9F25CEB01C00518AFF /* Preview Content */, + OBJ_6 /* Package.swift */, + OBJ_7 /* Sources */, + OBJ_10 /* Tests */, + OBJ_14 /* Products */, ); - path = RRRangeSliderSwiftUI; sourceTree = ""; }; - 2DADBE9F25CEB01C00518AFF /* Preview Content */ = { + OBJ_7 /* Sources */ = { isa = PBXGroup; children = ( - 2DADBEA025CEB01C00518AFF /* Preview Assets.xcassets */, + OBJ_8 /* RRRangeSliderSwiftUI */, ); - path = "Preview Content"; - sourceTree = ""; + name = Sources; + sourceTree = SOURCE_ROOT; + }; + OBJ_8 /* RRRangeSliderSwiftUI */ = { + isa = PBXGroup; + children = ( + OBJ_9 /* RRRangeSliderSwiftUI.swift */, + ); + name = RRRangeSliderSwiftUI; + path = Sources/RRRangeSliderSwiftUI; + sourceTree = SOURCE_ROOT; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 2DADBE9525CEB01B00518AFF /* RRRangeSliderSwiftUI */ = { + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI" /* RRRangeSliderSwiftUI */ = { isa = PBXNativeTarget; - buildConfigurationList = 2DADBEA525CEB01C00518AFF /* Build configuration list for PBXNativeTarget "RRRangeSliderSwiftUI" */; + buildConfigurationList = OBJ_18 /* Build configuration list for PBXNativeTarget "RRRangeSliderSwiftUI" */; buildPhases = ( - 2DADBE9225CEB01B00518AFF /* Sources */, - 2DADBE9325CEB01B00518AFF /* Frameworks */, - 2DADBE9425CEB01B00518AFF /* Resources */, - 2DADBEBA25CEB11000518AFF /* Embed Frameworks */, + OBJ_21 /* Sources */, + OBJ_23 /* Frameworks */, ); buildRules = ( ); @@ -103,247 +143,350 @@ ); name = RRRangeSliderSwiftUI; productName = RRRangeSliderSwiftUI; - productReference = 2DADBE9625CEB01B00518AFF /* RRRangeSliderSwiftUI.app */; - productType = "com.apple.product-type.application"; + productReference = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI::Product" /* RRRangeSliderSwiftUI.framework */; + productType = "com.apple.product-type.framework"; + }; + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests" /* RRRangeSliderSwiftUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_36 /* Build configuration list for PBXNativeTarget "RRRangeSliderSwiftUITests" */; + buildPhases = ( + OBJ_39 /* Sources */, + OBJ_42 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + OBJ_44 /* PBXTargetDependency */, + ); + name = RRRangeSliderSwiftUITests; + productName = RRRangeSliderSwiftUITests; + productReference = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests::Product" /* RRRangeSliderSwiftUITests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + "RRRangeSliderSwiftUI::SwiftPMPackageDescription" /* RRRangeSliderSwiftUIPackageDescription */ = { + isa = PBXNativeTarget; + buildConfigurationList = OBJ_25 /* Build configuration list for PBXNativeTarget "RRRangeSliderSwiftUIPackageDescription" */; + buildPhases = ( + OBJ_28 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RRRangeSliderSwiftUIPackageDescription; + productName = RRRangeSliderSwiftUIPackageDescription; + productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 2DADBE8E25CEB01B00518AFF /* Project object */ = { + OBJ_1 /* Project object */ = { isa = PBXProject; attributes = { + LastSwiftMigration = 9999; LastSwiftUpdateCheck = 1230; - LastUpgradeCheck = 1230; - TargetAttributes = { - 2DADBE9525CEB01B00518AFF = { - CreatedOnToolsVersion = 12.3; - }; - }; + LastUpgradeCheck = 9999; }; - buildConfigurationList = 2DADBE9125CEB01B00518AFF /* Build configuration list for PBXProject "RRRangeSliderSwiftUI" */; - compatibilityVersion = "Xcode 9.3"; + buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "RRRangeSliderSwiftUI" */; + compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, - Base, ); - mainGroup = 2DADBE8D25CEB01B00518AFF; - productRefGroup = 2DADBE9725CEB01B00518AFF /* Products */; + mainGroup = OBJ_5; + productRefGroup = OBJ_14 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 2DADBE9525CEB01B00518AFF /* RRRangeSliderSwiftUI */, + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI" /* RRRangeSliderSwiftUI */, + "RRRangeSliderSwiftUI::SwiftPMPackageDescription" /* RRRangeSliderSwiftUIPackageDescription */, + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUIPackageTests::ProductTarget" /* RRRangeSliderSwiftUIPackageTests */, + "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests" /* RRRangeSliderSwiftUITests */, ); }; /* End PBXProject section */ -/* Begin PBXResourcesBuildPhase section */ - 2DADBE9425CEB01B00518AFF /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; +/* Begin PBXSourcesBuildPhase section */ + OBJ_21 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; files = ( - 2DADBEA125CEB01C00518AFF /* Preview Assets.xcassets in Resources */, - 2DADBE9E25CEB01C00518AFF /* Assets.xcassets in Resources */, + OBJ_22 /* RRRangeSliderSwiftUI.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 2DADBE9225CEB01B00518AFF /* Sources */ = { + OBJ_28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 0; + files = ( + OBJ_29 /* Package.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + OBJ_39 /* Sources */ = { isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 0; files = ( - 2DADBE9C25CEB01B00518AFF /* ContentView.swift in Sources */, - 2DADBE9A25CEB01B00518AFF /* RRRangeSliderSwiftUIApp.swift in Sources */, - 2DADBF2D25CEC0B200518AFF /* RRRangeSlider.swift in Sources */, + OBJ_40 /* RRRangeSliderSwiftUITests.swift in Sources */, + OBJ_41 /* XCTestManifests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + OBJ_34 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUITests" /* RRRangeSliderSwiftUITests */; + targetProxy = EE40F24F262AA40A0075FA3D /* PBXContainerItemProxy */; + }; + OBJ_44 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = "RRRangeSliderSwiftUI::RRRangeSliderSwiftUI" /* RRRangeSliderSwiftUI */; + targetProxy = EE40F24C262AA4080075FA3D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ - 2DADBEA325CEB01C00518AFF /* Debug */ = { + OBJ_19 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUI_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0.0; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = RRRangeSliderSwiftUI; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TARGET_NAME = RRRangeSliderSwiftUI; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + OBJ_20 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUI_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 1.0.0; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = RRRangeSliderSwiftUI; + PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TARGET_NAME = RRRangeSliderSwiftUI; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; + OBJ_26 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD = /usr/bin/true; + OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -package-description-version 5.3.0"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + OBJ_27 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + LD = /usr/bin/true; + OTHER_SWIFT_FLAGS = "-swift-version 5 -I $(TOOLCHAIN_DIR)/usr/lib/swift/pm/4_2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -package-description-version 5.3.0"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + OBJ_3 /* 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_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; + COMBINE_HIDPI_IMAGES = 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; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", "$(inherited)", + "SWIFT_PACKAGE=1", + "DEBUG=1", ); - 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; - IPHONEOS_DEPLOYMENT_TARGET = 14.3; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; + OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; + PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE DEBUG"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + USE_HEADERMAP = NO; }; name = Debug; }; - 2DADBEA425CEB01C00518AFF /* Release */ = { + OBJ_32 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + OBJ_33 /* 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_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; - IPHONEOS_DEPLOYMENT_TARGET = 14.3; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; }; name = Release; }; - 2DADBEA625CEB01C00518AFF /* Debug */ = { + OBJ_37 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_ASSET_PATHS = "\"RRRangeSliderSwiftUI/Preview Content\""; - ENABLE_PREVIEWS = YES; - INFOPLIST_FILE = RRRangeSliderSwiftUI/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( + CLANG_ENABLE_MODULES = YES; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "@executable_path/Frameworks", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.RRRangeSliderSwiftUI; - PRODUCT_NAME = "$(TARGET_NAME)"; + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUITests_Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGET_NAME = RRRangeSliderSwiftUITests; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; }; name = Debug; }; - 2DADBEA725CEB01C00518AFF /* Release */ = { + OBJ_38 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_ASSET_PATHS = "\"RRRangeSliderSwiftUI/Preview Content\""; - ENABLE_PREVIEWS = YES; - INFOPLIST_FILE = RRRangeSliderSwiftUI/Info.plist; + CLANG_ENABLE_MODULES = YES; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + HEADER_SEARCH_PATHS = "$(inherited)"; + INFOPLIST_FILE = RRRangeSliderSwiftUI.xcodeproj/RRRangeSliderSwiftUITests_Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.15; + OTHER_CFLAGS = "$(inherited)"; + OTHER_LDFLAGS = "$(inherited)"; + OTHER_SWIFT_FLAGS = "$(inherited)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_VERSION = 5.0; + TARGET_NAME = RRRangeSliderSwiftUITests; + TVOS_DEPLOYMENT_TARGET = 9.0; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; + OBJ_4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_OPTIMIZATION_LEVEL = s; + GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", - "@executable_path/Frameworks", + "SWIFT_PACKAGE=1", ); - PRODUCT_BUNDLE_IDENTIFIER = com.RRRangeSliderSwiftUI; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; + OTHER_SWIFT_FLAGS = "$(inherited) -DXcode"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + USE_HEADERMAP = NO; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2DADBE9125CEB01B00518AFF /* Build configuration list for PBXProject "RRRangeSliderSwiftUI" */ = { + OBJ_18 /* Build configuration list for PBXNativeTarget "RRRangeSliderSwiftUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_19 /* Debug */, + OBJ_20 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_2 /* Build configuration list for PBXProject "RRRangeSliderSwiftUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_3 /* Debug */, + OBJ_4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_25 /* Build configuration list for PBXNativeTarget "RRRangeSliderSwiftUIPackageDescription" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + OBJ_26 /* Debug */, + OBJ_27 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + OBJ_31 /* Build configuration list for PBXAggregateTarget "RRRangeSliderSwiftUIPackageTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2DADBEA325CEB01C00518AFF /* Debug */, - 2DADBEA425CEB01C00518AFF /* Release */, + OBJ_32 /* Debug */, + OBJ_33 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2DADBEA525CEB01C00518AFF /* Build configuration list for PBXNativeTarget "RRRangeSliderSwiftUI" */ = { + OBJ_36 /* Build configuration list for PBXNativeTarget "RRRangeSliderSwiftUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2DADBEA625CEB01C00518AFF /* Debug */, - 2DADBEA725CEB01C00518AFF /* Release */, + OBJ_37 /* Debug */, + OBJ_38 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 2DADBE8E25CEB01B00518AFF /* Project object */; + rootObject = OBJ_1 /* Project object */; } diff --git a/RRRangeSliderSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RRRangeSliderSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..abbad9d --- /dev/null +++ b/RRRangeSliderSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/RRRangeSliderSwiftUI.xcodeproj/xcshareddata/xcschemes/RRRangeSliderSwiftUI-Package.xcscheme b/RRRangeSliderSwiftUI.xcodeproj/xcshareddata/xcschemes/RRRangeSliderSwiftUI-Package.xcscheme new file mode 100644 index 0000000..93a38dd --- /dev/null +++ b/RRRangeSliderSwiftUI.xcodeproj/xcshareddata/xcschemes/RRRangeSliderSwiftUI-Package.xcscheme @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RRRangeSliderSwiftUI.xcworkspace/contents.xcworkspacedata b/RRRangeSliderSwiftUI.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..22f888e --- /dev/null +++ b/RRRangeSliderSwiftUI.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/RRRangeSliderSwiftUI/RRRangeSliderSwiftUIApp.swift b/RRRangeSliderSwiftUI/RRRangeSliderSwiftUIApp.swift deleted file mode 100644 index 6a5f686..0000000 --- a/RRRangeSliderSwiftUI/RRRangeSliderSwiftUIApp.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// RRRangeSliderSwiftUIApp.swift -// RRRangeSliderSwiftUI -// -// Created by Rahul Mayani on 06/02/21. -// - -import SwiftUI - -@main -struct RRRangeSliderSwiftUIApp: App { - var body: some Scene { - WindowGroup { - ContentView() - } - } -} diff --git a/RRRangeSliderSwiftUI/RRRangeSlider.swift b/Sources/RRRangeSliderSwiftUI/RRRangeSliderSwiftUI.swift similarity index 67% rename from RRRangeSliderSwiftUI/RRRangeSlider.swift rename to Sources/RRRangeSliderSwiftUI/RRRangeSliderSwiftUI.swift index e736629..d1c3142 100644 --- a/RRRangeSliderSwiftUI/RRRangeSlider.swift +++ b/Sources/RRRangeSliderSwiftUI/RRRangeSliderSwiftUI.swift @@ -1,51 +1,72 @@ -// -// RRRangeSlider.swift -// RRRangeSliderSwiftUI -// -// Created by Rahul Mayani on 06/02/21. -// - import SwiftUI -struct RRRangeSlider: View { +public struct RRRangeSliderSwiftUI: View { /// ` Slider` Binding min & max values @Binding var minValue: Float @Binding var maxValue: Float + /// Set slider min & max Label values + let minLabel: String + let maxLabel: String + /// Set slider width - @State var sliderWidth: CGFloat = 0.0 + let sliderWidth: Float /// `Slider` background track color - @State var backgroundTrackColor = Color(UIColor.systemTeal).opacity(0.3) + let backgroundTrackColor: Color /// `Slider` selected track color - @State var selectedTrackColor = Color.blue.opacity(25) + let selectedTrackColor: Color /// Globe background color - @State var globeColor = Color.orange + let globeColor: Color /// Globe rounded boarder color - @State var globeBackgroundColor = Color.black + let globeBackgroundColor: Color - /// Globe min & max static and dynamic labels value color - @State var globeMinMaxValuesColor = Color.black + /// Slider min & max static and dynamic labels value color + let sliderMinMaxValuesColor: Color + + /// `Slider` init + public init(minValue: Binding, + maxValue: Binding, + minLabel: String = "0", + maxLabel: String = "100", + sliderWidth: Float = 0, + backgroundTrackColor: Color = Color(UIColor.systemTeal).opacity(0.3), + selectedTrackColor: Color = Color.blue.opacity(25), + globeColor: Color = Color.orange, + globeBackgroundColor: Color = Color.black, + sliderMinMaxValuesColor: Color = Color.black) { + self._minValue = minValue + self._maxValue = maxValue + self.minLabel = minLabel + self.maxLabel = maxLabel + self.sliderWidth = sliderWidth + self.backgroundTrackColor = backgroundTrackColor + self.selectedTrackColor = selectedTrackColor + self.globeColor = globeColor + self.globeBackgroundColor = globeBackgroundColor + self.sliderMinMaxValuesColor = sliderMinMaxValuesColor + } /// `Slider` view setup - var body: some View { + public var body: some View { + VStack { /// `Slider` start & end static values show in view HStack { // start value - Text("0") + Text(minLabel) .offset(x: 28, y: 20) .frame(width: 30, height: 30, alignment: .leading) - .foregroundColor(globeMinMaxValuesColor) + .foregroundColor(sliderMinMaxValuesColor) Spacer() // end value - Text("100") + Text(maxLabel) .offset(x: -18, y: 20) .frame(width: 30, height: 30, alignment: .trailing) - .foregroundColor(globeMinMaxValuesColor) + .foregroundColor(sliderMinMaxValuesColor) } /// `Slider` track view with glob view @@ -80,7 +101,7 @@ struct RRRangeSlider: View { Text(String(format: "%.0f", (CGFloat(self.minValue) / self.sliderWidth) * 100)) .offset(x: CGFloat(self.minValue)) .frame(width: 30, height: 30, alignment: .center) - .foregroundColor(globeMinMaxValuesColor) + .foregroundColor(sliderMinMaxValuesColor) // maximum value glob view Circle() @@ -100,9 +121,10 @@ struct RRRangeSlider: View { Text(String(format: "%.0f", (CGFloat(self.maxValue) / self.sliderWidth) * 100)) .offset(x: CGFloat(self.maxValue - 18)) .frame(width: 30, height: 30, alignment: .center) - .foregroundColor(globeMinMaxValuesColor) + .foregroundColor(sliderMinMaxValuesColor) }) .padding() } } } + diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..0a6c01e --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import RRRangeSliderSwiftUITests + +var tests = [XCTestCaseEntry]() +tests += RRRangeSliderSwiftUITests.allTests() +XCTMain(tests) diff --git a/Tests/RRRangeSliderSwiftUITests/RRRangeSliderSwiftUITests.swift b/Tests/RRRangeSliderSwiftUITests/RRRangeSliderSwiftUITests.swift new file mode 100644 index 0000000..dcae600 --- /dev/null +++ b/Tests/RRRangeSliderSwiftUITests/RRRangeSliderSwiftUITests.swift @@ -0,0 +1,15 @@ +import XCTest +@testable import RRRangeSliderSwiftUI + +final class RRRangeSliderSwiftUITests: XCTestCase { + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(RRRangeSliderSwiftUI().text, "Hello, World!") + } + + static var allTests = [ + ("testExample", testExample), + ] +} diff --git a/Tests/RRRangeSliderSwiftUITests/XCTestManifests.swift b/Tests/RRRangeSliderSwiftUITests/XCTestManifests.swift new file mode 100644 index 0000000..2d444f1 --- /dev/null +++ b/Tests/RRRangeSliderSwiftUITests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !canImport(ObjectiveC) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(RRRangeSliderSwiftUITests.allTests), + ] +} +#endif