From c81e9967ce7fa9d85b6106fefdc2036df6613a05 Mon Sep 17 00:00:00 2001 From: Sebastien Windal Date: Thu, 17 Jul 2014 13:34:07 -0400 Subject: [PATCH] Fixed an issue where both success and failure callback were called on new activity upload failure --- Classes/FRDStravaClient+Upload.m | 3 ++- FRDStravaClient.podspec | 4 ++-- Readme.md | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Classes/FRDStravaClient+Upload.m b/Classes/FRDStravaClient+Upload.m index 119784c..88ecde6 100644 --- a/Classes/FRDStravaClient+Upload.m +++ b/Classes/FRDStravaClient+Upload.m @@ -78,9 +78,10 @@ -(void) uploadActivity:(NSURL *)fileURL code:1 userInfo:@{NSLocalizedDescriptionKey: status.error}]; failure(error); + } else { + success(status); } } - success(status); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { failure(error); diff --git a/FRDStravaClient.podspec b/FRDStravaClient.podspec index ead17ea..911c214 100644 --- a/FRDStravaClient.podspec +++ b/FRDStravaClient.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.name = "FRDStravaClient" - s.version = "1.0.1" + s.version = "1.0.2" s.summary = "A iOS Strava API client." s.description = <<-DESC A iOS client for the Strava API written in obj-C, @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = "Sebastien Windal" s.platform = :ios, "7.0" - s.source = { :git => "https://github.com/sebastienwindal/FRDStravaClient.git", :tag => "1.0.1" } + s.source = { :git => "https://github.com/sebastienwindal/FRDStravaClient.git", :tag => "1.0.2" } s.source_files = "Classes", "Classes/**/*.{h,m}" s.requires_arc = true s.dependency "AFNetworking", "~> 2.0" diff --git a/Readme.md b/Readme.md index 51619ae..b516f54 100644 --- a/Readme.md +++ b/Readme.md @@ -52,7 +52,7 @@ and then implement the OAUTH workflow described below. Using cocoapods: -`pod "FRDStravaClient", "~> 1.0.1"` +`pod "FRDStravaClient", "~> 1.0.2"` And `#import FRDStravaClientImports.h` in your source files. @@ -64,7 +64,7 @@ You need all the stuff in the `Classes/` folder, `AFNetworking` version x.x and The library header files have appledoc comments with appropriate links to the API section, you can check them in the code or in the -[FRDStravaClient Cocoadocs page](http://cocoadocs.org/docsets/FRDStravaClient/1.0.1/). +[FRDStravaClient Cocoadocs page](http://cocoadocs.org/docsets/FRDStravaClient/1.0.2/). ### OAUTH Flow