Permalink
Browse files

Removed review, promo code and payments download

These features have often not worked reliably and I rarely use them.
1 parent 9f3af38 commit 73ba06d240193250cf7c4db4424fbabd9db59ed6 Ole Zorn committed Dec 16, 2012
Showing with 62 additions and 3,857 deletions.
  1. +19 −222 AppSales.xcodeproj/project.pbxproj
  2. +1 −1 Classes/AccountsViewController+VendorID.m
  3. +10 −46 Classes/AccountsViewController.m
  4. +3 −50 Classes/AppSalesAppDelegate.m
  5. +19 −23 Classes/DashboardViewController.m
  6. +0 −37 Classes/DownloadStepOperation.h
  7. +0 −145 Classes/DownloadStepOperation.m
  8. +0 −24 Classes/MultiOperation.h
  9. +0 −97 Classes/MultiOperation.m
  10. +0 −23 Classes/PromoCode.h
  11. +0 −20 Classes/PromoCode.m
  12. +0 −24 Classes/PromoCodeOperation.h
  13. +0 −480 Classes/PromoCodeOperation.m
  14. +0 −37 Classes/PromoCodesAppViewController.h
  15. +0 −359 Classes/PromoCodesAppViewController.m
  16. +0 −24 Classes/PromoCodesLicenseViewController.h
  17. +0 −95 Classes/PromoCodesLicenseViewController.m
  18. +0 −24 Classes/PromoCodesViewController.h
  19. +0 −143 Classes/PromoCodesViewController.m
  20. +0 −1 Classes/ReportDownloadCoordinator.h
  21. +0 −14 Classes/ReportDownloadCoordinator.m
  22. +0 −155 Classes/ReportDownloadOperation.m
  23. +0 −28 Classes/Review.h
  24. +0 −26 Classes/Review.m
  25. +0 −24 Classes/ReviewDetailViewController.h
  26. +0 −102 Classes/ReviewDetailViewController.m
  27. +0 −65 Classes/ReviewDownloadManager.h
  28. +0 −368 Classes/ReviewDownloadManager.m
  29. +0 −28 Classes/ReviewListViewController.h
  30. +0 −182 Classes/ReviewListViewController.m
  31. +0 −42 Classes/ReviewSummaryView.h
  32. +0 −195 Classes/ReviewSummaryView.m
  33. +0 −23 Classes/ReviewsViewController.h
  34. +0 −206 Classes/ReviewsViewController.m
  35. BIN Images/AllReviewsButton.png
  36. BIN Images/AllReviewsButton@2x.png
  37. BIN Images/AllReviewsButtonHighlighted.png
  38. BIN Images/AllReviewsButtonHighlighted@2x.png
  39. BIN Images/Check.png
  40. BIN Images/Check@2x.png
  41. BIN Images/Default-Landscape.png
  42. BIN Images/Default-Landscape@2x.png
  43. BIN Images/Default-Landscape~ipad.png
  44. BIN Images/Default-Portrait.png
  45. BIN Images/Default-Portrait@2x.png
  46. BIN Images/Default-Portrait~ipad.png
  47. BIN Images/Payments.png
  48. BIN Images/Payments@2x.png
  49. BIN Images/PromoCodes.png
  50. BIN Images/RequestPromoCode.png
  51. BIN Images/ReviewBarButton.png
  52. BIN Images/ReviewBarButton@2x.png
  53. BIN Images/Reviews.png
  54. BIN Images/Reviews@2x.png
  55. BIN Images/Star.png
  56. BIN Images/Star@2x.png
  57. BIN Images/Star_Highlighted.png
  58. BIN Images/Star_Highlighted@2x.png
  59. +10 −4 README.md
  60. BIN Screenshot.png
  61. +0 −53 Support/ReviewTemplate.html
  62. +0 −467 Support/stores.plist

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -32,7 +32,7 @@ - (void)findVendorIDsWithLogin:(NSDictionary *)loginInfo
NSString *ittsBaseURL = @"https://itunesconnect.apple.com";
NSString *ittsLoginPageAction = @"/WebObjects/iTunesConnect.woa";
- NSString *signoutSentinel = @"name=\"signOutForm\"";
+ NSString *signoutSentinel = @"menu-item sign-out";
NSURL *loginURL = [NSURL URLWithString:[ittsBaseURL stringByAppendingString:ittsLoginPageAction]];
NSHTTPURLResponse *loginPageResponse = nil;
@@ -8,7 +8,6 @@
#import "AccountsViewController.h"
#import "SalesViewController.h"
-#import "ReviewsViewController.h"
#import "SSKeychain.h"
#import "ASAccount.h"
#import "Report.h"
@@ -17,13 +16,10 @@
#import "ReportDownloadCoordinator.h"
#import "MBProgressHUD.h"
#import "ReportImportOperation.h"
-#import "PaymentsViewController.h"
#import "BadgedCell.h"
#import "UIImage+Tinting.h"
#import "AboutViewController.h"
#import "AccountStatusView.h"
-#import "PromoCodesViewController.h"
-#import "PromoCodesLicenseViewController.h"
#import "KKPasscodeLock.h"
#import "ZipFile.h"
#import "ZipWriteStream.h"
@@ -177,7 +173,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
if ([self.accounts count] == 0) {
return 0;
}
- return 5;
+ return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
@@ -200,32 +196,11 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell.imageView.image = [UIImage imageNamed:@"Sales.png"];
cell.imageView.highlightedImage = [UIImage as_tintedImageNamed:@"Sales.png" color:[UIColor whiteColor]];
} else if (indexPath.row == 1) {
- NSInteger badge = [[[self.accounts objectAtIndex:indexPath.section] paymentsBadge] integerValue];
- cell.textLabel.text = NSLocalizedString(@"Payments", nil);
- cell.badgeCount = badge;
- cell.imageView.image = [UIImage imageNamed:@"Payments.png"];
- cell.imageView.highlightedImage = [UIImage as_tintedImageNamed:@"Payments.png" color:[UIColor whiteColor]];
- } else if (indexPath.row == 2) {
- cell.textLabel.text = NSLocalizedString(@"Customer Reviews", nil);
- cell.imageView.image = [UIImage imageNamed:@"Reviews.png"];
- cell.imageView.highlightedImage = [UIImage as_tintedImageNamed:@"Reviews.png" color:[UIColor whiteColor]];
-
- ASAccount *account = [self.accounts objectAtIndex:indexPath.section];
- NSFetchRequest *unreadReviewsRequest = [[[NSFetchRequest alloc] init] autorelease];
- [unreadReviewsRequest setEntity:[NSEntityDescription entityForName:@"Review" inManagedObjectContext:[self managedObjectContext]]];
- [unreadReviewsRequest setPredicate:[NSPredicate predicateWithFormat:@"product.account == %@ AND unread == TRUE", account]];
- cell.badgeCount = [[self managedObjectContext] countForFetchRequest:unreadReviewsRequest error:NULL];
- } else if (indexPath.row == 3) {
- cell.textLabel.text = NSLocalizedString(@"Promo Codes", nil);
- cell.imageView.image = [UIImage imageNamed:@"PromoCodes.png"];
- cell.imageView.highlightedImage = [UIImage as_tintedImageNamed:@"PromoCodes.png" color:[UIColor whiteColor]];
- cell.badgeCount = 0;
- } else if (indexPath.row == 4) {
cell.textLabel.text = NSLocalizedString(@"Account", nil);
cell.imageView.image = [UIImage imageNamed:@"Account.png"];
cell.imageView.highlightedImage = [UIImage as_tintedImageNamed:@"Account.png" color:[UIColor whiteColor]];
cell.badgeCount = 0;
- }
+ }
return cell;
}
@@ -272,15 +247,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
SalesViewController *salesViewController = [[[SalesViewController alloc] initWithAccount:account] autorelease];
[self.navigationController pushViewController:salesViewController animated:YES];
} else if (indexPath.row == 1) {
- PaymentsViewController *paymentsViewController = [[[PaymentsViewController alloc] initWithAccount:account] autorelease];
- [self.navigationController pushViewController:paymentsViewController animated:YES];
- } else if (indexPath.row == 2) {
- ReviewsViewController *reviewsViewController = [[[ReviewsViewController alloc] initWithAccount:account] autorelease];
- [self.navigationController pushViewController:reviewsViewController animated:YES];
- } else if (indexPath.row == 3) {
- PromoCodesViewController *promoCodesViewController = [[[PromoCodesViewController alloc] initWithAccount:account] autorelease];
- [self.navigationController pushViewController:promoCodesViewController animated:YES];
- } else if (indexPath.row == 4) {
[self editAccount:account];
}
}
@@ -399,12 +365,12 @@ - (void)showSettings
{
// main section
passcodeLockField = [FieldSpecifier buttonFieldWithKey:kPasscodeLockButton title:NSLocalizedString(@"Passcode Lock", nil)];
- if ([[KKPasscodeLock sharedLock] isPasscodeRequired]) {
- passcodeLockField.defaultValue = @"On";
- } else {
- passcodeLockField.defaultValue = @"Off";
- }
-
+ if ([[KKPasscodeLock sharedLock] isPasscodeRequired]) {
+ passcodeLockField.defaultValue = @"On";
+ } else {
+ passcodeLockField.defaultValue = @"Off";
+ }
+
NSString *baseCurrency = [[CurrencyManager sharedManager] baseCurrency];
NSArray *availableCurrencies = [[CurrencyManager sharedManager] availableCurrencies];
NSMutableArray *currencyFields = [NSMutableArray array];
@@ -417,9 +383,8 @@ - (void)showSettings
description:nil];
currencySection.exclusiveSelection = YES;
FieldSpecifier *currencySectionField = [FieldSpecifier subsectionFieldWithSection:currencySection key:@"currency"];
- FieldSpecifier *updateExchangeRatesButtonField = [FieldSpecifier buttonFieldWithKey:kUpdateExchangeRatesButton title:NSLocalizedString(@"Update Exchange Rates Now", nil)];
- FieldSpecifier *downloadPaymentsField = [FieldSpecifier switchFieldWithKey:kSettingDownloadPayments title:NSLocalizedString(@"Download Payments", nil) defaultValue:[[NSUserDefaults standardUserDefaults] boolForKey:kSettingDownloadPayments]];
- FieldSectionSpecifier *mainSection = [FieldSectionSpecifier sectionWithFields:[NSArray arrayWithObjects:passcodeLockField, currencySectionField, updateExchangeRatesButtonField, downloadPaymentsField, nil]
+ FieldSpecifier *updateExchangeRatesButtonField = [FieldSpecifier buttonFieldWithKey:kUpdateExchangeRatesButton title:NSLocalizedString(@"Update Exchange Rates Now", nil)];
+ FieldSectionSpecifier *mainSection = [FieldSectionSpecifier sectionWithFields:[NSArray arrayWithObjects:passcodeLockField, currencySectionField, updateExchangeRatesButtonField, nil]
title:NSLocalizedString(@"General", nil)
description:NSLocalizedString(@"Exchange rates will automatically be refreshed periodically.", nil)];
@@ -533,7 +498,6 @@ - (void)fieldEditor:(FieldEditorViewController *)editor didFinishEditingWithValu
}
}
}
- [[NSUserDefaults standardUserDefaults] setBool:[[returnValues objectForKey:kSettingDownloadPayments] boolValue] forKey:kSettingDownloadPayments];
[self dismissModalViewControllerAnimated:YES];
[[NSNotificationCenter defaultCenter] postNotificationName:ASViewSettingsDidChangeNotification object:nil];
@@ -11,14 +11,9 @@
#import "CurrencyManager.h"
#import "ReportDownloadOperation.h"
#import "ReportDownloadCoordinator.h"
-#import "PromoCodeOperation.h"
#import "SSKeychain.h"
#import "ASAccount.h"
#import "SalesViewController.h"
-#import "ReviewsViewController.h"
-#import "PaymentsViewController.h"
-#import "PromoCodesViewController.h"
-#import "PromoCodesLicenseViewController.h"
@implementation AppSalesAppDelegate
@@ -42,8 +37,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
currencyCode, @"CurrencyManagerBaseCurrency",
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
-
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(promoCodeLicenseAgreementLoaded:) name:@"PromoCodeOperationLoadedLicenseAgreementNotification" object:nil];
BOOL iPad = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad;
if (!iPad) {
@@ -80,7 +73,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
}
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reportDownloadFailed:) name:ASReportDownloadFailedNotification object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(promoCodeDownloadFailed:) name:ASPromoCodeDownloadFailedNotification object:nil];
if ([launchOptions objectForKey:UIApplicationLaunchOptionsURLKey]) {
[self.accountsViewController performSelector:@selector(downloadReports:) withObject:nil afterDelay:0.0];
@@ -134,33 +126,13 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger
- (void)loadAccount:(ASAccount *)account
{
- UIBarButtonItem *selectAccountButtonItem1 = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Account", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(selectAccount:)] autorelease];
- UIBarButtonItem *selectAccountButtonItem2 = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Account", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(selectAccount:)] autorelease];
- UIBarButtonItem *selectAccountButtonItem3 = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Account", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(selectAccount:)] autorelease];
- UIBarButtonItem *selectAccountButtonItem4 = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Account", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(selectAccount:)] autorelease];
+ UIBarButtonItem *selectAccountButtonItem = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Account", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(selectAccount:)] autorelease];
SalesViewController *salesVC = [[[SalesViewController alloc] initWithAccount:account] autorelease];
- salesVC.navigationItem.leftBarButtonItem = selectAccountButtonItem1;
+ salesVC.navigationItem.leftBarButtonItem = selectAccountButtonItem;
UINavigationController *salesNavController = [[[UINavigationController alloc] initWithRootViewController:salesVC] autorelease];
- ReviewsViewController *reviewsVC = [[[ReviewsViewController alloc] initWithAccount:account] autorelease];
- reviewsVC.navigationItem.leftBarButtonItem = selectAccountButtonItem2;
- UINavigationController *reviewsNavController = [[[UINavigationController alloc] initWithRootViewController:reviewsVC] autorelease];
-
- PaymentsViewController *paymentsVC = [[[PaymentsViewController alloc] initWithAccount:account] autorelease];
- paymentsVC.navigationItem.leftBarButtonItem = selectAccountButtonItem3;
- UINavigationController *paymentsNavController = [[[UINavigationController alloc] initWithRootViewController:paymentsVC] autorelease];
-
- PromoCodesViewController *promoVC = [[[PromoCodesViewController alloc] initWithAccount:account] autorelease];
- promoVC.navigationItem.leftBarButtonItem = selectAccountButtonItem4;
- UINavigationController *promoNavController = [[[UINavigationController alloc] initWithRootViewController:promoVC] autorelease];
- promoNavController.toolbarHidden = NO;
- promoNavController.toolbar.barStyle = UIBarStyleBlackOpaque;
-
- UITabBarController *tabController = [[[UITabBarController alloc] initWithNibName:nil bundle:nil] autorelease];
- [tabController setViewControllers:[NSArray arrayWithObjects:salesNavController, reviewsNavController, paymentsNavController, promoNavController, nil]];
-
- self.window.rootViewController = tabController;
+ self.window.rootViewController = salesNavController;
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
@@ -284,14 +256,6 @@ - (void)applicationWillTerminate:(UIApplication *)application
[self saveContext];
}
-- (void)promoCodeLicenseAgreementLoaded:(NSNotification *)notification
-{
- NSString *licenseAgreement = [[notification userInfo] objectForKey:@"licenseAgreement"];
- PromoCodesLicenseViewController *vc = [[[PromoCodesLicenseViewController alloc] initWithLicenseAgreement:licenseAgreement operation:[notification object]] autorelease];
- UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:vc] autorelease];
- [self.window.rootViewController presentModalViewController:navController animated:YES];
-}
-
#pragma mark - Core Data
- (void)saveContext
@@ -388,17 +352,6 @@ - (void)reportDownloadFailed:(NSNotification *)notification
otherButtonTitles:nil] autorelease] show];
}
-- (void)promoCodeDownloadFailed:(NSNotification *)notification
-{
- NSString *errorDescription = [[notification userInfo] objectForKey:kASPromoCodeDownloadFailedErrorDescription];
- NSString *alertMessage = [NSString stringWithFormat:@"An error occured while downloading the promo codes (%@).", errorDescription];
- [[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil)
- message:alertMessage
- delegate:nil
- cancelButtonTitle:NSLocalizedString(@"OK", nil)
- otherButtonTitles:nil] autorelease] show];
-}
-
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
@@ -222,30 +222,26 @@ - (void)showOrHideStatusBar
- (void)reloadData
{
- NSString* productSortByValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"ProductSortby"];
-
- NSArray *allProducts;
- if ([productSortByValue isEqualToString:@"color"]) {
- // Sort products by color
- allProducts = [[self.account.products allObjects] sortedArrayUsingComparator:^(id obj1, id obj2){
- Product* product1 = (Product*)obj1;
- Product* product2 = (Product*)obj2;
- if ([product1.color luminance] < [product2.color luminance]) {
- return (NSComparisonResult)NSOrderedAscending;
- } else if ([product1.color luminance]> [product2.color luminance]) {
- return (NSComparisonResult)NSOrderedDescending;
- }
-
- return (NSComparisonResult)NSOrderedSame;
- }];
- } else {
- // Sort products by ID (this will put the most recently released apps on top):
- allProducts = [[self.account.products allObjects] sortedArrayUsingDescriptors:[NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"productID" ascending:NO] autorelease]]];
- }
-
+ NSString* productSortByValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"ProductSortby"];
+ NSArray *allProducts;
+ if ([productSortByValue isEqualToString:@"color"]) {
+ // Sort products by color
+ allProducts = [[self.account.products allObjects] sortedArrayUsingComparator:^(id obj1, id obj2){
+ Product* product1 = (Product*)obj1;
+ Product* product2 = (Product*)obj2;
+ if ([product1.color luminance] < [product2.color luminance]) {
+ return (NSComparisonResult)NSOrderedAscending;
+ } else if ([product1.color luminance]> [product2.color luminance]) {
+ return (NSComparisonResult)NSOrderedDescending;
+ }
+ return (NSComparisonResult)NSOrderedSame;
+ }];
+ } else {
+ // Sort products by ID (this will put the most recently released apps on top):
+ allProducts = [[self.account.products allObjects] sortedArrayUsingDescriptors:[NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"productID" ascending:NO] autorelease]]];
+ }
self.products = allProducts;
- self.visibleProducts = [allProducts filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^ (id obj, NSDictionary *bindings) { return (BOOL)![[(Product *)obj hidden] boolValue]; }]];
-
+ self.visibleProducts = [allProducts filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^ (id obj, NSDictionary *bindings) { return (BOOL)![[(Product *)obj hidden] boolValue]; }]];
[self reloadTableView];
}
@@ -1,37 +0,0 @@
-//
-// DownloadStepOperation.h
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@class DownloadStepOperation;
-
-typedef void(^DownloadStepStartBlock)(DownloadStepOperation *operation);
-
-@interface DownloadStepOperation : NSOperation {
-
- DownloadStepOperation *inputOperation;
- DownloadStepStartBlock startBlock;
- BOOL paused;
-
- BOOL executing;
- BOOL finished;
-
- NSURLConnection *connection;
- NSMutableData *data;
-}
-
-@property (nonatomic, retain) DownloadStepOperation *inputOperation;
-@property (nonatomic, retain) NSURLRequest *request;
-@property (nonatomic, copy) DownloadStepStartBlock startBlock;
-@property (nonatomic, retain) NSURLConnection *connection;
-@property (nonatomic, retain) NSMutableData *data;
-@property (nonatomic, assign) BOOL paused;
-
-+ (id)operationWithInput:(DownloadStepOperation *)otherOperation;
-
-@end
Oops, something went wrong.

8 comments on commit 73ba06d

Contributor

markrickert replied Dec 17, 2012

What was the reasoning behind removing all this? Did it no longer work?

Contributor

markrickert replied Dec 17, 2012

Ahh... I just saw the detail message of the commit. Makes sense... lots of technical debt for unreliable features.

mfr replied Dec 19, 2012

Promo code, payments download, yeee I agree, but reviews? Not sure about the rest of users, but I'm using it daily.

I really need the review feature. It was so useful!

Contributor

markrickert replied Dec 19, 2012

The review feature was by far the best in the entire app :(

How could we get the previous version?
Without these features there is no reason to use App Sales instead of iTunes Connect App by Apple.

Contributor

markrickert replied Feb 20, 2013

Please sign in to comment.