diff --git a/Harpy/Harpy.m b/Harpy/Harpy.m index 5e61de9..0e47bf8 100755 --- a/Harpy/Harpy.m +++ b/Harpy/Harpy.m @@ -249,9 +249,15 @@ - (BOOL)isAppStoreVersionNewer:(NSString *)currentAppStoreVersion { } - (void)appStoreVersionIsNewer:(NSString *)currentAppStoreVersion { - [self localizeAlertStringsForCurrentAppStoreVersion:currentAppStoreVersion]; - [self alertTypeForVersion:currentAppStoreVersion]; - [self showAlertIfCurrentAppStoreVersionNotSkipped:currentAppStoreVersion]; + _appID = _appData[@"results"][0][@"trackId"]; + + if (_appID == nil) { + [self printDebugMessage:@"appID is nil, which means to the trackId key is missing from the JSON results that Apple returned for your bundleID. If a version of your app is in the store and you are seeing this message, please open up an issue http://github.com/ArtSabintsev/Harpy and provide as much detail about your app as you can. Thanks!"]; + } else { + [self localizeAlertStringsForCurrentAppStoreVersion:currentAppStoreVersion]; + [self alertTypeForVersion:currentAppStoreVersion]; + [self showAlertIfCurrentAppStoreVersionNotSkipped:currentAppStoreVersion]; + } } - (void)launchAppStore {