diff --git a/.swift-version b/.swift-version index 8a36cd1..7ed6ff8 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.1 \ No newline at end of file +5 diff --git a/.travis.yml b/.travis.yml index 120ba34..62d1862 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: swift -osx_image: xcode9.3 -xcode_sdk: iphonesimulator11.3 +osx_image: xcode10.2 +xcode_sdk: iphonesimulator12.2 script: ./scripts/ci.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 40af577..46cb6bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.0.0 (June 29, 2019) + +- Swift 5.0 Update +- Removing minor warnings + ## 2.2.0 (May 24, 2018) - Swift 4.1 Update diff --git a/CheatyXML.podspec b/CheatyXML.podspec index 27a1efe..05391b2 100644 --- a/CheatyXML.podspec +++ b/CheatyXML.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "CheatyXML" - s.version = "2.2.0" + s.version = "3.0.0" s.summary = "CheatyXML" s.description = <<-DESC @@ -66,7 +66,7 @@ Pod::Spec.new do |s| # Supports git, hg, bzr, svn and HTTP. # - s.source = { :git => "https://github.com/lobodart/CheatyXML.git", :tag => "v2.2.0" } + s.source = { :git => "https://github.com/lobodart/CheatyXML.git", :tag => "v3.0.0" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # diff --git a/CheatyXML.xcodeproj/project.pbxproj b/CheatyXML.xcodeproj/project.pbxproj index 8cc3405..3c2ce20 100644 --- a/CheatyXML.xcodeproj/project.pbxproj +++ b/CheatyXML.xcodeproj/project.pbxproj @@ -184,17 +184,18 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "Louis BODART"; TargetAttributes = { 486D487A1AB4A19D004F6258 = { CreatedOnToolsVersion = 6.2; DevelopmentTeam = 58G6JMC92R; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 486D48851AB4A19D004F6258 = { CreatedOnToolsVersion = 6.2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; + ProvisioningStyle = Automatic; }; }; }; @@ -203,6 +204,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 486D48711AB4A19D004F6258; @@ -272,6 +274,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -280,12 +283,14 @@ 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_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_RANGE_LOOP_ANALYSIS = YES; @@ -318,7 +323,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -329,6 +334,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -337,12 +343,14 @@ 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_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_RANGE_LOOP_ANALYSIS = YES; @@ -367,7 +375,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -393,8 +401,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -415,14 +422,16 @@ PRODUCT_BUNDLE_IDENTIFIER = fr.louisbodart.CheatyXML; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; 486D48951AB4A19D004F6258 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -435,14 +444,17 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "RealmTeam.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; }; name = Debug; }; 486D48961AB4A19D004F6258 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -451,8 +463,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "RealmTeam.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/CheatyXML.xcodeproj/xcshareddata/xcschemes/CheatyXML.xcscheme b/CheatyXML.xcodeproj/xcshareddata/xcschemes/CheatyXML.xcscheme index dcd719e..f2031d5 100644 --- a/CheatyXML.xcodeproj/xcshareddata/xcschemes/CheatyXML.xcscheme +++ b/CheatyXML.xcodeproj/xcshareddata/xcschemes/CheatyXML.xcscheme @@ -1,6 +1,6 @@ , attributes(\(self.attributes.count)): \(self.attributes), children: \(self._subElements.count)" + return "CXMLTag <\(self.tagName ?? "???")>, attributes(\(self.attributes.count)): \(self.attributes), children: \(self._subElements.count)" } open var exists: Bool { get { return !(self is CXMLNullTag) } } @@ -83,7 +83,7 @@ open class CXMLTag: CXMLElement, Sequence, IteratorProtocol { } open func attribute(_ name: String) -> CXMLAttribute { - guard let index = self._attributes.index(where: { (attribute) -> Bool in + guard let index = self._attributes.firstIndex(where: { (attribute) -> Bool in return attribute.name == name }) else { return CXMLNullAttribute() @@ -140,7 +140,7 @@ open class CXMLTag: CXMLElement, Sequence, IteratorProtocol { public extension Sequence where Iterator.Element: CXMLAttribute { - public var dictionary: [String: String] { + var dictionary: [String: String] { get { return self.reduce([:], { (dict: [String: String], value: CXMLAttribute) -> [String: String] in var newDict = dict diff --git a/CheatyXML/Info.plist b/CheatyXML/Info.plist index d05cf5e..664370c 100644 --- a/CheatyXML/Info.plist +++ b/CheatyXML/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.0 + 3.0.0 CFBundleSignature ???? CFBundleVersion