Skip to content

Commit 806ee2a

Browse files
Merge pull request #116 from robbiehanson/xcode-11
Xcode 11
2 parents c691ecd + 5916f9d commit 806ee2a

File tree

34 files changed

+579
-320
lines changed

34 files changed

+579
-320
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
osx_image: xcode10.2
1+
osx_image: xcode11.1
22
language: objective-c
33

44
cache:
@@ -10,7 +10,7 @@ cache:
1010

1111
before_install:
1212
# Fix Travis xcodebuild exited with 65 https://github.com/travis-ci/travis-ci/issues/6675#issuecomment-257964767
13-
- export IOS_SIMULATOR_UDID=`instruments -s devices | grep -m 1 "iPhone 8 (12.2" | awk -F '[ ]' '{print $4}' | awk -F '[\[]' '{print $2}' | sed 's/.$//'`
13+
- export IOS_SIMULATOR_UDID=`instruments -s devices | grep -m 1 "iPhone 8 (13" | awk -F '[ ]' '{print $4}' | awk -F '[\[]' '{print $2}' | sed 's/.$//'`
1414
- echo $IOS_SIMULATOR_UDID
1515

1616
install:
@@ -32,3 +32,4 @@ script:
3232
- travis_retry xcodebuild -workspace ./iOS/KissXML.xcworkspace -scheme KissXMLTests -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c
3333
- xcodebuild -workspace ./Swift/KissXML.xcworkspace -scheme KissXMLSwiftTests -sdk macosx -arch x86_64 test | xcpretty -c
3434
- travis_retry xcodebuild -workspace ./Swift-iOS/KissXML.xcworkspace -scheme KissXMLSwiftTests -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c
35+
- bundle exec pod lib lint ../KissXML.podspec

Tests/Gemfile renamed to Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
source "https://rubygems.org"
22

3-
gem "cocoapods", "~>1.3.1"
3+
gem "cocoapods"

Gemfile.lock

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.1)
5+
activesupport (4.2.11.1)
6+
i18n (~> 0.7)
7+
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
9+
tzinfo (~> 1.1)
10+
algoliasearch (1.27.1)
11+
httpclient (~> 2.8, >= 2.8.3)
12+
json (>= 1.5.1)
13+
atomos (0.1.3)
14+
claide (1.0.3)
15+
cocoapods (1.8.4)
16+
activesupport (>= 4.0.2, < 5)
17+
claide (>= 1.0.2, < 2.0)
18+
cocoapods-core (= 1.8.4)
19+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
20+
cocoapods-downloader (>= 1.2.2, < 2.0)
21+
cocoapods-plugins (>= 1.0.0, < 2.0)
22+
cocoapods-search (>= 1.0.0, < 2.0)
23+
cocoapods-stats (>= 1.0.0, < 2.0)
24+
cocoapods-trunk (>= 1.4.0, < 2.0)
25+
cocoapods-try (>= 1.1.0, < 2.0)
26+
colored2 (~> 3.1)
27+
escape (~> 0.0.4)
28+
fourflusher (>= 2.3.0, < 3.0)
29+
gh_inspector (~> 1.0)
30+
molinillo (~> 0.6.6)
31+
nap (~> 1.0)
32+
ruby-macho (~> 1.4)
33+
xcodeproj (>= 1.11.1, < 2.0)
34+
cocoapods-core (1.8.4)
35+
activesupport (>= 4.0.2, < 6)
36+
algoliasearch (~> 1.0)
37+
concurrent-ruby (~> 1.1)
38+
fuzzy_match (~> 2.0.4)
39+
nap (~> 1.0)
40+
cocoapods-deintegrate (1.0.4)
41+
cocoapods-downloader (1.2.2)
42+
cocoapods-plugins (1.0.0)
43+
nap
44+
cocoapods-search (1.0.0)
45+
cocoapods-stats (1.1.0)
46+
cocoapods-trunk (1.4.1)
47+
nap (>= 0.8, < 2.0)
48+
netrc (~> 0.11)
49+
cocoapods-try (1.1.0)
50+
colored2 (3.1.2)
51+
concurrent-ruby (1.1.5)
52+
escape (0.0.4)
53+
fourflusher (2.3.1)
54+
fuzzy_match (2.0.4)
55+
gh_inspector (1.1.3)
56+
httpclient (2.8.3)
57+
i18n (0.9.5)
58+
concurrent-ruby (~> 1.0)
59+
json (2.2.0)
60+
minitest (5.12.2)
61+
molinillo (0.6.6)
62+
nanaimo (0.2.6)
63+
nap (1.1.0)
64+
netrc (0.11.0)
65+
ruby-macho (1.4.0)
66+
thread_safe (0.3.6)
67+
tzinfo (1.2.5)
68+
thread_safe (~> 0.1)
69+
xcodeproj (1.13.0)
70+
CFPropertyList (>= 2.3.3, < 4.0)
71+
atomos (~> 0.1.3)
72+
claide (>= 1.0.2, < 2.0)
73+
colored2 (~> 3.1)
74+
nanaimo (~> 0.2.6)
75+
76+
PLATFORMS
77+
ruby
78+
79+
DEPENDENCIES
80+
cocoapods
81+
82+
BUNDLED WITH
83+
1.17.2

