diff --git a/Source/Supporting Files/Info.plist b/Info.plist similarity index 100% rename from Source/Supporting Files/Info.plist rename to Info.plist diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..fc53ec4 --- /dev/null +++ b/Package.swift @@ -0,0 +1,25 @@ +// swift-tools-version:5.5 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Swash", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "Swash", + targets: ["Swash"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, 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: "Swash", + dependencies: []) + ] +) diff --git a/Source/CascadingFontProperties.swift b/Sources/Swash/CascadingFontProperties.swift similarity index 100% rename from Source/CascadingFontProperties.swift rename to Sources/Swash/CascadingFontProperties.swift diff --git a/Source/Default Sizes/DefaultSizes+iOS.swift b/Sources/Swash/Default Sizes/DefaultSizes+iOS.swift similarity index 100% rename from Source/Default Sizes/DefaultSizes+iOS.swift rename to Sources/Swash/Default Sizes/DefaultSizes+iOS.swift diff --git a/Source/Default Sizes/DefaultSizes+tvOS.swift b/Sources/Swash/Default Sizes/DefaultSizes+tvOS.swift similarity index 100% rename from Source/Default Sizes/DefaultSizes+tvOS.swift rename to Sources/Swash/Default Sizes/DefaultSizes+tvOS.swift diff --git a/Source/Default Sizes/DefaultSizes+watchOS.swift b/Sources/Swash/Default Sizes/DefaultSizes+watchOS.swift similarity index 100% rename from Source/Default Sizes/DefaultSizes+watchOS.swift rename to Sources/Swash/Default Sizes/DefaultSizes+watchOS.swift diff --git a/Source/Font.swift b/Sources/Swash/Font.swift similarity index 100% rename from Source/Font.swift rename to Sources/Swash/Font.swift diff --git a/Source/Supporting Files/Swash.h b/Sources/Swash/Supporting Files/Swash.h similarity index 100% rename from Source/Supporting Files/Swash.h rename to Sources/Swash/Supporting Files/Swash.h diff --git a/Source/SystemFont.swift b/Sources/Swash/SystemFont.swift similarity index 100% rename from Source/SystemFont.swift rename to Sources/Swash/SystemFont.swift diff --git a/Source/Utils.swift b/Sources/Swash/Utils.swift similarity index 100% rename from Source/Utils.swift rename to Sources/Swash/Utils.swift diff --git a/Swash.podspec b/Swash.podspec deleted file mode 100644 index fb7070b..0000000 --- a/Swash.podspec +++ /dev/null @@ -1,22 +0,0 @@ -# -# Be sure to run `pod lib lint Swash.podspec' to ensure this is a -# valid spec before submitting. -# - -Pod::Spec.new do |s| - s.name = 'Swash' - s.version = '4.0.0' - s.summary = 'A simple, safe, and expressive abstraction of UIFont with baked-in support for dynamic type.' - s.homepage = 'https://github.com/Mindgrub/Swash' - s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = 'Mindgrub' - s.source = { :git => 'https://github.com/Mindgrub/Swash.git', :tag => s.version.to_s } - s.social_media_url = 'https://twitter.com/mindgrub' - - s.ios.deployment_target = '8.2' - s.tvos.deployment_target = "9.0" - s.watchos.deployment_target = "2.0" - s.swift_version = '5.1' - - s.source_files = 'Source/**/*.swift' -end diff --git a/Swash.xcodeproj/project.pbxproj b/Swash.xcodeproj/project.pbxproj index 8c8409d..276c985 100644 --- a/Swash.xcodeproj/project.pbxproj +++ b/Swash.xcodeproj/project.pbxproj @@ -37,9 +37,7 @@ 224BAC75224FF65300316608 /* Swash.h in Headers */ = {isa = PBXBuildFile; fileRef = 224BAC06224F41F100316608 /* Swash.h */; settings = {ATTRIBUTES = (Public, ); }; }; 224BAC76224FF65400316608 /* Swash.h in Headers */ = {isa = PBXBuildFile; fileRef = 224BAC06224F41F100316608 /* Swash.h */; settings = {ATTRIBUTES = (Public, ); }; }; 22886BA8242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; - 22886BA9242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; 22886BAA242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; - 22886BAB242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; 22886BAC242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; }; /* End PBXBuildFile section */ @@ -78,11 +76,11 @@ 224BAC42224FF35300316608 /* Swash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 224BAC4A224FF35400316608 /* Swash tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Swash tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 224BAC67224FF62200316608 /* Swash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swash.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 224BAC78224FF84600316608 /* Swash.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Swash.podspec; sourceTree = ""; }; 224BAC79224FF85D00316608 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 224BAC98224FFE7400316608 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 224BAC99224FFEB900316608 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CascadingFontProperties.swift; sourceTree = ""; }; + CB8EBC112798670600CFBB98 /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -130,7 +128,7 @@ isa = PBXGroup; children = ( 224BAC77224FF82C00316608 /* Deployment */, - 224BAC05224F41F100316608 /* Source */, + 224BAC05224F41F100316608 /* Sources */, 224BAC34224F44AE00316608 /* Tests */, 224BAC04224F41F100316608 /* Products */, ); @@ -148,17 +146,12 @@ name = Products; sourceTree = ""; }; - 224BAC05224F41F100316608 /* Source */ = { + 224BAC05224F41F100316608 /* Sources */ = { isa = PBXGroup; children = ( - 224BAC2C224F443700316608 /* Font.swift */, - 224BAC2A224F443700316608 /* SystemFont.swift */, - 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */, - 224BAC2B224F443700316608 /* Utils.swift */, - 224BAC20224F43F200316608 /* Default Sizes */, - 224BAC33224F444B00316608 /* Supporting Files */, + CB8EBC102798665400CFBB98 /* Swash */, ); - path = Source; + path = Sources; sourceTree = ""; }; 224BAC20224F43F200316608 /* Default Sizes */ = { @@ -175,7 +168,6 @@ isa = PBXGroup; children = ( 224BAC06224F41F100316608 /* Swash.h */, - 224BAC07224F41F100316608 /* Info.plist */, ); path = "Supporting Files"; sourceTree = ""; @@ -194,14 +186,28 @@ 224BAC77224FF82C00316608 /* Deployment */ = { isa = PBXGroup; children = ( + CB8EBC112798670600CFBB98 /* Package.swift */, 224BAC98224FFE7400316608 /* README.md */, 224BAC99224FFEB900316608 /* CHANGELOG.md */, - 224BAC78224FF84600316608 /* Swash.podspec */, 224BAC79224FF85D00316608 /* LICENSE */, + 224BAC07224F41F100316608 /* Info.plist */, ); name = Deployment; sourceTree = ""; }; + CB8EBC102798665400CFBB98 /* Swash */ = { + isa = PBXGroup; + children = ( + 224BAC2C224F443700316608 /* Font.swift */, + 224BAC2A224F443700316608 /* SystemFont.swift */, + 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */, + 224BAC2B224F443700316608 /* Utils.swift */, + 224BAC20224F43F200316608 /* Default Sizes */, + 224BAC33224F444B00316608 /* Supporting Files */, + ); + path = Swash; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -329,7 +335,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1020; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1320; ORGANIZATIONNAME = Mindgrub; TargetAttributes = { 224BAC02224F41F100316608 = { @@ -430,7 +436,6 @@ buildActionMask = 2147483647; files = ( 224BAC3C224F459500316608 /* TestFonts.swift in Sources */, - 22886BA9242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */, 224BAC39224F44AE00316608 /* CustomFontTests.swift in Sources */, 224BAC38224F44AE00316608 /* SystemFontTests.swift in Sources */, ); @@ -455,7 +460,6 @@ buildActionMask = 2147483647; files = ( 224BAC5F224FF4B500316608 /* TestFonts.swift in Sources */, - 22886BAB242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */, 224BAC61224FF4B500316608 /* CustomFontTests.swift in Sources */, 224BAC60224FF4B500316608 /* SystemFontTests.swift in Sources */, ); @@ -517,6 +521,7 @@ 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; @@ -582,6 +587,7 @@ 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; @@ -626,9 +632,9 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; + INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.2; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -655,9 +661,9 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; + INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.2; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -718,7 +724,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; + INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -732,7 +738,7 @@ SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 12.2; }; name = Debug; }; @@ -746,7 +752,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; + INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -760,7 +766,7 @@ SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.0; + TVOS_DEPLOYMENT_TARGET = 12.2; }; name = Release; }; @@ -814,7 +820,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; + INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -842,7 +848,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Source/Supporting Files/Info.plist"; + INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/Swash.xcodeproj/xcshareddata/xcschemes/Swash iOS Tests.xcscheme b/Swash.xcodeproj/xcshareddata/xcschemes/Swash iOS Tests.xcscheme index 0d61fd3..1bd0793 100644 --- a/Swash.xcodeproj/xcshareddata/xcschemes/Swash iOS Tests.xcscheme +++ b/Swash.xcodeproj/xcshareddata/xcschemes/Swash iOS Tests.xcscheme @@ -1,6 +1,6 @@ - - - - - - diff --git a/Swash.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Swash.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/Swash.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Swash.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/Swash.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 0c67376..0000000 --- a/Swash.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/Tests/CustomFontTests.swift b/Tests/CustomFontTests.swift index 053f2b6..25d3dd0 100644 --- a/Tests/CustomFontTests.swift +++ b/Tests/CustomFontTests.swift @@ -49,17 +49,17 @@ class CustomFontTests: XCTestCase { //MARK: - Dynamic Type - Deprecated in iOS 11 func testOfStyle() { - let font = Futura.medium.of(style: .title3) + let font = Futura.medium.of(textStyle: .title3) XCTAssertEqual(font.fontName, "Futura-Medium") } func testOfStyleMax() { - let font = Futura.medium.of(style: .title3, maxSize: 10) + let font = Futura.medium.of(textStyle: .title3, maxSize: 10) XCTAssertEqual(font.fontName, "Futura-Medium") } func testInvalidOfStyle() { - let font = InvalidFont.doesNotExist.of(style: .caption1) + let font = InvalidFont.doesNotExist.of(textStyle: .caption1) XCTAssertEqual(font.fontName, ".SFUI-Regular") }