Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions BlockRSSParser.podspec
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Pod::Spec.new do |s|
s.name = "BlockRSSParser"
s.version = "2.1"
s.summary = "AFNetworkingXMLRequestOperation based RSS parser."
s.version = "3.0"
s.summary = "AFNetworking based RSS parser."
s.homepage = "https://github.com/tibo/BlockRSSParser"

s.license = { :type => 'MIT', :file => 'LICENSE' }

s.author = { "Thibaut LE LEVIER" => "thibaut@lelevier.fr" }

s.source = { :git => "https://github.com/tibo/BlockRSSParser.git", :tag => "2.1" }
s.source = { :git => "https://github.com/tibo/BlockRSSParser.git", :tag => "3.0" }

s.requires_arc = true

s.platform = :ios
s.ios.deployment_target = '6.0'
s.ios.deployment_target = '7.0'

s.source_files = 'Classes', 'RSSParser/*.{h,m}'

s.dependency 'AFNetworking', '~> 2.0'
s.dependency 'AFNetworking', '~> 3.0'
end
34 changes: 16 additions & 18 deletions RSSParser/RSSParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
//

#import "RSSParser.h"

#import "AFHTTPRequestOperation.h"
#import "AFHTTPSessionManager.h"
#import "AFURLResponseSerialization.h"

@interface RSSParser()
Expand Down Expand Up @@ -52,22 +51,21 @@ - (void)parseRSSFeedForRequest:(NSURLRequest *)urlRequest

block = [success copy];

AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest];

operation.responseSerializer = [[AFXMLParserResponseSerializer alloc] init];
operation.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/xml", @"text/xml",@"application/rss+xml", @"application/atom+xml", nil];

[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
failblock = [failure copy];
[(NSXMLParser *)responseObject setDelegate:self];
[(NSXMLParser *)responseObject parse];
}
failure:^(AFHTTPRequestOperation *operation, NSError *error) {
failure(error);
}];

[operation start];

AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer = [AFXMLParserResponseSerializer serializer];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/xml", @"text/xml",@"application/rss+xml", @"application/atom+xml", nil];
NSURLSessionDataTask *task = [manager dataTaskWithRequest:urlRequest uploadProgress:nil downloadProgress:nil
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
if (error) {
if (failure) failure(error);
} else {
if (success) {
[(NSXMLParser *)responseObject setDelegate:self];
[(NSXMLParser *)responseObject parse];
}
}
}];
[task resume];
}

#pragma mark -
Expand Down
2 changes: 1 addition & 1 deletion RSSParser_Sample/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.0.3'
pod 'AFNetworking', '~> 3.0'

target :Tests, :exclusive => true do
pod 'Kiwi/XCTest'
Expand Down
35 changes: 16 additions & 19 deletions RSSParser_Sample/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
PODS:
- AFNetworking (2.0.3):
- AFNetworking/NSURLConnection
- AFNetworking/NSURLSession
- AFNetworking (3.1.0):
- AFNetworking/NSURLSession (= 3.1.0)
- AFNetworking/Reachability (= 3.1.0)
- AFNetworking/Security (= 3.1.0)
- AFNetworking/Serialization (= 3.1.0)
- AFNetworking/UIKit (= 3.1.0)
- AFNetworking/NSURLSession (3.1.0):
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/UIKit
- AFNetworking/NSURLConnection (2.0.3):
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/NSURLSession (2.0.3):
- AFNetworking/NSURLConnection
- AFNetworking/Reachability (2.0.3)
- AFNetworking/Security (2.0.3)
- AFNetworking/Serialization (2.0.3)
- AFNetworking/UIKit (2.0.3):
- AFNetworking/NSURLConnection
- AFNetworking/Reachability (3.1.0)
- AFNetworking/Security (3.1.0)
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- Kiwi/ARC (2.2.3)
- Kiwi/NonARC (2.2.3)
- Kiwi/XCTest (2.2.3):
- Kiwi/ARC
- Kiwi/NonARC

DEPENDENCIES:
- AFNetworking (~> 2.0.3)
- AFNetworking (~> 3.0)
- Kiwi/XCTest

SPEC CHECKSUMS:
AFNetworking: e499052cbf3d743e9bb727bb37adb9dc2547ba15
Kiwi: 04c51e880831d291748ec702d42c4101f7eb95c9
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
Kiwi: e4e2673e9435622a5b84149fc90394b5345bc8bc

