diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 5186d07..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba39bf..af652e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 4.1 (2019-01-26) + +Update to Swift 4.2. + # 4.0 (2017-10-16) Update to Swift 4. diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 470121d..73ee72c 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -37,7 +37,7 @@ SPEC CHECKSUMS: OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab Quick: 2623cb30d7a7f41ca62f684f679586558f483d46 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 - ZSWTaggedString: 191f6dce4e64270ae8bf3232d4c325727fffb2e5 + ZSWTaggedString: 0cd21d5c9b23a334da45f10d86ea32bf194ce98c PODFILE CHECKSUM: 3e8e33953f0073437731a654c10dcc1880b9439e diff --git a/Example/Pods/Local Podspecs/ZSWTaggedString.podspec.json b/Example/Pods/Local Podspecs/ZSWTaggedString.podspec.json index 2087208..23c747b 100644 --- a/Example/Pods/Local Podspecs/ZSWTaggedString.podspec.json +++ b/Example/Pods/Local Podspecs/ZSWTaggedString.podspec.json @@ -24,6 +24,7 @@ "APPLICATION_EXTENSION_API_ONLY": "YES" }, "module_map": "ZSWTaggedString/Classes/ZSWTaggedString.modulemap", + "swift_version": "4.2", "subspecs": [ { "name": "Core", diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 470121d..73ee72c 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -37,7 +37,7 @@ SPEC CHECKSUMS: OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab Quick: 2623cb30d7a7f41ca62f684f679586558f483d46 Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66 - ZSWTaggedString: 191f6dce4e64270ae8bf3232d4c325727fffb2e5 + ZSWTaggedString: 0cd21d5c9b23a334da45f10d86ea32bf194ce98c PODFILE CHECKSUM: 3e8e33953f0073437731a654c10dcc1880b9439e diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 3a5ba04..c72fc3c 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -1966,38 +1966,7 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 131A6BC1A28CF6F1331EB56595FCF246 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 092BF1651A31FB6A017E8045FBD3CA0C /* OCMock.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/OCMock/OCMock-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OCMock/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/OCMock/OCMock.modulemap"; - PRODUCT_MODULE_NAME = OCMock; - PRODUCT_NAME = OCMock; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 188B501F4CE05DA2D47FEB1F4F9A1E12 /* Release */ = { + 03CA77A00743AADB081B8667DA3F83E6 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = FD289D88D5454DE4BD2244FC291DFBAA /* ZSWTaggedString.xcconfig */; buildSettings = { @@ -2059,7 +2028,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2067,21 +2036,10 @@ }; name = Release; }; - 3A4D2E4A0759AB14D1E564FBC52F35B6 /* Debug */ = { + 3026FA2E7387F2FC0E8E239E92BD55E1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FD289D88D5454DE4BD2244FC291DFBAA /* ZSWTaggedString.xcconfig */; + baseConfigurationReference = 1C493E0EE4B89027E9710BF387E4F49B /* Expecta.xcconfig */; buildSettings = { - CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; - CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2091,54 +2049,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_TESTABILITY = YES; - GCC_PREFIX_HEADER = "Target Support Files/ZSWTaggedString/ZSWTaggedString-prefix.pch"; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; - GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_MISSING_PARENTHESES = YES; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_VALUE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "Target Support Files/ZSWTaggedString/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Expecta/Expecta-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Expecta/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/ZSWTaggedString/ZSWTaggedString.modulemap"; - OTHER_CFLAGS = ( - "$(inherited)", - "-Wextra -Wno-unused-parameter -Wformat=2 -Wunreachable-code", - ); - PRODUCT_MODULE_NAME = ZSWTaggedString; - PRODUCT_NAME = ZSWTaggedString; - RUN_CLANG_STATIC_ANALYZER = YES; + MODULEMAP_FILE = "Target Support Files/Expecta/Expecta.modulemap"; + PRODUCT_MODULE_NAME = Expecta; + PRODUCT_NAME = Expecta; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 43A8E94CC42C630B261A7ACE083FB01D /* Release */ = { + 3A6585DB37A9F00248BB3F99941A6B8E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 90F4948BE3B4B8BF907AB91C3C8C4254 /* Nimble.xcconfig */; + baseConfigurationReference = 318AFD87EF7B809D470A3B4F49171499 /* Quick.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2149,18 +2080,18 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - PRODUCT_MODULE_NAME = Nimble; - PRODUCT_NAME = Nimble; + MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; + PRODUCT_MODULE_NAME = Quick; + PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2168,7 +2099,40 @@ }; name = Release; }; - 43BD608623679E0E1834C01D423D9646 /* Release */ = { + 4DDFC290E7D75A26A1968DBC065F0075 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5890B2A4A333DC21C79EDDA04866D11E /* Pods-ZSWTaggedString.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-ZSWTaggedString/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 5365D0ED91160A7980575473D869B04B /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D1F7BE71BDC835250570BE8667164411 /* Specta.xcconfig */; buildSettings = { @@ -2192,7 +2156,38 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 5395430911D133B046AD263CFFB69B2E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 90F4948BE3B4B8BF907AB91C3C8C4254 /* Nimble.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + PRODUCT_MODULE_NAME = Nimble; + PRODUCT_NAME = Nimble; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2200,11 +2195,10 @@ }; name = Release; }; - 4DDFC290E7D75A26A1968DBC065F0075 /* Debug */ = { + 657CC9E4FEC933BCE9B1C18705C5065C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5890B2A4A333DC21C79EDDA04866D11E /* Pods-ZSWTaggedString.debug.xcconfig */; + baseConfigurationReference = 90F4948BE3B4B8BF907AB91C3C8C4254 /* Nimble.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2214,28 +2208,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-ZSWTaggedString/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + PRODUCT_MODULE_NAME = Nimble; + PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 65D76CF41A5B96246AC4913AE4A7BED6 /* Release */ = { + 73BAE8A5F5D8A19C2F46E3B665C57E4B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 318AFD87EF7B809D470A3B4F49171499 /* Quick.xcconfig */; + baseConfigurationReference = 092BF1651A31FB6A017E8045FBD3CA0C /* OCMock.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2246,18 +2239,49 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/OCMock/OCMock-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OCMock/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - PRODUCT_MODULE_NAME = Quick; - PRODUCT_NAME = Quick; + MODULEMAP_FILE = "Target Support Files/OCMock/OCMock.modulemap"; + PRODUCT_MODULE_NAME = OCMock; + PRODUCT_NAME = OCMock; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 76985F0443B9AEFF69265E32656992D2 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 092BF1651A31FB6A017E8045FBD3CA0C /* OCMock.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/OCMock/OCMock-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/OCMock/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/OCMock/OCMock.modulemap"; + PRODUCT_MODULE_NAME = OCMock; + PRODUCT_NAME = OCMock; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2327,10 +2351,21 @@ }; name = Release; }; - 9681B39790618BC800206A3E626678C3 /* Release */ = { + A57705B79B7CCEE1084A30AF1107F08C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1C493E0EE4B89027E9710BF387E4F49B /* Expecta.xcconfig */; + baseConfigurationReference = FD289D88D5454DE4BD2244FC291DFBAA /* ZSWTaggedString.xcconfig */; buildSettings = { + CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2340,24 +2375,50 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Expecta/Expecta-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Expecta/Info.plist"; + ENABLE_TESTABILITY = YES; + GCC_PREFIX_HEADER = "Target Support Files/ZSWTaggedString/ZSWTaggedString-prefix.pch"; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; + GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "Target Support Files/ZSWTaggedString/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Expecta/Expecta.modulemap"; - PRODUCT_MODULE_NAME = Expecta; - PRODUCT_NAME = Expecta; + MODULEMAP_FILE = "Target Support Files/ZSWTaggedString/ZSWTaggedString.modulemap"; + OTHER_CFLAGS = ( + "$(inherited)", + "-Wextra -Wno-unused-parameter -Wformat=2 -Wunreachable-code", + ); + PRODUCT_MODULE_NAME = ZSWTaggedString; + PRODUCT_NAME = ZSWTaggedString; + RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; A73625DEBD810B78234FA1958C191C8C /* Debug */ = { isa = XCBuildConfiguration; @@ -2425,72 +2486,7 @@ }; name = Debug; }; - B656763FD95FDD12DF6C0846B75F126E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D1F7BE71BDC835250570BE8667164411 /* Specta.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Specta/Specta-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Specta/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Specta/Specta.modulemap"; - PRODUCT_MODULE_NAME = Specta; - PRODUCT_NAME = Specta; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - C43E148492DE4DA64E65C95BEB870372 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 614739C308C4A199AA9B6BCABC867B33 /* Pods-ZSWTaggedString.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-ZSWTaggedString/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - D310EE5185C9B1FC05BD707CA58AD886 /* Debug */ = { + B28F60B432760304E3A0264EE53B57E9 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 1C493E0EE4B89027E9710BF387E4F49B /* Expecta.xcconfig */; buildSettings = { @@ -2514,16 +2510,17 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - E985A0AAEA56EFF1339AE125CDB3DDD3 /* Release */ = { + B8F3DE0BADC5953F5DF670A254ECEDE3 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 092BF1651A31FB6A017E8045FBD3CA0C /* OCMock.xcconfig */; + baseConfigurationReference = 318AFD87EF7B809D470A3B4F49171499 /* Quick.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2534,29 +2531,29 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/OCMock/OCMock-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/OCMock/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/OCMock/OCMock.modulemap"; - PRODUCT_MODULE_NAME = OCMock; - PRODUCT_NAME = OCMock; + MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; + PRODUCT_MODULE_NAME = Quick; + PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - EF334E511E05680E081BBC0289327E4F /* Debug */ = { + C43E148492DE4DA64E65C95BEB870372 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 318AFD87EF7B809D470A3B4F49171499 /* Quick.xcconfig */; + baseConfigurationReference = 614739C308C4A199AA9B6BCABC867B33 /* Pods-ZSWTaggedString.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2566,27 +2563,29 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-ZSWTaggedString/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - PRODUCT_MODULE_NAME = Quick; - PRODUCT_NAME = Quick; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - F586D4B5E97098CB9B10F19EF3031723 /* Debug */ = { + FE0C677C68A7A7F0B4EC1578AAFBE66F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 90F4948BE3B4B8BF907AB91C3C8C4254 /* Nimble.xcconfig */; + baseConfigurationReference = D1F7BE71BDC835250570BE8667164411 /* Specta.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2597,23 +2596,24 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Specta/Specta-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Specta/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - PRODUCT_MODULE_NAME = Nimble; - PRODUCT_NAME = Nimble; + MODULEMAP_FILE = "Target Support Files/Specta/Specta.modulemap"; + PRODUCT_MODULE_NAME = Specta; + PRODUCT_NAME = Specta; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; /* End XCBuildConfiguration section */ @@ -2621,8 +2621,8 @@ 0DDE98B8274546205A81F82495EF51C6 /* Build configuration list for PBXNativeTarget "ZSWTaggedString" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3A4D2E4A0759AB14D1E564FBC52F35B6 /* Debug */, - 188B501F4CE05DA2D47FEB1F4F9A1E12 /* Release */, + A57705B79B7CCEE1084A30AF1107F08C /* Debug */, + 03CA77A00743AADB081B8667DA3F83E6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2630,8 +2630,8 @@ 10836172B46B0B0B73CE062C21769FF3 /* Build configuration list for PBXNativeTarget "Nimble" */ = { isa = XCConfigurationList; buildConfigurations = ( - F586D4B5E97098CB9B10F19EF3031723 /* Debug */, - 43A8E94CC42C630B261A7ACE083FB01D /* Release */, + 657CC9E4FEC933BCE9B1C18705C5065C /* Debug */, + 5395430911D133B046AD263CFFB69B2E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2648,8 +2648,8 @@ 746CEAC1F619988F8DB1D62AB4AB6C02 /* Build configuration list for PBXNativeTarget "Expecta" */ = { isa = XCConfigurationList; buildConfigurations = ( - D310EE5185C9B1FC05BD707CA58AD886 /* Debug */, - 9681B39790618BC800206A3E626678C3 /* Release */, + 3026FA2E7387F2FC0E8E239E92BD55E1 /* Debug */, + B28F60B432760304E3A0264EE53B57E9 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2666,8 +2666,8 @@ AA1C5725DF4405158FE6197B7E7F6A95 /* Build configuration list for PBXNativeTarget "Quick" */ = { isa = XCConfigurationList; buildConfigurations = ( - EF334E511E05680E081BBC0289327E4F /* Debug */, - 65D76CF41A5B96246AC4913AE4A7BED6 /* Release */, + B8F3DE0BADC5953F5DF670A254ECEDE3 /* Debug */, + 3A6585DB37A9F00248BB3F99941A6B8E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2675,8 +2675,8 @@ C87485AD05DC406735A6DB101E1CE041 /* Build configuration list for PBXNativeTarget "Specta" */ = { isa = XCConfigurationList; buildConfigurations = ( - B656763FD95FDD12DF6C0846B75F126E /* Debug */, - 43BD608623679E0E1834C01D423D9646 /* Release */, + 5365D0ED91160A7980575473D869B04B /* Debug */, + FE0C677C68A7A7F0B4EC1578AAFBE66F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2684,8 +2684,8 @@ E1A3A8D4EA0C453195227077B32F90E3 /* Build configuration list for PBXNativeTarget "OCMock" */ = { isa = XCConfigurationList; buildConfigurations = ( - 131A6BC1A28CF6F1331EB56595FCF246 /* Debug */, - E985A0AAEA56EFF1339AE125CDB3DDD3 /* Release */, + 73BAE8A5F5D8A19C2F46E3B665C57E4B /* Debug */, + 76985F0443B9AEFF69265E32656992D2 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Tests/Tests/READMEExamples.swift b/Example/Tests/Tests/READMEExamples.swift index 99960e5..36346b5 100644 --- a/Example/Tests/Tests/READMEExamples.swift +++ b/Example/Tests/Tests/READMEExamples.swift @@ -70,7 +70,7 @@ class READMEExamplesSpec: QuickSpec { override func spec() { // Dynamic attributes give you an opportunity to decide what to do for each tag options["story"] = .dynamic({ tagName, tagAttributes, existingAttributes in - var attributes = [NSAttributedStringKey: AnyObject]() + var attributes = [NSAttributedString.Key: AnyObject]() guard let typeString = tagAttributes["type"] as? String, let type = Story.StoryType(rawValue: typeString) else { @@ -99,7 +99,7 @@ class READMEExamplesSpec: QuickSpec { override func spec() { ] options.unknownTagAttributes = .dynamic({ tagName, tagAttributes, existingAttributes in - var attributes = [NSAttributedStringKey: Any]() + var attributes = [NSAttributedString.Key: Any]() if let font = existingAttributes[.font] as? UIFont { switch tagName { @@ -113,7 +113,7 @@ class READMEExamplesSpec: QuickSpec { override func spec() { } if tagName == "u" { - attributes[.underlineStyle] = NSUnderlineStyle.styleSingle.rawValue + attributes[.underlineStyle] = NSUnderlineStyle.single.rawValue } return attributes diff --git a/Example/Tests/Tests/ZSWTaggedStringOptionsSpec.swift b/Example/Tests/Tests/ZSWTaggedStringOptionsSpec.swift index 3d61e84..3f1fa3c 100644 --- a/Example/Tests/Tests/ZSWTaggedStringOptionsSpec.swift +++ b/Example/Tests/Tests/ZSWTaggedStringOptionsSpec.swift @@ -31,7 +31,7 @@ class ZSWTaggedStringOptionsSpec: QuickSpec { override func spec() { } context("setting a static attribute") { - let testKey = NSAttributedStringKey(rawValue: "key") + let testKey = NSAttributedString.Key(rawValue: "key") beforeEach { options["a"] = .static([ @@ -61,7 +61,7 @@ class ZSWTaggedStringOptionsSpec: QuickSpec { override func spec() { } context("setting a dynamic attribute") { - let testKey = NSAttributedStringKey(rawValue: "key") + let testKey = NSAttributedString.Key(rawValue: "key") beforeEach { options["a"] = .dynamic({ _, _, _ in @@ -81,7 +81,7 @@ class ZSWTaggedStringOptionsSpec: QuickSpec { override func spec() { case .static(_): fail("Retrieved a static when expecting dynamic") case .dynamic(let block): - let attributes = block("a", [String: Any](), [NSAttributedStringKey: Any]()) + let attributes = block("a", [String: Any](), [NSAttributedString.Key: Any]()) expect(attributes[testKey] as? Bool) == true } } diff --git a/Example/ZSWTaggedString.xcodeproj/project.pbxproj b/Example/ZSWTaggedString.xcodeproj/project.pbxproj index 446c7e9..cde5dff 100644 --- a/Example/ZSWTaggedString.xcodeproj/project.pbxproj +++ b/Example/ZSWTaggedString.xcodeproj/project.pbxproj @@ -199,7 +199,7 @@ ORGANIZATIONNAME = "Zachary West"; TargetAttributes = { 6003F5AD195388D20070C39A = { - LastSwiftMigration = 0900; + LastSwiftMigration = 1010; TestTargetID = 6003F589195388D20070C39A; }; }; @@ -396,8 +396,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Tests/Tests/ZSWTaggedString-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = xctest; }; @@ -419,8 +418,7 @@ PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)Test"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Tests/Tests/ZSWTaggedString-Bridging-Header.h"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = xctest; }; diff --git a/README.md b/README.md index 8b03a02..e5af8bd 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ options["i"] = .static([ // Dynamic attributes give you an opportunity to decide what to do for each tag options["story"] = .dynamic({ tagName, tagAttributes, existingAttributes in - var attributes = [NSAttributedStringKey: AnyObject]() + var attributes = [NSAttributedString.Key: AnyObject]() guard let typeString = tagAttributes["type"] as? String, let type = Story.StoryType(rawValue: typeString) else { @@ -165,7 +165,7 @@ options.baseAttributes = [ ] options.unknownTagAttributes = .dynamic({ tagName, tagAttributes, existingAttributes in - var attributes = [NSAttributedStringKey: Any]() + var attributes = [NSAttributedString.Key: Any]() if let font = existingAttributes[.font] as? UIFont { switch tagName { @@ -179,7 +179,7 @@ options.unknownTagAttributes = .dynamic({ tagName, tagAttributes, existingAttrib } if tagName == "u" { - attributes[.underlineStyle] = NSUnderlineStyle.styleSingle.rawValue + attributes[.underlineStyle] = NSUnderlineStyle.single.rawValue } return attributes diff --git a/ZSWTaggedString.podspec b/ZSWTaggedString.podspec index c74a0d0..c72f4cb 100644 --- a/ZSWTaggedString.podspec +++ b/ZSWTaggedString.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "ZSWTaggedString" - s.version = "4.0" + s.version = "4.1" s.summary = "Converts a String (or NSString) with tags (like HTML) into an NSAttributedString" s.description = <<-DESC Tags in a ZSWTaggedString are like HTML, except you define what they mean. @@ -21,6 +21,7 @@ Pod::Spec.new do |s| s.default_subspecs = 'Core' s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } s.module_map = 'ZSWTaggedString/Classes/ZSWTaggedString.modulemap' + s.swift_version = '4.2' s.subspec 'Core' do |core| core.source_files = 'ZSWTaggedString/Classes/**/*.{h,m}', 'ZSWTaggedString/Private/**/*.{h,m}' diff --git a/ZSWTaggedString/Classes/ZSWTaggedStringOptions.swift b/ZSWTaggedString/Classes/ZSWTaggedStringOptions.swift index b38549a..9029bb7 100644 --- a/ZSWTaggedString/Classes/ZSWTaggedStringOptions.swift +++ b/ZSWTaggedString/Classes/ZSWTaggedStringOptions.swift @@ -23,7 +23,7 @@ extension ZSWTaggedStringOptions { - Returns: The `NSAttributedString` attributes you wish to be applied for the tag. */ - public typealias DynamicAttributes = (_ tagName: String, _ tagAttributes: [String: Any], _ existingStringAttributes: [NSAttributedStringKey: Any]) -> [NSAttributedStringKey: Any] + public typealias DynamicAttributes = (_ tagName: String, _ tagAttributes: [String: Any], _ existingStringAttributes: [NSAttributedString.Key: Any]) -> [NSAttributedString.Key: Any] /** Attributes to be applied to an attributed string. @@ -33,7 +33,7 @@ extension ZSWTaggedStringOptions { */ public enum Attributes { case dynamic(DynamicAttributes) - case `static`([NSAttributedStringKey: Any]) + case `static`([NSAttributedString.Key: Any]) init(wrapper: ZSWTaggedStringAttribute) { if let dictionary = wrapper.staticDictionary {