KissXML.podspec

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'KissXML'
3-
s.version = '5.2.3'
3+
s.version = '5.3.0'
44
s.license = { :type => 'MIT', :file => 'LICENSE.txt' }
55
s.summary = 'A replacement for Cocoa\'s NSXML cluster of classes. Based on libxml.'
66
s.homepage = 'https://github.com/robbiehanson/KissXML'
@@ -9,10 +9,24 @@ Pod::Spec.new do |s|
99

1010
s.requires_arc = true
1111

12-
s.source_files = 'KissXML/**/*.{h,m}'
13-
s.private_header_files = 'KissXML/Private/**/*.h'
14-
s.library = 'xml2'
15-
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'}
12+
s.default_subspec = 'All'
13+
14+
s.subspec 'Core' do |ss|
15+
ss.source_files = 'KissXML/*.{h,m}', 'KissXML/Categories/*.{h,m}', 'KissXML/Private/*.h'
16+
ss.private_header_files = 'KissXML/Private/**/*.h'
17+
ss.library = 'xml2'
18+
ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2'}
19+
end
20+
21+
s.subspec 'Additions' do |ss|
22+
ss.dependency 'KissXML/Core'
23+
ss.source_files = 'KissXML/Additions/*.{h,m}'
24+
end
25+
26+
s.subspec 'All' do |ss|
27+
ss.dependency 'KissXML/Core'
28+
ss.dependency 'KissXML/Additions'
29+
end
1630

1731
s.ios.deployment_target = '8.0'
1832
s.osx.deployment_target = '10.9'

KissXML.xcodeproj/project.pbxproj

