Skip to content

Commit

Permalink
Merge pull request #116 from robbiehanson/xcode-11
Browse files Browse the repository at this point in the history
Xcode 11
  • Loading branch information
chrisballinger committed Oct 27, 2019
2 parents c691ecd + 5916f9d commit 806ee2a
Show file tree
Hide file tree
Showing 34 changed files with 579 additions and 320 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
osx_image: xcode10.2
osx_image: xcode11.1
language: objective-c

cache:
Expand All @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion Tests/Gemfile → Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source "https://rubygems.org"

gem "cocoapods", "~>1.3.1"
gem "cocoapods"
83 changes: 83 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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
24 changes: 19 additions & 5 deletions KissXML.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'KissXML'
s.version = '5.2.3'
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'
Expand All @@ -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/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'}
end

s.subspec 'Additions' do |ss|
ss.dependency 'KissXML/Core'
ss.source_files = 'KissXML/Additions/*.{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'
Expand Down
55 changes: 44 additions & 11 deletions KissXML.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 51;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -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 = (
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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)";
Expand All @@ -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)";
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
38 changes: 28 additions & 10 deletions KissXML/Additions/DDXMLElementAdditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
@property (nonatomic, readonly) NSString *dd_prettyXMLString;
@property (nonatomic, readonly) NSString *dd_compactXMLString;

- (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string;
- (void)dd_addAttributeWithName:(NSString *)name stringValue:(NSString *)string;

- (NSDictionary<NSString*,NSString*> *)attributesAsDictionary;
@property (nonatomic, readonly) NSDictionary<NSString*,NSString*> *dd_attributesAsDictionary;

@end
NS_ASSUME_NONNULL_END

@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<NSString*,NSString*> *)attributesAsDictionary DEPRECATED_MSG_ATTRIBUTE("use dd_attributesAsDictionary instead.");

@end
NS_ASSUME_NONNULL_END
Loading

0 comments on commit 806ee2a

Please sign in to comment.