diff --git a/Harpy.podspec b/Harpy.podspec index ea6e65f..f86d831 100644 --- a/Harpy.podspec +++ b/Harpy.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Harpy" - s.version = "4.0.0" + s.version = "4.0.1" s.summary = "Notify users that a new version of your iOS app is available, and prompt them with the App Store link." s.homepage = "https://github.com/ArtSabintsev/Harpy" s.platform = :ios, '8.0' diff --git a/Harpy/Harpy.m b/Harpy/Harpy.m index 81681e6..5e61de9 100755 --- a/Harpy/Harpy.m +++ b/Harpy/Harpy.m @@ -210,8 +210,8 @@ - (NSURL *)itunesURL { - (BOOL)isUpdateCompatibleWithDeviceOS:(NSDictionary *)appData { NSArray *> *results = appData[@"results"]; - if (results != nil) { - NSString *requiresOSVersion = results[0][@"minimumOsVersion"]; + if (results.count > 0) { + NSString *requiresOSVersion = [results firstObject][@"minimumOsVersion"]; if (requiresOSVersion != nil) { NSString *systemVersion = [UIDevice currentDevice].systemVersion; if ( diff --git a/README.md b/README.md index e9bb578..a34996d 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ If an app update is available, Harpy checks to make sure that the version of iOS ## Testing Harpy Temporarily change the version string in Xcode (within the `.xcodeproj`) to an older version than the one that's currently available in the App Store. Afterwards, build and run your app, and you should see the alert. -If you currently don't have an app in the store, change your bundleID to one that is already in the store. In the sample app packaged with this librart, we use the [iTunes Connect Mobile](https://itunes.apple.com/us/app/itunes-connect/id376771144?mt=8) app's bundleID: `com.apple.itunesconnect.mobile`. +If you currently don't have an app in the store, change your bundleID to one that is already in the store. In the sample app packaged with this library, we use the [iTunes Connect Mobile](https://itunes.apple.com/us/app/itunes-connect/id376771144?mt=8) app's bundleID: `com.apple.itunesconnect.mobile`. ## Important Note on App Store Submissions The App Store reviewer will **not** see the alert.