diff --git a/Harpy.podspec b/Harpy.podspec index 7464df9..86a96da 100644 --- a/Harpy.podspec +++ b/Harpy.podspec @@ -1,10 +1,10 @@ -Pod::Spec.new do |s| + Pod::Spec.new do |s| s.name = "Harpy" - s.version = "3.2.0" + s.version = "3.2.1" s.summary = "Notify users that a new version of your iOS app is available, and prompt them with the AppStore link." s.homepage = "https://github.com/ArtSabintsev/Harpy" s.platform = :ios, '5.0' - s.source = { :git => "https://github.com/ArtSabintsev/Harpy.git", :tag => "3.2.0" } + s.source = { :git => "https://github.com/ArtSabintsev/Harpy.git", :tag => "3.2.1" } s.source_files = 'Harpy/*.{h,m}' s.resources = 'Harpy/Harpy.bundle' s.requires_arc = true diff --git a/Harpy/Harpy.m b/Harpy/Harpy.m index e716914..5638173 100755 --- a/Harpy/Harpy.m +++ b/Harpy/Harpy.m @@ -9,7 +9,6 @@ #import "Harpy.h" /// NSUserDefault macros to store user's preferences for HarpyAlertTypeSkip -#define HARPY_DEFAULT_SHOULD_SKIP_VERSION @"Harpy Should Skip Version Boolean" #define HARPY_DEFAULT_SKIPPED_VERSION @"Harpy User Decided To Skip Version Update Boolean" #define HARPY_DEFAULT_STORED_VERSION_CHECK_DATE @"Harpy Stored Date From Last Version Check" @@ -217,12 +216,9 @@ - (void)checkIfAppStoreVersionIsNewestVersion:(NSString *)currentAppStoreVersion - (void)showAlertIfCurrentAppStoreVersionNotSkipped:(NSString *)currentAppStoreVersion { // Check if user decided to skip this version in the past - BOOL shouldSkipVersionUpdate = [[NSUserDefaults standardUserDefaults] boolForKey:HARPY_DEFAULT_SHOULD_SKIP_VERSION]; NSString *storedSkippedVersion = [[NSUserDefaults standardUserDefaults] objectForKey:HARPY_DEFAULT_SKIPPED_VERSION]; - if (!shouldSkipVersionUpdate) { - [self showAlertWithAppStoreVersion:currentAppStoreVersion]; - } else if (shouldSkipVersionUpdate && ![storedSkippedVersion isEqualToString:currentAppStoreVersion]) { + if (![storedSkippedVersion isEqualToString:currentAppStoreVersion]) { [self showAlertWithAppStoreVersion:currentAppStoreVersion]; } else { // Don't show alert. @@ -410,7 +406,6 @@ - (UIAlertAction *)skipAlertAction style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { [[NSUserDefaults standardUserDefaults] setObject:_currentAppStoreVersion forKey:HARPY_DEFAULT_SKIPPED_VERSION]; - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:HARPY_DEFAULT_SHOULD_SKIP_VERSION]; [[NSUserDefaults standardUserDefaults] synchronize]; if([self.delegate respondsToSelector:@selector(harpyUserDidSkipVersion)]){ [self.delegate harpyUserDidSkipVersion]; @@ -447,7 +442,6 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto [self launchAppStore]; } else if (buttonIndex == 1) { // Launch App Store.app [[NSUserDefaults standardUserDefaults] setObject:_currentAppStoreVersion forKey:HARPY_DEFAULT_SKIPPED_VERSION]; - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:HARPY_DEFAULT_SHOULD_SKIP_VERSION]; [[NSUserDefaults standardUserDefaults] synchronize]; if([self.delegate respondsToSelector:@selector(harpyUserDidSkipVersion)]){ [self.delegate harpyUserDidSkipVersion]; diff --git a/LICENSE.md b/LICENSE.md index c8246bb..1bb49be 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2012-2014 Arthur Ariel Sabintsev +Copyright (c) 2012-2015 Arthur Ariel Sabintsev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9e39214..174bb46 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ This library is built to work with the [Semantic Versioning](http://semver.org/) system. ### Changelog -#### 3.2.0 -- Replaced NSURLConnection code with NSURLSession code. +#### 3.2.1 +- Removed unnecessary code for determining if user had clicked *Skip Version* ### Features - Cocoapods Support