From 9fad39b11c84b0d6d134d7cd036ae31f22b86d75 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 18:54:10 -0700 Subject: [PATCH 01/11] Updates for Xcode 11 --- Tests/Gemfile => Gemfile | 2 +- Gemfile.lock | 83 ++++++++++++++ KissXML.podspec | 24 ++++- KissXML.xcodeproj/project.pbxproj | 55 ++++++++-- KissXML/DDXMLNode.m | 2 +- .../KissXMLTests.xcodeproj/project.pbxproj | 43 ++++++-- Tests/Gemfile.lock | 73 ------------- Tests/Mac/KissXML.xcodeproj/project.pbxproj | 102 +++++++++++++----- .../xcschemes/KissXMLTests.xcscheme | 6 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ Tests/Mac/Podfile.lock | 13 ++- .../KissXML.xcodeproj/project.pbxproj | 59 +++++----- .../xcschemes/KissXMLSwiftTests.xcscheme | 8 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ Tests/Swift-iOS/Podfile.lock | 15 ++- Tests/Swift/KissXML.xcodeproj/project.pbxproj | 59 +++++----- .../xcschemes/KissXMLSwiftTests.xcscheme | 8 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ Tests/Swift/Podfile.lock | 15 ++- Tests/iOS/KissXML.xcodeproj/project.pbxproj | 26 ++--- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ Tests/iOS/Podfile.lock | 13 ++- 22 files changed, 403 insertions(+), 235 deletions(-) rename Tests/Gemfile => Gemfile (53%) create mode 100644 Gemfile.lock delete mode 100644 Tests/Gemfile.lock create mode 100644 Tests/Mac/KissXML.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Tests/Swift-iOS/KissXML.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Tests/Swift/KissXML.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Tests/iOS/KissXML.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Tests/Gemfile b/Gemfile similarity index 53% rename from Tests/Gemfile rename to Gemfile index 8212b6f2..d1bf7c6f 100644 --- a/Tests/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source "https://rubygems.org" -gem "cocoapods", "~>1.3.1" +gem "cocoapods" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..659269c3 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,83 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.1) + activesupport (4.2.11.1) + i18n (~> 0.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + algoliasearch (1.27.1) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + claide (1.0.3) + cocoapods (1.8.4) + activesupport (>= 4.0.2, < 5) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.8.4) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 1.2.2, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-stats (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.6.6) + nap (~> 1.0) + ruby-macho (~> 1.4) + xcodeproj (>= 1.11.1, < 2.0) + cocoapods-core (1.8.4) + activesupport (>= 4.0.2, < 6) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + cocoapods-deintegrate (1.0.4) + cocoapods-downloader (1.2.2) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.0) + cocoapods-stats (1.1.0) + cocoapods-trunk (1.4.1) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.1.0) + colored2 (3.1.2) + concurrent-ruby (1.1.5) + escape (0.0.4) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + json (2.2.0) + minitest (5.12.2) + molinillo (0.6.6) + nanaimo (0.2.6) + nap (1.1.0) + netrc (0.11.0) + ruby-macho (1.4.0) + thread_safe (0.3.6) + tzinfo (1.2.5) + thread_safe (~> 0.1) + xcodeproj (1.13.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.2.6) + +PLATFORMS + ruby + +DEPENDENCIES + cocoapods + +BUNDLED WITH + 1.17.2 diff --git a/KissXML.podspec b/KissXML.podspec index 27a3aeca..12ee85d8 100644 --- a/KissXML.podspec +++ b/KissXML.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'KissXML' - s.version = '5.2.3' + s.version = '5.2.4' s.license = { :type => 'MIT', :file => 'LICENSE.txt' } s.summary = 'A replacement for Cocoa\'s NSXML cluster of classes. Based on libxml.' s.homepage = 'https://github.com/robbiehanson/KissXML' @@ -9,10 +9,24 @@ Pod::Spec.new do |s| s.requires_arc = true - s.source_files = 'KissXML/**/*.{h,m}' - s.private_header_files = 'KissXML/Private/**/*.h' - s.library = 'xml2' - s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'} + s.default_subspec = 'All' + + s.subspec 'Core' do |ss| + ss.source_files = 'KissXML/*.{h,m}', 'KissXML/Private/*.h' + ss.private_header_files = 'KissXML/Private/**/*.h' + ss.library = 'xml2' + ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'} + end + + s.subspec 'Additions' do |ss| + ss.dependency 'KissXML/Core' + ss.source_files = 'KissXML/Additions/*.{h,m}', 'KissXML/Categories/*.{h,m}' + end + + s.subspec 'All' do |ss| + ss.dependency 'KissXML/Core' + ss.dependency 'KissXML/Additions' + end s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.9' diff --git a/KissXML.xcodeproj/project.pbxproj b/KissXML.xcodeproj/project.pbxproj index 2dfb7373..8afc0807 100644 --- a/KissXML.xcodeproj/project.pbxproj +++ b/KissXML.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ @@ -357,7 +357,7 @@ }; }; buildConfigurationList = 0DCD8DC41E54A3A2001D9832 /* Build configuration list for PBXProject "KissXML" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -572,7 +572,8 @@ IPHONEOS_DEPLOYMENT_TARGET = 10.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -595,7 +596,11 @@ INFOPLIST_FILE = KissXML/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML; PRODUCT_NAME = "$(PROJECT_NAME)"; SKIP_INSTALL = YES; @@ -617,7 +622,11 @@ INFOPLIST_FILE = KissXML/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML; PRODUCT_NAME = "$(PROJECT_NAME)"; SKIP_INSTALL = YES; @@ -637,7 +646,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = KissXML/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML; PRODUCT_NAME = "$(PROJECT_NAME)"; @@ -660,7 +673,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = KissXML/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML; PRODUCT_NAME = "$(PROJECT_NAME)"; @@ -682,7 +699,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = KissXML/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = appletvos; @@ -706,7 +727,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = KissXML/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = appletvos; @@ -729,7 +754,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = KissXML/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = watchos; @@ -753,7 +782,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = KissXML/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML; PRODUCT_NAME = "$(PROJECT_NAME)"; SDKROOT = watchos; diff --git a/KissXML/DDXMLNode.m b/KissXML/DDXMLNode.m index fa734dba..903a5694 100644 --- a/KissXML/DDXMLNode.m +++ b/KissXML/DDXMLNode.m @@ -1957,7 +1957,7 @@ + (NSError *)lastError [lastErrorValue getValue:&lastError]; int errCode = lastError.code; - NSString *errMsg = [[NSString stringWithFormat:@"%s", lastError.message] stringByTrimming]; + NSString *errMsg = [[NSString stringWithFormat:@"%s", lastError.message] stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet]; NSDictionary *info = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; diff --git a/Tests/Framework/KissXMLTests.xcodeproj/project.pbxproj b/Tests/Framework/KissXMLTests.xcodeproj/project.pbxproj index 3029d3a0..62cb9470 100644 --- a/Tests/Framework/KissXMLTests.xcodeproj/project.pbxproj +++ b/Tests/Framework/KissXMLTests.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ @@ -240,7 +240,7 @@ }; }; buildConfigurationList = D9AA724D1C56EE9D00002BEE /* Build configuration list for PBXProject "KissXMLTests" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -410,7 +410,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -453,7 +457,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = io.ballinger.KissXMLTests; @@ -500,7 +508,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -543,7 +555,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = io.ballinger.KissXMLTests; @@ -618,7 +634,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; }; name = Release; @@ -661,7 +678,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -704,7 +725,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = io.ballinger.KissXMLTests; diff --git a/Tests/Gemfile.lock b/Tests/Gemfile.lock deleted file mode 100644 index 437cab4d..00000000 --- a/Tests/Gemfile.lock +++ /dev/null @@ -1,73 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (2.3.5) - activesupport (4.2.8) - i18n (~> 0.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - claide (1.0.1) - cocoapods (1.2.0) - activesupport (>= 4.0.2, < 5) - claide (>= 1.0.1, < 2.0) - cocoapods-core (= 1.2.0) - cocoapods-deintegrate (>= 1.0.1, < 2.0) - cocoapods-downloader (>= 1.1.3, < 2.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-stats (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.1.2, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored (~> 1.2) - escape (~> 0.0.4) - fourflusher (~> 2.0.1) - gh_inspector (~> 1.0) - molinillo (~> 0.5.5) - nap (~> 1.0) - ruby-macho (~> 0.2.5) - xcodeproj (>= 1.4.1, < 2.0) - cocoapods-core (1.2.0) - activesupport (>= 4.0.2, < 5) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - cocoapods-deintegrate (1.0.1) - cocoapods-downloader (1.1.3) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.0) - cocoapods-stats (1.0.0) - cocoapods-trunk (1.1.2) - nap (>= 0.8, < 2.0) - netrc (= 0.7.8) - cocoapods-try (1.1.0) - colored (1.2) - escape (0.0.4) - fourflusher (2.0.1) - fuzzy_match (2.0.4) - gh_inspector (1.0.3) - i18n (0.8.0) - minitest (5.10.1) - molinillo (0.5.6) - nanaimo (0.2.3) - nap (1.1.0) - netrc (0.7.8) - ruby-macho (0.2.6) - thread_safe (0.3.5) - tzinfo (1.2.2) - thread_safe (~> 0.1) - xcodeproj (1.4.2) - CFPropertyList (~> 2.3.3) - activesupport (>= 3) - claide (>= 1.0.1, < 2.0) - colored (~> 1.2) - nanaimo (~> 0.2.3) - -PLATFORMS - ruby - -DEPENDENCIES - cocoapods (~> 1.2.0) - -BUNDLED WITH - 1.13.7 diff --git a/Tests/Mac/KissXML.xcodeproj/project.pbxproj b/Tests/Mac/KissXML.xcodeproj/project.pbxproj index b16f0294..f1bf96b6 100644 --- a/Tests/Mac/KissXML.xcodeproj/project.pbxproj +++ b/Tests/Mac/KissXML.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -88,7 +88,6 @@ D9AA72511C56EEF500002BEE /* Frameworks */, D9AA72521C56EEF500002BEE /* Resources */, F56C501C4276001EBA03B38D /* [CP] Embed Pods Frameworks */, - 3BDE45A80620649B78C1DDEB /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -106,7 +105,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0720; + LastUpgradeCheck = 1110; TargetAttributes = { D9AA72531C56EEF500002BEE = { CreatedOnToolsVersion = 7.2; @@ -114,10 +113,11 @@ }; }; buildConfigurationList = D9AA724D1C56EE9D00002BEE /* Build configuration list for PBXProject "KissXML" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 11.0"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = D9AA72491C56EE9D00002BEE; @@ -141,34 +141,22 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 3BDE45A80620649B78C1DDEB /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; E1F9D2C531D17B74F389EB73 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-KissXMLTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; F56C501C4276001EBA03B38D /* [CP] Embed Pods Frameworks */ = { @@ -176,14 +164,16 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -203,12 +193,66 @@ D9AA724E1C56EE9D00002BEE /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; }; name = Debug; }; D9AA724F1C56EE9D00002BEE /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; }; name = Release; }; @@ -251,7 +295,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = KissXMLTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -294,7 +342,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = KissXMLTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = io.ballinger.KissXMLTests; diff --git a/Tests/Mac/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLTests.xcscheme b/Tests/Mac/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLTests.xcscheme index a7716066..632090f0 100644 --- a/Tests/Mac/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLTests.xcscheme +++ b/Tests/Mac/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLTests.xcscheme @@ -1,6 +1,6 @@ - - - - + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/Mac/Podfile.lock b/Tests/Mac/Podfile.lock index ee20c9b8..164f0055 100644 --- a/Tests/Mac/Podfile.lock +++ b/Tests/Mac/Podfile.lock @@ -1,5 +1,12 @@ PODS: - - KissXML (5.2.0) + - KissXML (5.2.4): + - KissXML/All (= 5.2.4) + - KissXML/Additions (5.2.4): + - KissXML/Core + - KissXML/All (5.2.4): + - KissXML/Additions + - KissXML/Core + - KissXML/Core (5.2.4) DEPENDENCIES: - KissXML (from `../../`) @@ -9,8 +16,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - KissXML: '065808bfb7175710738cfbfaa248ba04abe41912' + KissXML: ecc1afc5a6b2b302505f926a15584213c01f29ce PODFILE CHECKSUM: d877c76a6dd7d1b779a72b4b48c5745d694068e5 -COCOAPODS: 1.2.0 +COCOAPODS: 1.8.4 diff --git a/Tests/Swift-iOS/KissXML.xcodeproj/project.pbxproj b/Tests/Swift-iOS/KissXML.xcodeproj/project.pbxproj index 6c1722f3..78a93c5a 100644 --- a/Tests/Swift-iOS/KissXML.xcodeproj/project.pbxproj +++ b/Tests/Swift-iOS/KissXML.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -88,7 +88,6 @@ 63F8CF1A1C5C1285000D126C /* Frameworks */, 63F8CF1B1C5C1285000D126C /* Resources */, 135FFAB2B1CFCAC82029D9A0 /* [CP] Embed Pods Frameworks */, - 30A8BCA84E22EA6BF0BD6196 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -106,19 +105,20 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1110; TargetAttributes = { 63F8CF1C1C5C1285000D126C = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0820; + LastSwiftMigration = 1110; }; }; }; buildConfigurationList = 63F8CF161C5C1250000D126C /* Build configuration list for PBXProject "KissXML" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 11.0"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 63F8CF121C5C1250000D126C; @@ -147,32 +147,16 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/KissXML/KissXML.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KissXML.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 30A8BCA84E22EA6BF0BD6196 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 6538811713D17D403355873B /* [CP] Check Pods Manifest.lock */ = { @@ -210,15 +194,18 @@ 63F8CF171C5C1250000D126C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -242,15 +229,18 @@ 63F8CF181C5C1250000D126C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -265,7 +255,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; }; name = Release; @@ -309,13 +300,18 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = KissXMLSwiftTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.davidchiles.KissXMLSwiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -352,11 +348,16 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = KissXMLSwiftTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = com.davidchiles.KissXMLSwiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/Tests/Swift-iOS/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLSwiftTests.xcscheme b/Tests/Swift-iOS/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLSwiftTests.xcscheme index 712244db..741e1c8b 100644 --- a/Tests/Swift-iOS/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLSwiftTests.xcscheme +++ b/Tests/Swift-iOS/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLSwiftTests.xcscheme @@ -1,6 +1,6 @@ - - - - + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/Swift-iOS/Podfile.lock b/Tests/Swift-iOS/Podfile.lock index c0b65931..2f9afd8b 100644 --- a/Tests/Swift-iOS/Podfile.lock +++ b/Tests/Swift-iOS/Podfile.lock @@ -1,16 +1,23 @@ PODS: - - KissXML (5.2.0) + - KissXML (5.2.4): + - KissXML/All (= 5.2.4) + - KissXML/Additions (5.2.4): + - KissXML/Core + - KissXML/All (5.2.4): + - KissXML/Additions + - KissXML/Core + - KissXML/Core (5.2.4) DEPENDENCIES: - KissXML (from `../../`) EXTERNAL SOURCES: KissXML: - :path: ../../ + :path: "../../" SPEC CHECKSUMS: - KissXML: 065808bfb7175710738cfbfaa248ba04abe41912 + KissXML: ecc1afc5a6b2b302505f926a15584213c01f29ce PODFILE CHECKSUM: fed2b81a43101a96f0ea5846fb807f8932349a80 -COCOAPODS: 1.3.1 +COCOAPODS: 1.8.4 diff --git a/Tests/Swift/KissXML.xcodeproj/project.pbxproj b/Tests/Swift/KissXML.xcodeproj/project.pbxproj index 5c7285b6..6bad22cf 100644 --- a/Tests/Swift/KissXML.xcodeproj/project.pbxproj +++ b/Tests/Swift/KissXML.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -88,7 +88,6 @@ D9DB38761C5845BA003E55FB /* Frameworks */, D9DB38771C5845BA003E55FB /* Resources */, B80AC4DC07455D15D9429DBB /* [CP] Embed Pods Frameworks */, - B93F80DD70215412261A5B21 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -106,20 +105,21 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1110; TargetAttributes = { D9DB38781C5845BA003E55FB = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0820; + LastSwiftMigration = 1110; }; }; }; buildConfigurationList = D9AA724D1C56EE9D00002BEE /* Build configuration list for PBXProject "KissXML" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + compatibilityVersion = "Xcode 11.0"; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = D9AA72491C56EE9D00002BEE; productRefGroup = D9AA72551C56EEF500002BEE /* Products */; @@ -165,32 +165,16 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/KissXML/KissXML.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KissXML.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - B93F80DD70215412261A5B21 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KissXMLSwiftTests/Pods-KissXMLSwiftTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -214,11 +198,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -246,11 +232,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -265,7 +253,8 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 4.0; }; name = Release; @@ -309,7 +298,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = KissXMLSwiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -324,6 +317,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -360,7 +354,11 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = KissXMLSwiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; OTHER_CFLAGS = ( @@ -373,6 +371,7 @@ PRODUCT_BUNDLE_IDENTIFIER = io.ballinger.KissXMLSwiftTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Tests/Swift/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLSwiftTests.xcscheme b/Tests/Swift/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLSwiftTests.xcscheme index af9edee6..bae666ac 100644 --- a/Tests/Swift/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLSwiftTests.xcscheme +++ b/Tests/Swift/KissXML.xcodeproj/xcshareddata/xcschemes/KissXMLSwiftTests.xcscheme @@ -1,6 +1,6 @@ - - - - + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/Swift/Podfile.lock b/Tests/Swift/Podfile.lock index c03a4897..284bc816 100644 --- a/Tests/Swift/Podfile.lock +++ b/Tests/Swift/Podfile.lock @@ -1,16 +1,23 @@ PODS: - - KissXML (5.2.0) + - KissXML (5.2.4): + - KissXML/All (= 5.2.4) + - KissXML/Additions (5.2.4): + - KissXML/Core + - KissXML/All (5.2.4): + - KissXML/Additions + - KissXML/Core + - KissXML/Core (5.2.4) DEPENDENCIES: - KissXML (from `../../`) EXTERNAL SOURCES: KissXML: - :path: ../../ + :path: "../../" SPEC CHECKSUMS: - KissXML: 065808bfb7175710738cfbfaa248ba04abe41912 + KissXML: ecc1afc5a6b2b302505f926a15584213c01f29ce PODFILE CHECKSUM: 18cdeba4684ea4abe80e93ecd3edbb7ce401b95b -COCOAPODS: 1.3.1 +COCOAPODS: 1.8.4 diff --git a/Tests/iOS/KissXML.xcodeproj/project.pbxproj b/Tests/iOS/KissXML.xcodeproj/project.pbxproj index 1c1f40bb..6c72edf5 100644 --- a/Tests/iOS/KissXML.xcodeproj/project.pbxproj +++ b/Tests/iOS/KissXML.xcodeproj/project.pbxproj @@ -88,7 +88,6 @@ D92F89CC1C582AEE008C1F90 /* Frameworks */, D92F89CD1C582AEE008C1F90 /* Resources */, 796A1BB0D488DBA9C15D14DD /* [CP] Embed Pods Frameworks */, - 506DF61E02F664DE0B44A546 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -148,28 +147,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-KissXMLTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 506DF61E02F664DE0B44A546 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 796A1BB0D488DBA9C15D14DD /* [CP] Embed Pods Frameworks */ = { @@ -178,13 +165,16 @@ files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/KissXML/KissXML.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KissXML.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KissXMLTests/Pods-KissXMLTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Tests/iOS/KissXML.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/iOS/KissXML.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/Tests/iOS/KissXML.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/iOS/Podfile.lock b/Tests/iOS/Podfile.lock index 354ec184..ba7d1927 100644 --- a/Tests/iOS/Podfile.lock +++ b/Tests/iOS/Podfile.lock @@ -1,5 +1,12 @@ PODS: - - KissXML (5.2.0) + - KissXML (5.2.4): + - KissXML/All (= 5.2.4) + - KissXML/Additions (5.2.4): + - KissXML/Core + - KissXML/All (5.2.4): + - KissXML/Additions + - KissXML/Core + - KissXML/Core (5.2.4) DEPENDENCIES: - KissXML (from `../../`) @@ -9,8 +16,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - KissXML: ef1338ef362245bfbd8cae05fcc02f09746dbded + KissXML: ecc1afc5a6b2b302505f926a15584213c01f29ce PODFILE CHECKSUM: 1f4161d172f7cca508599c70997c48a6a4fe62a9 -COCOAPODS: 1.2.0 +COCOAPODS: 1.8.4 From b277066684c86cb24f1c156e3c58102301201f90 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 19:09:47 -0700 Subject: [PATCH 02/11] Xcode 11 on Travis --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 47c924c1..e03a24af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode10.2 +osx_image: xcode11.1 language: objective-c cache: @@ -10,7 +10,7 @@ cache: before_install: # Fix Travis xcodebuild exited with 65 https://github.com/travis-ci/travis-ci/issues/6675#issuecomment-257964767 - - export IOS_SIMULATOR_UDID=`instruments -s devices | grep -m 1 "iPhone 8 (12.2" | awk -F '[ ]' '{print $4}' | awk -F '[\[]' '{print $2}' | sed 's/.$//'` + - export IOS_SIMULATOR_UDID=`instruments -s devices | grep -m 1 "iPhone 8 (13" | awk -F '[ ]' '{print $4}' | awk -F '[\[]' '{print $2}' | sed 's/.$//'` - echo $IOS_SIMULATOR_UDID install: From 2d683188d9de64430d0292ce7bba077188ff614d Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 19:34:07 -0700 Subject: [PATCH 03/11] Deprecate non-prefixed Obj-C categories --- KissXML.podspec | 10 +++- KissXML/Additions/DDXMLElementAdditions.h | 38 ++++++++---- KissXML/Additions/DDXMLElementAdditions.m | 60 +++++++++++++++---- KissXML/Categories/NSString+DDXML.h | 17 +++++- KissXML/Categories/NSString+DDXML.m | 21 ++++++- KissXML/DDXMLElement.m | 28 ++++----- KissXML/DDXMLNode.m | 36 +++++------ KissXML/KissXML.h | 8 ++- .../xcshareddata/IDEWorkspaceChecks.plist | 8 +++ Tests/Mac/Podfile.lock | 15 +++-- 10 files changed, 173 insertions(+), 68 deletions(-) create mode 100644 Tests/Mac/KissXML.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/KissXML.podspec b/KissXML.podspec index 12ee85d8..3113f957 100644 --- a/KissXML.podspec +++ b/KissXML.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'KissXML' - s.version = '5.2.4' + s.version = '5.3.0' s.license = { :type => 'MIT', :file => 'LICENSE.txt' } s.summary = 'A replacement for Cocoa\'s NSXML cluster of classes. Based on libxml.' s.homepage = 'https://github.com/robbiehanson/KissXML' @@ -20,11 +20,17 @@ Pod::Spec.new do |s| s.subspec 'Additions' do |ss| ss.dependency 'KissXML/Core' - ss.source_files = 'KissXML/Additions/*.{h,m}', 'KissXML/Categories/*.{h,m}' + ss.source_files = 'KissXML/Additions/*.{h,m}' + end + + s.subspec 'Categories' do |ss| + ss.dependency 'KissXML/Core' + ss.source_files = 'KissXML/Categories/*.{h,m}' end s.subspec 'All' do |ss| ss.dependency 'KissXML/Core' + ss.dependency 'KissXML/Categories' ss.dependency 'KissXML/Additions' end diff --git a/KissXML/Additions/DDXMLElementAdditions.h b/KissXML/Additions/DDXMLElementAdditions.h index b72907a7..3e35a2f8 100644 --- a/KissXML/Additions/DDXMLElementAdditions.h +++ b/KissXML/Additions/DDXMLElementAdditions.h @@ -7,20 +7,38 @@ NS_ASSUME_NONNULL_BEGIN @interface DDXMLElement (DDAdditions) -+ (nullable DDXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns; ++ (nullable DDXMLElement *)dd_elementWithName:(NSString *)name xmlns:(NSString *)ns; -- (nullable DDXMLElement *)elementForName:(NSString *)name; -- (nullable DDXMLElement *)elementForName:(NSString *)name xmlns:(NSString *)xmlns; +- (nullable DDXMLElement *)dd_elementForName:(NSString *)name; +- (nullable DDXMLElement *)dd_elementForName:(NSString *)name xmlns:(NSString *)xmlns; -- (nullable NSString *)xmlns; -- (void)setXmlns:(NSString *)ns; +@property (nonatomic, readwrite, nullable) NSString *dd_xmlns; -- (NSString *)prettyXMLString; -- (NSString *)compactXMLString; +- (NSString *)dd_prettyXMLString; +- (NSString *)dd_compactXMLString; -- (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string; +- (void)dd_addAttributeWithName:(NSString *)name stringValue:(NSString *)string; -- (NSDictionary *)attributesAsDictionary; +- (NSDictionary *)dd_attributesAsDictionary; @end -NS_ASSUME_NONNULL_END \ No newline at end of file + +@interface DDXMLElement (DDAdditionsDeprecated) + ++ (nullable DDXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns DEPRECATED_MSG_ATTRIBUTE("use dd_elementWithName:xmlns: instead."); + +- (nullable DDXMLElement *)elementForName:(NSString *)name DEPRECATED_MSG_ATTRIBUTE("use dd_elementForName: instead."); +- (nullable DDXMLElement *)elementForName:(NSString *)name xmlns:(NSString *)xmlns DEPRECATED_MSG_ATTRIBUTE("use dd_elementForName:xmlns: instead."); + +- (nullable NSString *)xmlns DEPRECATED_MSG_ATTRIBUTE("use dd_xmlns instead."); +- (void)setXmlns:(NSString *)ns DEPRECATED_MSG_ATTRIBUTE("use setDd_xmlns: instead."); + +- (NSString *)prettyXMLString DEPRECATED_MSG_ATTRIBUTE("use dd_prettyXMLString instead."); +- (NSString *)compactXMLString DEPRECATED_MSG_ATTRIBUTE("use dd_compactXMLString instead."); + +- (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string DEPRECATED_MSG_ATTRIBUTE("use dd_addAttributeWithName:stringValue: instead."); + +- (NSDictionary *)attributesAsDictionary DEPRECATED_MSG_ATTRIBUTE("use dd_attributesAsDictionary instead."); + +@end +NS_ASSUME_NONNULL_END diff --git a/KissXML/Additions/DDXMLElementAdditions.m b/KissXML/Additions/DDXMLElementAdditions.m index 6977bf68..36a7e78d 100644 --- a/KissXML/Additions/DDXMLElementAdditions.m +++ b/KissXML/Additions/DDXMLElementAdditions.m @@ -5,10 +5,10 @@ @implementation DDXMLElement (DDAdditions) /** * Quick method to create an element **/ -+ (DDXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns ++ (DDXMLElement *)dd_elementWithName:(NSString *)name xmlns:(NSString *)ns { DDXMLElement *element = [DDXMLElement elementWithName:name]; - [element setXmlns:ns]; + element.dd_xmlns = ns; return element; } @@ -16,7 +16,7 @@ + (DDXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns * This method returns the first child element for the given name. * If no child element exists for the given name, returns nil. **/ -- (DDXMLElement *)elementForName:(NSString *)name +- (DDXMLElement *)dd_elementForName:(NSString *)name { NSArray *elements = [self elementsForName:name]; if([elements count] > 0) @@ -54,7 +54,7 @@ - (DDXMLElement *)elementForName:(NSString *)name * This method returns the first child element for the given name and given xmlns. * If no child elements exist for the given name and given xmlns, returns nil. **/ -- (DDXMLElement *)elementForName:(NSString *)name xmlns:(NSString *)xmlns +- (DDXMLElement *)dd_elementForName:(NSString *)name xmlns:(NSString *)xmlns { NSArray *elements = [self elementsForLocalName:name URI:xmlns]; if([elements count] > 0) @@ -71,12 +71,12 @@ - (DDXMLElement *)elementForName:(NSString *)name xmlns:(NSString *)xmlns * Returns the common xmlns "attribute", which is only accessible via the namespace methods. * The xmlns value is often used in jabber elements. **/ -- (NSString *)xmlns +- (NSString *)dd_xmlns { return [[self namespaceForPrefix:@""] stringValue]; } -- (void)setXmlns:(NSString *)ns +- (void)setDd_xmlns:(NSString *)ns { // If you use setURI: then the xmlns won't be displayed in the XMLString. // Adding the namespace this way works properly. @@ -89,7 +89,7 @@ - (void)setXmlns:(NSString *)ns /** * Shortcut to get a pretty (formatted) string representation of the element. **/ -- (NSString *)prettyXMLString +- (NSString *)dd_prettyXMLString { return [self XMLStringWithOptions:(DDXMLNodePrettyPrint | DDXMLNodeCompactEmptyElement)]; } @@ -97,7 +97,7 @@ - (NSString *)prettyXMLString /** * Shortcut to get a compact string representation of the element. **/ -- (NSString *)compactXMLString +- (NSString *)dd_compactXMLString { return [self XMLStringWithOptions:DDXMLNodeCompactEmptyElement]; } @@ -105,7 +105,7 @@ - (NSString *)compactXMLString /** * Shortcut to avoid having to manually create a DDXMLNode everytime. **/ -- (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string +- (void)dd_addAttributeWithName:(NSString *)name stringValue:(NSString *)string { [self addAttribute:[DDXMLNode attributeWithName:name stringValue:string]]; } @@ -113,7 +113,7 @@ - (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string /** * Returns all the attributes as a dictionary. **/ -- (NSDictionary *)attributesAsDictionary +- (NSDictionary *)dd_attributesAsDictionary { NSArray *attributes = [self attributes]; NSMutableDictionary *result = [NSMutableDictionary dictionaryWithCapacity:[attributes count]]; @@ -129,3 +129,43 @@ - (NSDictionary *)attributesAsDictionary } @end + +@implementation DDXMLElement (DDAdditionsDeprecated) + ++ (nullable DDXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns { + return [self dd_elementWithName:name xmlns:ns]; +} + +- (nullable DDXMLElement *)elementForName:(NSString *)name { + return [self dd_elementForName:name]; +} + +- (nullable DDXMLElement *)elementForName:(NSString *)name xmlns:(NSString *)xmlns { + return [self dd_elementForName:name xmlns:xmlns]; +} + +- (nullable NSString *)xmlns { + return [self dd_xmlns]; +} + +- (void)setXmlns:(NSString *)ns { + [self setDd_xmlns:ns]; +} + +- (NSString *)prettyXMLString { + return [self dd_prettyXMLString]; +} + +- (NSString *)compactXMLString { + return [self dd_compactXMLString]; +} + +- (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string { + return [self dd_addAttributeWithName:name stringValue:string]; +} + +- (NSDictionary *)attributesAsDictionary { + return [self dd_attributesAsDictionary]; +} + +@end diff --git a/KissXML/Categories/NSString+DDXML.h b/KissXML/Categories/NSString+DDXML.h index 48f34e85..6716ae88 100644 --- a/KissXML/Categories/NSString+DDXML.h +++ b/KissXML/Categories/NSString+DDXML.h @@ -9,9 +9,20 @@ NS_ASSUME_NONNULL_BEGIN /** * xmlChar - A basic replacement for char, a byte in a UTF-8 encoded string. **/ -- (const xmlChar *)xmlChar; +- (const xmlChar *)dd_xmlChar; -- (NSString *)stringByTrimming; +- (NSString *)dd_stringByTrimming; @end -NS_ASSUME_NONNULL_END \ No newline at end of file + +@interface NSString (DDXMLDeprecated) + +/** + * xmlChar - A basic replacement for char, a byte in a UTF-8 encoded string. +**/ +- (const xmlChar *)xmlChar DEPRECATED_MSG_ATTRIBUTE("use dd_xmlChar instead."); + +- (NSString *)stringByTrimming DEPRECATED_MSG_ATTRIBUTE("use dd_stringByTrimming instead."); + +@end +NS_ASSUME_NONNULL_END diff --git a/KissXML/Categories/NSString+DDXML.m b/KissXML/Categories/NSString+DDXML.m index c86fcec7..43cb959b 100644 --- a/KissXML/Categories/NSString+DDXML.m +++ b/KissXML/Categories/NSString+DDXML.m @@ -6,18 +6,18 @@ @implementation NSString (DDXML) -- (const xmlChar *)xmlChar +- (const xmlChar *)dd_xmlChar { return (const xmlChar *)[self UTF8String]; } #ifdef GNUSTEP -- (NSString *)stringByTrimming +- (NSString *)dd_stringByTrimming { return [self stringByTrimmingSpaces]; } #else -- (NSString *)stringByTrimming +- (NSString *)dd_stringByTrimming { NSMutableString *mStr = [self mutableCopy]; CFStringTrimWhitespace((__bridge CFMutableStringRef)mStr); @@ -29,3 +29,18 @@ - (NSString *)stringByTrimming #endif @end + +@implementation NSString (DDXMLDeprecated) + +/** + * xmlChar - A basic replacement for char, a byte in a UTF-8 encoded string. +**/ +- (const xmlChar *)xmlChar { + return [self dd_xmlChar]; +} + +- (NSString *)stringByTrimming { + return [self dd_stringByTrimming]; +} + +@end diff --git a/KissXML/DDXMLElement.m b/KissXML/DDXMLElement.m index d08516aa..02dfa8ed 100644 --- a/KissXML/DDXMLElement.m +++ b/KissXML/DDXMLElement.m @@ -60,7 +60,7 @@ - (instancetype)initWithName:(NSString *)name { // Note: Make every guarantee that genericPtr is not null - xmlNodePtr node = xmlNewNode(NULL, [name xmlChar]); + xmlNodePtr node = xmlNewNode(NULL, [name dd_xmlChar]); if (node == NULL) { return nil; @@ -73,7 +73,7 @@ - (instancetype)initWithName:(NSString *)name URI:(NSString *)URI { // Note: Make every guarantee that genericPtr is not null - xmlNodePtr node = xmlNewNode(NULL, [name xmlChar]); + xmlNodePtr node = xmlNewNode(NULL, [name dd_xmlChar]); if (node == NULL) { return nil; @@ -89,7 +89,7 @@ - (instancetype)initWithName:(NSString *)name stringValue:(NSString *)string { // Note: Make every guarantee that genericPtr is not null - xmlNodePtr node = xmlNewNode(NULL, [name xmlChar]); + xmlNodePtr node = xmlNewNode(NULL, [name dd_xmlChar]); if (node == NULL) { return nil; @@ -140,9 +140,9 @@ - (NSArray *)_elementsForName:(NSString *)name BOOL hasPrefix = [prefix length] > 0; - const xmlChar *xmlName = [name xmlChar]; - const xmlChar *xmlLocalName = [localName xmlChar]; - const xmlChar *xmlUri = [uri xmlChar]; + const xmlChar *xmlName = [name dd_xmlChar]; + const xmlChar *xmlLocalName = [localName dd_xmlChar]; + const xmlChar *xmlUri = [uri dd_xmlChar]; xmlNodePtr child = node->children; while (child) @@ -216,7 +216,7 @@ - (NSArray *)elementsForName:(NSString *)name // Note: We use xmlSearchNs instead of resolveNamespaceForName: because // we want to avoid creating wrapper objects when possible. - xmlNsPtr ns = xmlSearchNs(node->doc, node, [prefix xmlChar]); + xmlNsPtr ns = xmlSearchNs(node->doc, node, [prefix dd_xmlChar]); if (ns) { NSString *uri = [NSString stringWithUTF8String:((const char *)ns->href)]; @@ -267,7 +267,7 @@ - (BOOL)_hasAttributeWithName:(NSString *)name xmlAttrPtr attr = ((xmlNodePtr)genericPtr)->properties; if (attr) { - const xmlChar *xmlName = [name xmlChar]; + const xmlChar *xmlName = [name dd_xmlChar]; do { if (xmlStrEqual(attr->name, xmlName)) @@ -289,7 +289,7 @@ - (void)_removeAttributeForName:(NSString *)name xmlAttrPtr attr = ((xmlNodePtr)genericPtr)->properties; if (attr) { - const xmlChar *xmlName = [name xmlChar]; + const xmlChar *xmlName = [name dd_xmlChar]; do { if (xmlStrEqual(attr->name, xmlName)) @@ -363,7 +363,7 @@ - (DDXMLNode *)attributeForName:(NSString *)name xmlAttrPtr attr = ((xmlNodePtr)genericPtr)->properties; if (attr) { - const xmlChar *xmlName = [name xmlChar]; + const xmlChar *xmlName = [name dd_xmlChar]; do { if (attr->ns && attr->ns->prefix) @@ -425,7 +425,7 @@ - (void)_removeNamespaceForPrefix:(NSString *)name xmlNodePtr node = (xmlNodePtr)genericPtr; // If name is nil or the empty string, the user is wishing to remove the default namespace - const xmlChar *xmlName = [name length] > 0 ? [name xmlChar] : NULL; + const xmlChar *xmlName = [name length] > 0 ? [name dd_xmlChar] : NULL; xmlNsPtr ns = node->nsDef; while (ns != NULL) @@ -550,7 +550,7 @@ - (DDXMLNode *)namespaceForPrefix:(NSString *)prefix xmlNsPtr ns = ((xmlNodePtr)genericPtr)->nsDef; if (ns) { - const xmlChar *xmlPrefix = [prefix xmlChar]; + const xmlChar *xmlPrefix = [prefix dd_xmlChar]; do { if (xmlStrEqual(ns->prefix, xmlPrefix)) @@ -596,7 +596,7 @@ - (DDXMLNode *)_recursiveResolveNamespaceForPrefix:(NSString *)prefix atNode:(xm xmlNsPtr ns = nodePtr->nsDef; if (ns) { - const xmlChar *xmlPrefix = [prefix xmlChar]; + const xmlChar *xmlPrefix = [prefix dd_xmlChar]; do { if (xmlStrEqual(ns->prefix, xmlPrefix)) @@ -653,7 +653,7 @@ - (NSString *)_recursiveResolvePrefixForURI:(NSString *)uri atNode:(xmlNodePtr)n xmlNsPtr ns = nodePtr->nsDef; if (ns) { - const xmlChar *xmlUri = [uri xmlChar]; + const xmlChar *xmlUri = [uri dd_xmlChar]; do { if (xmlStrEqual(ns->href, xmlUri)) diff --git a/KissXML/DDXMLNode.m b/KissXML/DDXMLNode.m index 903a5694..a6e2f78b 100644 --- a/KissXML/DDXMLNode.m +++ b/KissXML/DDXMLNode.m @@ -106,7 +106,7 @@ + (id)elementWithName:(NSString *)name URI:(NSString *)URI + (id)attributeWithName:(NSString *)name stringValue:(NSString *)stringValue { - xmlAttrPtr attr = xmlNewProp(NULL, [name xmlChar], [stringValue xmlChar]); + xmlAttrPtr attr = xmlNewProp(NULL, [name dd_xmlChar], [stringValue dd_xmlChar]); if (attr == NULL) return nil; @@ -115,7 +115,7 @@ + (id)attributeWithName:(NSString *)name stringValue:(NSString *)stringValue + (id)attributeWithName:(NSString *)name URI:(NSString *)URI stringValue:(NSString *)stringValue { - xmlAttrPtr attr = xmlNewProp(NULL, [name xmlChar], [stringValue xmlChar]); + xmlAttrPtr attr = xmlNewProp(NULL, [name dd_xmlChar], [stringValue dd_xmlChar]); if (attr == NULL) return nil; @@ -128,9 +128,9 @@ + (id)attributeWithName:(NSString *)name URI:(NSString *)URI stringValue:(NSStri + (id)namespaceWithName:(NSString *)name stringValue:(NSString *)stringValue { // If the user passes a nil or empty string name, they are trying to create a default namespace - const xmlChar *xmlName = [name length] > 0 ? [name xmlChar] : NULL; + const xmlChar *xmlName = [name length] > 0 ? [name dd_xmlChar] : NULL; - xmlNsPtr ns = xmlNewNs(NULL, [stringValue xmlChar], xmlName); + xmlNsPtr ns = xmlNewNs(NULL, [stringValue dd_xmlChar], xmlName); if (ns == NULL) return nil; @@ -139,7 +139,7 @@ + (id)namespaceWithName:(NSString *)name stringValue:(NSString *)stringValue + (id)processingInstructionWithName:(NSString *)name stringValue:(NSString *)stringValue { - xmlNodePtr procInst = xmlNewPI([name xmlChar], [stringValue xmlChar]); + xmlNodePtr procInst = xmlNewPI([name dd_xmlChar], [stringValue dd_xmlChar]); if (procInst == NULL) return nil; @@ -148,7 +148,7 @@ + (id)processingInstructionWithName:(NSString *)name stringValue:(NSString *)str + (id)commentWithStringValue:(NSString *)stringValue { - xmlNodePtr comment = xmlNewComment([stringValue xmlChar]); + xmlNodePtr comment = xmlNewComment([stringValue dd_xmlChar]); if (comment == NULL) return nil; @@ -157,7 +157,7 @@ + (id)commentWithStringValue:(NSString *)stringValue + (id)textWithStringValue:(NSString *)stringValue { - xmlNodePtr text = xmlNewText([stringValue xmlChar]); + xmlNodePtr text = xmlNewText([stringValue dd_xmlChar]); if (text == NULL) return nil; @@ -405,7 +405,7 @@ - (void)setName:(NSString *)name #endif // The xmlNodeSetName function works for both nodes and attributes - xmlNodeSetName((xmlNodePtr)genericPtr, [name xmlChar]); + xmlNodeSetName((xmlNodePtr)genericPtr, [name dd_xmlChar]); } - (NSString *)name @@ -459,7 +459,7 @@ - (void)setStringValue:(NSString *)string // Therefore, we need to remove them properly first. [[self class] removeAllChildrenFromNode:(xmlNodePtr)node]; - xmlChar *escapedString = xmlEncodeSpecialChars(node->doc, [string xmlChar]); + xmlChar *escapedString = xmlEncodeSpecialChars(node->doc, [string dd_xmlChar]); xmlNodeSetContent((xmlNodePtr)node, escapedString); xmlFree(escapedString); } @@ -991,7 +991,7 @@ - (void)setURI:(NSString *)URI if (URI) { // Create a new xmlNsPtr, add it to the nsDef list, and make ns point to it - xmlNsPtr ns = xmlNewNs(NULL, [URI xmlChar], NULL); + xmlNsPtr ns = xmlNewNs(NULL, [URI dd_xmlChar], NULL); ns->next = node->nsDef; node->nsDef = ns; node->ns = ns; @@ -1248,7 +1248,7 @@ - (NSArray *)nodesForXPath:(NSString *)xpath error:(NSError **)error } } - xpathObj = xmlXPathEvalExpression([xpath xmlChar], xpathCtx); + xpathObj = xmlXPathEvalExpression([xpath dd_xmlChar], xpathCtx); NSArray *result; @@ -1332,7 +1332,7 @@ - (NSArray *)nodesForXPath:(NSString *)xpath error:(NSError **)error // Example #2 - Asynchronous child processing // // DDXMLElement *root = [[DDXMLElement alloc] initWithXMLString:str error:nil]; -// DDXMLElement *child = [root elementForName:@"starbucks"]; +// DDXMLElement *child = [root dd_elementForName:@"starbucks"]; // // dispatch_async(queue, ^{ // @@ -2265,7 +2265,7 @@ - (void)setName:(NSString *)name xmlNsPtr ns = (xmlNsPtr)genericPtr; xmlFree((xmlChar *)ns->prefix); - ns->prefix = xmlStrdup([name xmlChar]); + ns->prefix = xmlStrdup([name dd_xmlChar]); } - (NSString *)name @@ -2290,7 +2290,7 @@ - (void)setStringValue:(NSString *)string xmlNsPtr ns = (xmlNsPtr)genericPtr; xmlFree((xmlChar *)ns->href); - ns->href = xmlEncodeSpecialChars(NULL, [string xmlChar]); + ns->href = xmlEncodeSpecialChars(NULL, [string dd_xmlChar]); } - (NSString *)stringValue @@ -2626,13 +2626,13 @@ - (void)setStringValue:(NSString *)string if (attr->children != NULL) { - xmlChar *escapedString = xmlEncodeSpecialChars(attr->doc, [string xmlChar]); + xmlChar *escapedString = xmlEncodeSpecialChars(attr->doc, [string dd_xmlChar]); xmlNodeSetContent((xmlNodePtr)attr, escapedString); xmlFree(escapedString); } else { - xmlNodePtr text = xmlNewText([string xmlChar]); + xmlNodePtr text = xmlNewText([string dd_xmlChar]); attr->children = text; } } @@ -2756,7 +2756,7 @@ - (void)setURI:(NSString *)URI // If there's a namespace defined further up the tree with this URI, // then we want attr->ns to point to it. - const xmlChar *uri = [URI xmlChar]; + const xmlChar *uri = [URI dd_xmlChar]; xmlNodePtr parent = attr->parent; while (parent) @@ -2809,7 +2809,7 @@ - (NSString *)URI NSString *prefix = [self prefix]; if ([prefix length] > 0) { - xmlNsPtr ns = xmlSearchNs(attr->doc, attr->parent, [prefix xmlChar]); + xmlNsPtr ns = xmlSearchNs(attr->doc, attr->parent, [prefix dd_xmlChar]); if (ns && ns->href) { return [NSString stringWithUTF8String:((const char *)ns->href)]; diff --git a/KissXML/KissXML.h b/KissXML/KissXML.h index cd47c4c7..9bdff982 100644 --- a/KissXML/KissXML.h +++ b/KissXML/KissXML.h @@ -1,7 +1,11 @@ #import -#import "DDXMLElementAdditions.h" -#import "NSString+DDXML.h" +#if __has_include("DDXMLElementAdditions.h") + #import "DDXMLElementAdditions.h" +#endif +#if __has_include("NSString+DDXML.h") + #import "NSString+DDXML.h" +#endif #import "DDXML.h" #import "DDXMLDocument.h" #import "DDXMLElement.h" diff --git a/Tests/Mac/KissXML.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/Mac/KissXML.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/Tests/Mac/KissXML.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/Mac/Podfile.lock b/Tests/Mac/Podfile.lock index 164f0055..729dfa29 100644 --- a/Tests/Mac/Podfile.lock +++ b/Tests/Mac/Podfile.lock @@ -1,12 +1,15 @@ PODS: - - KissXML (5.2.4): - - KissXML/All (= 5.2.4) - - KissXML/Additions (5.2.4): + - KissXML (5.3.0): + - KissXML/All (= 5.3.0) + - KissXML/Additions (5.3.0): - KissXML/Core - - KissXML/All (5.2.4): + - KissXML/All (5.3.0): - KissXML/Additions + - KissXML/Categories - KissXML/Core - - KissXML/Core (5.2.4) + - KissXML/Categories (5.3.0): + - KissXML/Core + - KissXML/Core (5.3.0) DEPENDENCIES: - KissXML (from `../../`) @@ -16,7 +19,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - KissXML: ecc1afc5a6b2b302505f926a15584213c01f29ce + KissXML: 0c31ce833ff567f73de58fc7a7a14f2c92380b3e PODFILE CHECKSUM: d877c76a6dd7d1b779a72b4b48c5745d694068e5 From d8bd5ff99b7ed647f8b422ef32ba88423bb92ab0 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 19:36:21 -0700 Subject: [PATCH 04/11] Resolve analyzer warnings --- KissXML/DDXMLNode.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/KissXML/DDXMLNode.m b/KissXML/DDXMLNode.m index a6e2f78b..019038ce 100644 --- a/KissXML/DDXMLNode.m +++ b/KissXML/DDXMLNode.m @@ -108,7 +108,7 @@ + (id)attributeWithName:(NSString *)name stringValue:(NSString *)stringValue { xmlAttrPtr attr = xmlNewProp(NULL, [name dd_xmlChar], [stringValue dd_xmlChar]); - if (attr == NULL) return nil; + if (attr == NULL) return [[self alloc] init]; return [[DDXMLAttributeNode alloc] initWithAttrPrimitive:attr owner:nil]; } @@ -117,7 +117,7 @@ + (id)attributeWithName:(NSString *)name URI:(NSString *)URI stringValue:(NSStri { xmlAttrPtr attr = xmlNewProp(NULL, [name dd_xmlChar], [stringValue dd_xmlChar]); - if (attr == NULL) return nil; + if (attr == NULL) return [[self alloc] init]; DDXMLAttributeNode *result = [[DDXMLAttributeNode alloc] initWithAttrPrimitive:attr owner:nil]; [result setURI:URI]; @@ -132,7 +132,7 @@ + (id)namespaceWithName:(NSString *)name stringValue:(NSString *)stringValue xmlNsPtr ns = xmlNewNs(NULL, [stringValue dd_xmlChar], xmlName); - if (ns == NULL) return nil; + if (ns == NULL) return [[self alloc] init]; return [[DDXMLNamespaceNode alloc] initWithNsPrimitive:ns nsParent:NULL owner:nil]; } @@ -141,7 +141,7 @@ + (id)processingInstructionWithName:(NSString *)name stringValue:(NSString *)str { xmlNodePtr procInst = xmlNewPI([name dd_xmlChar], [stringValue dd_xmlChar]); - if (procInst == NULL) return nil; + if (procInst == NULL) return [[self alloc] init]; return [[DDXMLNode alloc] initWithPrimitive:(xmlKindPtr)procInst owner:nil]; } @@ -150,7 +150,7 @@ + (id)commentWithStringValue:(NSString *)stringValue { xmlNodePtr comment = xmlNewComment([stringValue dd_xmlChar]); - if (comment == NULL) return nil; + if (comment == NULL) return [[self alloc] init]; return [[DDXMLNode alloc] initWithPrimitive:(xmlKindPtr)comment owner:nil]; } @@ -159,7 +159,7 @@ + (id)textWithStringValue:(NSString *)stringValue { xmlNodePtr text = xmlNewText([stringValue dd_xmlChar]); - if (text == NULL) return nil; + if (text == NULL) return [[self alloc] init]; return [[DDXMLNode alloc] initWithPrimitive:(xmlKindPtr)text owner:nil]; } From 1599114f68b20f10e9adf84898d0a902a1501ef3 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 19:44:27 -0700 Subject: [PATCH 05/11] Use property declarations --- KissXML/Additions/DDXMLElementAdditions.h | 6 +++--- Tests/Swift/Podfile.lock | 15 +++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/KissXML/Additions/DDXMLElementAdditions.h b/KissXML/Additions/DDXMLElementAdditions.h index 3e35a2f8..d29fcc8e 100644 --- a/KissXML/Additions/DDXMLElementAdditions.h +++ b/KissXML/Additions/DDXMLElementAdditions.h @@ -14,12 +14,12 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readwrite, nullable) NSString *dd_xmlns; -- (NSString *)dd_prettyXMLString; -- (NSString *)dd_compactXMLString; +@property (nonatomic, readonly) NSString *dd_prettyXMLString; +@property (nonatomic, readonly) NSString *dd_compactXMLString; - (void)dd_addAttributeWithName:(NSString *)name stringValue:(NSString *)string; -- (NSDictionary *)dd_attributesAsDictionary; +@property (nonatomic, readonly) NSDictionary *dd_attributesAsDictionary; @end diff --git a/Tests/Swift/Podfile.lock b/Tests/Swift/Podfile.lock index 284bc816..cff56d4b 100644 --- a/Tests/Swift/Podfile.lock +++ b/Tests/Swift/Podfile.lock @@ -1,12 +1,15 @@ PODS: - - KissXML (5.2.4): - - KissXML/All (= 5.2.4) - - KissXML/Additions (5.2.4): + - KissXML (5.3.0): + - KissXML/All (= 5.3.0) + - KissXML/Additions (5.3.0): - KissXML/Core - - KissXML/All (5.2.4): + - KissXML/All (5.3.0): - KissXML/Additions + - KissXML/Categories - KissXML/Core - - KissXML/Core (5.2.4) + - KissXML/Categories (5.3.0): + - KissXML/Core + - KissXML/Core (5.3.0) DEPENDENCIES: - KissXML (from `../../`) @@ -16,7 +19,7 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - KissXML: ecc1afc5a6b2b302505f926a15584213c01f29ce + KissXML: 0c31ce833ff567f73de58fc7a7a14f2c92380b3e PODFILE CHECKSUM: 18cdeba4684ea4abe80e93ecd3edbb7ce401b95b From a67cea038eada7ab3366cac95edee385f50ba59c Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 19:54:14 -0700 Subject: [PATCH 06/11] Include categories --- KissXML.podspec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/KissXML.podspec b/KissXML.podspec index 3113f957..1ad99fb9 100644 --- a/KissXML.podspec +++ b/KissXML.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.default_subspec = 'All' s.subspec 'Core' do |ss| - ss.source_files = 'KissXML/*.{h,m}', 'KissXML/Private/*.h' + ss.source_files = 'KissXML/*.{h,m}', 'KissXML/Categories/*.{h,m}', 'KissXML/Private/*.h' ss.private_header_files = 'KissXML/Private/**/*.h' ss.library = 'xml2' ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'} @@ -23,14 +23,8 @@ Pod::Spec.new do |s| ss.source_files = 'KissXML/Additions/*.{h,m}' end - s.subspec 'Categories' do |ss| - ss.dependency 'KissXML/Core' - ss.source_files = 'KissXML/Categories/*.{h,m}' - end - s.subspec 'All' do |ss| ss.dependency 'KissXML/Core' - ss.dependency 'KissXML/Categories' ss.dependency 'KissXML/Additions' end From 067bdd47f04d3ddd53af3b3339a9bc7933333201 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 20:05:24 -0700 Subject: [PATCH 07/11] Umbrella header --- KissXML/KissXML.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/KissXML/KissXML.h b/KissXML/KissXML.h index 9bdff982..9694b260 100644 --- a/KissXML/KissXML.h +++ b/KissXML/KissXML.h @@ -3,9 +3,7 @@ #if __has_include("DDXMLElementAdditions.h") #import "DDXMLElementAdditions.h" #endif -#if __has_include("NSString+DDXML.h") - #import "NSString+DDXML.h" -#endif +#import "NSString+DDXML.h" #import "DDXML.h" #import "DDXMLDocument.h" #import "DDXMLElement.h" From fcfb49ad5a40513cdc91ad8720f98d2242eb96af Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 20:12:54 -0700 Subject: [PATCH 08/11] Add lib lint to Travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e03a24af..be50c177 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,3 +32,4 @@ script: - travis_retry xcodebuild -workspace ./iOS/KissXML.xcworkspace -scheme KissXMLTests -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c - xcodebuild -workspace ./Swift/KissXML.xcworkspace -scheme KissXMLSwiftTests -sdk macosx -arch x86_64 test | xcpretty -c - travis_retry xcodebuild -workspace ./Swift-iOS/KissXML.xcworkspace -scheme KissXMLSwiftTests -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c + - bundle exec pod lib lint KissXML.podspec From 9ba49c31f9c3467ac9492fecc1a4dc40fe7204ac Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sun, 6 Jan 2019 15:42:35 -0800 Subject: [PATCH 09/11] Check for stringWithUTF8String nil return value --- KissXML/DDXMLNode.m | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/KissXML/DDXMLNode.m b/KissXML/DDXMLNode.m index 019038ce..d7d367e0 100644 --- a/KissXML/DDXMLNode.m +++ b/KissXML/DDXMLNode.m @@ -1173,20 +1173,16 @@ - (NSString *)XMLStringWithOptions:(NSUInteger)options return @""; } - NSMutableString *xmlString; + NSMutableString *xmlString = [NSMutableString stringWithUTF8String:(const char *)bufferPtr->content]; + xmlBufferFree(bufferPtr); - if ([self kind] == DDXMLTextKind) - { - xmlString = [NSMutableString stringWithUTF8String:(const char *)bufferPtr->content]; - - xmlBufferFree(bufferPtr); + if (xmlString == nil) { + return @""; } - else + + if ([self kind] != DDXMLTextKind) { - xmlString = [NSMutableString stringWithUTF8String:(const char *)bufferPtr->content]; CFStringTrimWhitespace((__bridge CFMutableStringRef)xmlString); - - xmlBufferFree(bufferPtr); } // Revert wide unicode characters in XML Attribute string values From 24129814c289aa6bfa1c2667e7200a2fa59c14d4 Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 20:33:32 -0700 Subject: [PATCH 10/11] Fix Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index be50c177..0dfd5b82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,4 +32,4 @@ script: - travis_retry xcodebuild -workspace ./iOS/KissXML.xcworkspace -scheme KissXMLTests -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c - xcodebuild -workspace ./Swift/KissXML.xcworkspace -scheme KissXMLSwiftTests -sdk macosx -arch x86_64 test | xcpretty -c - travis_retry xcodebuild -workspace ./Swift-iOS/KissXML.xcworkspace -scheme KissXMLSwiftTests -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c - - bundle exec pod lib lint KissXML.podspec + - bundle exec pod lib lint ../KissXML.podspec From 5916f9d86eb74c0f16a477289827215203cc91fa Mon Sep 17 00:00:00 2001 From: Chris Ballinger Date: Sat, 26 Oct 2019 20:49:18 -0700 Subject: [PATCH 11/11] Use CocoaPods CDN --- Tests/Mac/Podfile | 2 +- Tests/Mac/Podfile.lock | 7 ++----- Tests/Swift-iOS/Podfile | 2 +- Tests/Swift-iOS/Podfile.lock | 14 +++++++------- Tests/Swift/Podfile | 2 +- Tests/Swift/Podfile.lock | 7 ++----- Tests/iOS/Podfile | 2 +- Tests/iOS/Podfile.lock | 14 +++++++------- 8 files changed, 22 insertions(+), 28 deletions(-) diff --git a/Tests/Mac/Podfile b/Tests/Mac/Podfile index 0a7fe0ae..a64fa39a 100644 --- a/Tests/Mac/Podfile +++ b/Tests/Mac/Podfile @@ -1,4 +1,4 @@ -source 'https://github.com/CocoaPods/Specs.git' +source 'https://cdn.cocoapods.org/' use_frameworks! platform :osx, "10.9" diff --git a/Tests/Mac/Podfile.lock b/Tests/Mac/Podfile.lock index 729dfa29..1caf3de7 100644 --- a/Tests/Mac/Podfile.lock +++ b/Tests/Mac/Podfile.lock @@ -5,9 +5,6 @@ PODS: - KissXML/Core - KissXML/All (5.3.0): - KissXML/Additions - - KissXML/Categories - - KissXML/Core - - KissXML/Categories (5.3.0): - KissXML/Core - KissXML/Core (5.3.0) @@ -19,8 +16,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - KissXML: 0c31ce833ff567f73de58fc7a7a14f2c92380b3e + KissXML: 9e42f828e4012aa469548989b2b9e2286621a0bc -PODFILE CHECKSUM: d877c76a6dd7d1b779a72b4b48c5745d694068e5 +PODFILE CHECKSUM: 8b16a5989f3f9496d54c5bb48e81760abbda0c3d COCOAPODS: 1.8.4 diff --git a/Tests/Swift-iOS/Podfile b/Tests/Swift-iOS/Podfile index f3936b7d..6fec5b3e 100644 --- a/Tests/Swift-iOS/Podfile +++ b/Tests/Swift-iOS/Podfile @@ -1,4 +1,4 @@ -source 'https://github.com/CocoaPods/Specs.git' +source 'https://cdn.cocoapods.org/' use_frameworks! platform :ios, "8.0" diff --git a/Tests/Swift-iOS/Podfile.lock b/Tests/Swift-iOS/Podfile.lock index 2f9afd8b..9664468b 100644 --- a/Tests/Swift-iOS/Podfile.lock +++ b/Tests/Swift-iOS/Podfile.lock @@ -1,12 +1,12 @@ PODS: - - KissXML (5.2.4): - - KissXML/All (= 5.2.4) - - KissXML/Additions (5.2.4): + - KissXML (5.3.0): + - KissXML/All (= 5.3.0) + - KissXML/Additions (5.3.0): - KissXML/Core - - KissXML/All (5.2.4): + - KissXML/All (5.3.0): - KissXML/Additions - KissXML/Core - - KissXML/Core (5.2.4) + - KissXML/Core (5.3.0) DEPENDENCIES: - KissXML (from `../../`) @@ -16,8 +16,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - KissXML: ecc1afc5a6b2b302505f926a15584213c01f29ce + KissXML: 9e42f828e4012aa469548989b2b9e2286621a0bc -PODFILE CHECKSUM: fed2b81a43101a96f0ea5846fb807f8932349a80 +PODFILE CHECKSUM: 1cb3f49317eb756d5b9536fe8e28d6ed8c5fd314 COCOAPODS: 1.8.4 diff --git a/Tests/Swift/Podfile b/Tests/Swift/Podfile index e6eee0f9..beaf426f 100644 --- a/Tests/Swift/Podfile +++ b/Tests/Swift/Podfile @@ -1,4 +1,4 @@ -source 'https://github.com/CocoaPods/Specs.git' +source 'https://cdn.cocoapods.org/' use_frameworks! platform :osx, "10.9" diff --git a/Tests/Swift/Podfile.lock b/Tests/Swift/Podfile.lock index cff56d4b..9da681c2 100644 --- a/Tests/Swift/Podfile.lock +++ b/Tests/Swift/Podfile.lock @@ -5,9 +5,6 @@ PODS: - KissXML/Core - KissXML/All (5.3.0): - KissXML/Additions - - KissXML/Categories - - KissXML/Core - - KissXML/Categories (5.3.0): - KissXML/Core - KissXML/Core (5.3.0) @@ -19,8 +16,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - KissXML: 0c31ce833ff567f73de58fc7a7a14f2c92380b3e + KissXML: 9e42f828e4012aa469548989b2b9e2286621a0bc -PODFILE CHECKSUM: 18cdeba4684ea4abe80e93ecd3edbb7ce401b95b +PODFILE CHECKSUM: 98663de9812c7fdb4ea5231e5137adc7859ab283 COCOAPODS: 1.8.4 diff --git a/Tests/iOS/Podfile b/Tests/iOS/Podfile index ca87b393..14d2372c 100644 --- a/Tests/iOS/Podfile +++ b/Tests/iOS/Podfile @@ -1,4 +1,4 @@ -source 'https://github.com/CocoaPods/Specs.git' +source 'https://cdn.cocoapods.org/' use_frameworks! platform :ios, "8.0" diff --git a/Tests/iOS/Podfile.lock b/Tests/iOS/Podfile.lock index ba7d1927..917cae77 100644 --- a/Tests/iOS/Podfile.lock +++ b/Tests/iOS/Podfile.lock @@ -1,12 +1,12 @@ PODS: - - KissXML (5.2.4): - - KissXML/All (= 5.2.4) - - KissXML/Additions (5.2.4): + - KissXML (5.3.0): + - KissXML/All (= 5.3.0) + - KissXML/Additions (5.3.0): - KissXML/Core - - KissXML/All (5.2.4): + - KissXML/All (5.3.0): - KissXML/Additions - KissXML/Core - - KissXML/Core (5.2.4) + - KissXML/Core (5.3.0) DEPENDENCIES: - KissXML (from `../../`) @@ -16,8 +16,8 @@ EXTERNAL SOURCES: :path: "../../" SPEC CHECKSUMS: - KissXML: ecc1afc5a6b2b302505f926a15584213c01f29ce + KissXML: 9e42f828e4012aa469548989b2b9e2286621a0bc -PODFILE CHECKSUM: 1f4161d172f7cca508599c70997c48a6a4fe62a9 +PODFILE CHECKSUM: 336c30f4cc4e075ad541bfaf7ed627ba23191958 COCOAPODS: 1.8.4