COCOAPODS: 0.28.0
COCOAPODS: 0.35.0
74 changes: 57 additions & 17 deletions RSSParser_Sample/RSSParser_Sample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
073191F44E634D718281FECB /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = "<group>"; };
110A8A8314E9A30C0013AC07 /* RSSParser_Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RSSParser_Sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
110A8A8714E9A30C0013AC07 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
110A8A8914E9A30C0013AC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -81,7 +80,10 @@
118543F314E9AFE0001761CB /* ArticleDetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ArticleDetailViewController.xib; sourceTree = "<group>"; };
2491A17B4E26435E940E1404 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
4A5D50FCF4044DC3865DCB53 /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
CB8EEF26B88147498AFADEE2 /* Pods-Tests.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.xcconfig"; path = "Pods/Pods-Tests.xcconfig"; sourceTree = "<group>"; };
57367787D398B56F08A3E2D9 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
75EAD02B816777CFF768A4F6 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
C9BAC420E574DCEFDA7C6A58 /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig"; sourceTree = "<group>"; };
D61CB0B4B599B1FA028DAC44 /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = "<group>"; };
DA0619AC16A3127300DB4BB8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
DA0619AE16A312E200DB4BB8 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -127,8 +129,7 @@
113DA6AA18452BF5005700B7 /* Tests */,
110A8A8614E9A30C0013AC07 /* Frameworks */,
110A8A8414E9A30C0013AC07 /* Products */,
073191F44E634D718281FECB /* Pods.xcconfig */,
CB8EEF26B88147498AFADEE2 /* Pods-Tests.xcconfig */,
DE10F21BD2479F8FC96EA5A3 /* Pods */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -224,6 +225,17 @@
path = ../RSSParser;
sourceTree = "<group>";
};
DE10F21BD2479F8FC96EA5A3 /* Pods */ = {
isa = PBXGroup;
children = (
57367787D398B56F08A3E2D9 /* Pods.debug.xcconfig */,
75EAD02B816777CFF768A4F6 /* Pods.release.xcconfig */,
C9BAC420E574DCEFDA7C6A58 /* Pods-Tests.debug.xcconfig */,
D61CB0B4B599B1FA028DAC44 /* Pods-Tests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -272,7 +284,7 @@
110A8A7A14E9A30A0013AC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
LastUpgradeCheck = 0730;
TargetAttributes = {
113DA6A418452BF4005700B7 = {
TestTargetID = 110A8A8214E9A30B0013AC07;
Expand Down Expand Up @@ -350,7 +362,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Pods-Tests-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Tests/Pods-Tests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9B69B36826794FA0AC47656A /* Check Pods Manifest.lock */ = {
Expand Down Expand Up @@ -380,7 +392,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -441,23 +453,37 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = 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;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -466,16 +492,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = 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;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand All @@ -484,35 +522,36 @@
};
110A8A9C14E9A30C0013AC07 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 073191F44E634D718281FECB /* Pods.xcconfig */;
baseConfigurationReference = 57367787D398B56F08A3E2D9 /* Pods.debug.xcconfig */;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RSSParser_Sample/RSSParser_Sample-Prefix.pch";
INFOPLIST_FILE = "RSSParser_Sample/RSSParser_Sample-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.lelevier.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
110A8A9D14E9A30C0013AC07 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 073191F44E634D718281FECB /* Pods.xcconfig */;
baseConfigurationReference = 75EAD02B816777CFF768A4F6 /* Pods.release.xcconfig */;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "RSSParser_Sample/RSSParser_Sample-Prefix.pch";
INFOPLIST_FILE = "RSSParser_Sample/RSSParser_Sample-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.lelevier.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
113DA6B518452BF5005700B7 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CB8EEF26B88147498AFADEE2 /* Pods-Tests.xcconfig */;
baseConfigurationReference = C9BAC420E574DCEFDA7C6A58 /* Pods-Tests.debug.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/RSSParser_Sample.app/RSSParser_Sample";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -544,6 +583,7 @@
INFOPLIST_FILE = "Tests/Tests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.lelevier.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
Expand All @@ -552,9 +592,8 @@
};
113DA6B618452BF5005700B7 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CB8EEF26B88147498AFADEE2 /* Pods-Tests.xcconfig */;
baseConfigurationReference = D61CB0B4B599B1FA028DAC44 /* Pods-Tests.release.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/RSSParser_Sample.app/RSSParser_Sample";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -582,6 +621,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "Tests/Tests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.lelevier.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
Expand Down
Loading