Open appsyscode opened 7 years ago
Please confirm whether this still occurs in the latest commit 3af6fa056f7e0249473c8dedeb621849b632819a of build 2.4 (669).
The latest version! It stops when there is no opinion about the application blank data
I have the same issue, no report data since 18th July. It looks like it downloads the data but the data is not shown in report view. Maybe it has to do with itunesconnect token. AppSales currently doesn't support token authentication?
It supports me tonight when I get home I'll show you what to change on it.
@ivanstojkovicapps Your comment is better suited for Issue #29, which has been resolved since commit 52b21d44bea6d591fc20c99769e927b6d42c90ed.
@appsyscode Could you please attach some screenshots of the issue? A screenshot of Xcode’s console output window would also be helpful.
Hy! The problem is the following if there is an application or package application for which there is no evaluation there is an unexpetcted error and will not go on! I've corrected this with a simple text value that goes on and reviews all but an error message indicating that there is an empty array. Here. The corrected code.
ReviewDownloadOperation.m
@property NSString *statusStr;
- (void)main {
[self downloadProgress:(1.0f/3.0f) withStatus:NSLocalizedString(@"Downloading reviews...", nil)];
NSString *platform = [_product.platform isEqualToString:kProductPlatformMac] ? kITCReviewAPIPlatformMac : kITCReviewAPIPlatformiOS;
NSString *refPagePath = [NSString stringWithFormat:kITCReviewAPIRefPageAction, _product.productID, platform];
NSURL *refPageURL = [NSURL URLWithString:[kITCBaseURL stringByAppendingString:refPagePath]];
NSData *refPageData = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:refPageURL] returningResponse:nil error:nil];
if (refPageData) {
NSDictionary *refPage = [NSJSONSerialization JSONObjectWithData:refPageData options:0 error:nil];
NSString *statusCode = refPage[@"statusCode"];
if (![statusCode isEqualToString:@"SUCCESS"]) {
self.statusStr=@"ERROR";
//[self showAlert:statusCode withMessages:refPage[@"messages"]];
[self processRefPage:refPage];
} else {
self.statusStr=@"SUCCESS";
dispatch_async(dispatch_get_main_queue(), ^{
[self processRefPage:refPage];
});
}
} else {
[self failDownload];
}
}
- (void)processRefPage:(NSDictionary *)refPage {
if ([self.statusStr isEqualToString:@"SUCCESS"]) {
Product *product = (Product *)[moc objectWithID:productObjectID];
[productVersions removeAllObjects];
[existingReviews removeAllObjects];
for (Version *version in product.versions) {
productVersions[version.number] = version;
}
refPage = refPage[@"data"];
NSDictionary *versions = refPage[@"versions"];
for (NSDictionary *v in versions) {
NSString *identifier = [v[@"id"] stringValue];
NSString *number = v[@"versionString"];
Version *version = productVersions[number];
if (version == nil) {
version = (Version *)[NSEntityDescription insertNewObjectForEntityForName:@"Version" inManagedObjectContext:moc];
version.identifier = identifier;
version.number = number;
version.product = product;
productVersions[number] = version;
} else {
for (Review *review in version.reviews) {
existingReviews[review.identifier] = review;
}
}
}
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul), ^{
[self fetchReviews];
});
}
Download during reviews Alert "ERROR" Unexpected Error messages!