+44-11
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 51;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -357,7 +357,7 @@
357357
};
358358
};
359359
buildConfigurationList = 0DCD8DC41E54A3A2001D9832 /* Build configuration list for PBXProject "KissXML" */;
360-
compatibilityVersion = "Xcode 3.2";
360+
compatibilityVersion = "Xcode 10.0";
361361
developmentRegion = en;
362362
hasScannedForEncodings = 0;
363363
knownRegions = (
@@ -572,7 +572,8 @@
572572
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
573573
MTL_ENABLE_DEBUG_INFO = NO;
574574
SDKROOT = iphoneos;
575-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
575+
SWIFT_COMPILATION_MODE = wholemodule;
576+
SWIFT_OPTIMIZATION_LEVEL = "-O";
576577
SWIFT_VERSION = 4.0;
577578
TARGETED_DEVICE_FAMILY = "1,2";
578579
VALIDATE_PRODUCT = YES;
@@ -595,7 +596,11 @@
595596
INFOPLIST_FILE = KissXML/Info.plist;
596597
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
597598
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
598-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
599+
LD_RUNPATH_SEARCH_PATHS = (
600+
"$(inherited)",
601+
"@executable_path/Frameworks",
602+
"@loader_path/Frameworks",
603+
);
599604
PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML;
600605
PRODUCT_NAME = "$(PROJECT_NAME)";
601606
SKIP_INSTALL = YES;
@@ -617,7 +622,11 @@
617622
INFOPLIST_FILE = KissXML/Info.plist;
618623
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
619624
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
620-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
625+
LD_RUNPATH_SEARCH_PATHS = (
626+
"$(inherited)",
627+
"@executable_path/Frameworks",
628+
"@loader_path/Frameworks",
629+
);
621630
PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML;
622631
PRODUCT_NAME = "$(PROJECT_NAME)";
623632
SKIP_INSTALL = YES;
@@ -637,7 +646,11 @@
637646
DYLIB_INSTALL_NAME_BASE = "@rpath";
638647
INFOPLIST_FILE = KissXML/Info.plist;
639648
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
640-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
649+
LD_RUNPATH_SEARCH_PATHS = (
650+
"$(inherited)",
651+
"@executable_path/Frameworks",
652+
"@loader_path/Frameworks",
653+
);
641654
MACOSX_DEPLOYMENT_TARGET = 10.9;
642655
PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML;
643656
PRODUCT_NAME = "$(PROJECT_NAME)";
@@ -660,7 +673,11 @@
660673
DYLIB_INSTALL_NAME_BASE = "@rpath";
661674
INFOPLIST_FILE = KissXML/Info.plist;
662675
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
663-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
676+
LD_RUNPATH_SEARCH_PATHS = (
677+
"$(inherited)",
678+
"@executable_path/Frameworks",
679+
"@loader_path/Frameworks",
680+
);
664681
MACOSX_DEPLOYMENT_TARGET = 10.9;
665682
PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML;
666683
PRODUCT_NAME = "$(PROJECT_NAME)";
@@ -682,7 +699,11 @@
682699
DYLIB_INSTALL_NAME_BASE = "@rpath";
683700
INFOPLIST_FILE = KissXML/Info.plist;
684701
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
685-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
702+
LD_RUNPATH_SEARCH_PATHS = (
703+
"$(inherited)",
704+
"@executable_path/Frameworks",
705+
"@loader_path/Frameworks",
706+
);
686707
PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML;
687708
PRODUCT_NAME = "$(PROJECT_NAME)";
688709
SDKROOT = appletvos;
@@ -706,7 +727,11 @@
706727
DYLIB_INSTALL_NAME_BASE = "@rpath";
707728
INFOPLIST_FILE = KissXML/Info.plist;
708729
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
709-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
730+
LD_RUNPATH_SEARCH_PATHS = (
731+
"$(inherited)",
732+
"@executable_path/Frameworks",
733+
"@loader_path/Frameworks",
734+
);
710735
PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML;
711736
PRODUCT_NAME = "$(PROJECT_NAME)";
712737
SDKROOT = appletvos;
@@ -729,7 +754,11 @@
729754
DYLIB_INSTALL_NAME_BASE = "@rpath";
730755
INFOPLIST_FILE = KissXML/Info.plist;
731756
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
732-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
757+
LD_RUNPATH_SEARCH_PATHS = (
758+
"$(inherited)",
759+
"@executable_path/Frameworks",
760+
"@loader_path/Frameworks",
761+
);
733762
PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML;
734763
PRODUCT_NAME = "$(PROJECT_NAME)";
735764
SDKROOT = watchos;
@@ -753,7 +782,11 @@
753782
DYLIB_INSTALL_NAME_BASE = "@rpath";
754783
INFOPLIST_FILE = KissXML/Info.plist;
755784
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
756-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
785+
LD_RUNPATH_SEARCH_PATHS = (
786+
"$(inherited)",
787+
"@executable_path/Frameworks",
788+
"@loader_path/Frameworks",
789+
);
757790
PRODUCT_BUNDLE_IDENTIFIER = org.robbiehanson.KissXML;
758791
PRODUCT_NAME = "$(PROJECT_NAME)";
759792
SDKROOT = watchos;

KissXML/Additions/DDXMLElementAdditions.h

+28-10
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,38 @@
77
NS_ASSUME_NONNULL_BEGIN
88
@interface DDXMLElement (DDAdditions)
99

10-
+ (nullable DDXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns;
10+
+ (nullable DDXMLElement *)dd_elementWithName:(NSString *)name xmlns:(NSString *)ns;
1111

12-
- (nullable DDXMLElement *)elementForName:(NSString *)name;
13-
- (nullable DDXMLElement *)elementForName:(NSString *)name xmlns:(NSString *)xmlns;
12+
- (nullable DDXMLElement *)dd_elementForName:(NSString *)name;
13+
- (nullable DDXMLElement *)dd_elementForName:(NSString *)name xmlns:(NSString *)xmlns;
1414

15-
- (nullable NSString *)xmlns;
16-
- (void)setXmlns:(NSString *)ns;
15+
@property (nonatomic, readwrite, nullable) NSString *dd_xmlns;
1716

18-
- (NSString *)prettyXMLString;
19-
- (NSString *)compactXMLString;
17+
@property (nonatomic, readonly) NSString *dd_prettyXMLString;
18+
@property (nonatomic, readonly) NSString *dd_compactXMLString;
2019

21-
- (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string;
20+
- (void)dd_addAttributeWithName:(NSString *)name stringValue:(NSString *)string;
2221

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

2524
@end
26-
NS_ASSUME_NONNULL_END
25+
26+
@interface DDXMLElement (DDAdditionsDeprecated)
27+
28+
+ (nullable DDXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns DEPRECATED_MSG_ATTRIBUTE("use dd_elementWithName:xmlns: instead.");
29+
30+
- (nullable DDXMLElement *)elementForName:(NSString *)name DEPRECATED_MSG_ATTRIBUTE("use dd_elementForName: instead.");
31+
- (nullable DDXMLElement *)elementForName:(NSString *)name xmlns:(NSString *)xmlns DEPRECATED_MSG_ATTRIBUTE("use dd_elementForName:xmlns: instead.");
32+
33+
- (nullable NSString *)xmlns DEPRECATED_MSG_ATTRIBUTE("use dd_xmlns instead.");
34+
- (void)setXmlns:(NSString *)ns DEPRECATED_MSG_ATTRIBUTE("use setDd_xmlns: instead.");
35+
36+
- (NSString *)prettyXMLString DEPRECATED_MSG_ATTRIBUTE("use dd_prettyXMLString instead.");
37+
- (NSString *)compactXMLString DEPRECATED_MSG_ATTRIBUTE("use dd_compactXMLString instead.");
38+
39+
- (void)addAttributeWithName:(NSString *)name stringValue:(NSString *)string DEPRECATED_MSG_ATTRIBUTE("use dd_addAttributeWithName:stringValue: instead.");
40+
41+
- (NSDictionary<NSString*,NSString*> *)attributesAsDictionary DEPRECATED_MSG_ATTRIBUTE("use dd_attributesAsDictionary instead.");
42+
43+
@end
44+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)