Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed review, promo code and payments download

These features have often not worked reliably and I rarely use them.
  • Loading branch information...
commit 73ba06d240193250cf7c4db4424fbabd9db59ed6 1 parent 9f3af38
Ole Zorn authored
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
View
241 AppSales.xcodeproj/project.pbxproj
@@ -16,10 +16,6 @@
6D81576714CB44BE005E8F3F /* passcode_square_filled.png in Resources */ = {isa = PBXBuildFile; fileRef = 6D81576314CB44BE005E8F3F /* passcode_square_filled.png */; };
6D81576814CB44BE005E8F3F /* passcode_square_filled@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6D81576414CB44BE005E8F3F /* passcode_square_filled@2x.png */; };
7F06B6BF13BF73C8004DB170 /* Report.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F06B6BE13BF73C8004DB170 /* Report.m */; };
- 7F0B8A6913F77F95006E9151 /* PromoCodeOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F0B8A6813F77F95006E9151 /* PromoCodeOperation.m */; };
- 7F0B8A6E13F7B941006E9151 /* PromoCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F0B8A6D13F7B941006E9151 /* PromoCode.m */; };
- 7F0B8A7013F7C0EC006E9151 /* RequestPromoCode.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F0B8A6F13F7C0EC006E9151 /* RequestPromoCode.png */; };
- 7F0B8A7313F7E647006E9151 /* PromoCodesLicenseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F0B8A7213F7E647006E9151 /* PromoCodesLicenseViewController.m */; };
7F0BF5D413D3154F0063A6B0 /* TopBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F0BF5D313D3154F0063A6B0 /* TopBackground.png */; };
7F0BF5D713D328380063A6B0 /* CellBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F0BF5D613D328380063A6B0 /* CellBackground.png */; };
7F0BF5DA13D3317D0063A6B0 /* ShadowTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F0BF5D813D3317D0063A6B0 /* ShadowTop.png */; };
@@ -29,17 +25,12 @@
7F1499CA13BE15F500D89064 /* NSData+Compression.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F1499C913BE15F500D89064 /* NSData+Compression.m */; };
7F1499D013BE311600D89064 /* ReportDownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F1499CF13BE311600D89064 /* ReportDownloadOperation.m */; };
7F1499E113BE544F00D89064 /* ReportDownloadCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F1499E013BE544F00D89064 /* ReportDownloadCoordinator.m */; };
- 7F15453014223FFA00D74A18 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F15452F14223FFA00D74A18 /* Default-Portrait~ipad.png */; };
7F1B14F313C51ACA00243AA3 /* CurrencyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F1B14F213C51AC900243AA3 /* CurrencyManager.m */; };
7F1B153713C8029700243AA3 /* ReportImportOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F1B153613C8029600243AA3 /* ReportImportOperation.m */; };
7F24E70713E40A0D0056EA97 /* DashboardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F24E70613E40A0D0056EA97 /* DashboardViewController.m */; };
- 7F24E70A13E4187A0056EA97 /* ReviewsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F24E70913E4187A0056EA97 /* ReviewsViewController.m */; };
7F26689714055D2200FD2CC5 /* AccountsViewController+VendorID.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F26689614055D2200FD2CC5 /* AccountsViewController+VendorID.m */; };
- 7F26DF9113E13319001D0F33 /* ReviewDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F26DF9013E13319001D0F33 /* ReviewDetailViewController.m */; };
- 7F26DF9413E1358B001D0F33 /* ReviewTemplate.html in Resources */ = {isa = PBXBuildFile; fileRef = 7F26DF9313E1358B001D0F33 /* ReviewTemplate.html */; };
7F2946EE13D880260023F530 /* ReportDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F2946ED13D880260023F530 /* ReportDetailViewController.m */; };
7F2946F113D8806F0023F530 /* MapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F2946F013D8806E0023F530 /* MapView.m */; };
- 7F2E75D214237F2500793375 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F2E75D114237F2500793375 /* Default-Landscape~ipad.png */; };
7F3796CC13F8245800FA6E49 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F3796C913F8244000FA6E49 /* MessageUI.framework */; };
7F3796CD13F8246200FA6E49 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F1499CC13BE172300D89064 /* libz.dylib */; };
7F398EBD13DE1F2D004BEC44 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F398EBC13DE1F2D004BEC44 /* MBProgressHUD.m */; };
@@ -52,7 +43,6 @@
7F398ED513DF570E004BEC44 /* ReportDetailEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F398ED413DF570D004BEC44 /* ReportDetailEntry.m */; };
7F4065CA13DD379B006148AA /* ReportDetailEntryCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F4065C913DD379B006148AA /* ReportDetailEntryCell.m */; };
7F454F8313D4AC9A00AE47D1 /* LatestValueButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F454F8213D4AC9A00AE47D1 /* LatestValueButton.png */; };
- 7F454F8813D4B4CF00AE47D1 /* Reviews@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F454F8513D4B4CF00AE47D1 /* Reviews@2x.png */; };
7F454F8A13D4B4CF00AE47D1 /* Sales@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F454F8713D4B4CF00AE47D1 /* Sales@2x.png */; };
7F454F8E13D4BE0600AE47D1 /* LatestValueButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F454F8D13D4BE0600AE47D1 /* LatestValueButton@2x.png */; };
7F454F9113D5A56A00AE47D1 /* DashboardAppCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F454F9013D5A56A00AE47D1 /* DashboardAppCell.m */; };
@@ -75,22 +65,13 @@
7F709D6E13BCC4270008DBAD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F709D6D13BCC4270008DBAD /* Security.framework */; };
7F709D8C13BD03D40008DBAD /* SalesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F709D8B13BD03D30008DBAD /* SalesViewController.m */; };
7F709D8F13BD064E0008DBAD /* ASAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F709D8E13BD064D0008DBAD /* ASAccount.m */; };
- 7F7F1D0C13F6442C00F18143 /* PromoCodesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7F1D0B13F6442C00F18143 /* PromoCodesViewController.m */; };
- 7F7F1D0F13F6455A00F18143 /* PromoCodesAppViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7F1D0E13F6455900F18143 /* PromoCodesAppViewController.m */; };
- 7F7F4A3F13E50A52006C6651 /* PaymentsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7F4A3E13E50A52006C6651 /* PaymentsViewController.m */; };
- 7F7F4A4213E51A99006C6651 /* YearView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F7F4A4113E51A99006C6651 /* YearView.m */; };
- 7F89BCDE13DFA45F001C607F /* ReviewDownloadManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F89BCDD13DFA45F001C607F /* ReviewDownloadManager.m */; };
- 7F89BCE313DFB4F1001C607F /* stores.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7F89BCE213DFB4F1001C607F /* stores.plist */; };
- 7F89BCE613DFC193001C607F /* Review.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F89BCE513DFC193001C607F /* Review.m */; };
- 7F89BCE913DFD925001C607F /* ReviewSummaryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F89BCE813DFD925001C607F /* ReviewSummaryView.m */; };
- 7F89BCEF13E0143D001C607F /* AllReviewsButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F89BCEE13E0143D001C607F /* AllReviewsButton.png */; };
- 7F89BCF113E0171D001C607F /* AllReviewsButtonHighlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F89BCF013E0171D001C607F /* AllReviewsButtonHighlighted.png */; };
+ 7F82B197167DB1DC00C0D9E9 /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F82B193167DB1D700C0D9E9 /* Default-Portrait.png */; };
+ 7F82B198167DB1DC00C0D9E9 /* Default-Landscape@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F82B194167DB1D800C0D9E9 /* Default-Landscape@2x.png */; };
+ 7F82B199167DB1DC00C0D9E9 /* Default-Portrait@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F82B195167DB1DA00C0D9E9 /* Default-Portrait@2x.png */; };
+ 7F82B19A167DB1DC00C0D9E9 /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F82B196167DB1DB00C0D9E9 /* Default-Landscape.png */; };
7F958AC713D46DD000FDFF75 /* DateButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F958AC613D46DD000FDFF75 /* DateButton@2x.png */; };
7F963B4213E98B8600CA62FD /* AccountStatusView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F963B4113E98B8600CA62FD /* AccountStatusView.m */; };
7F97CFD5160CF9CF00313B1D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F97CFD4160CF9CF00313B1D /* Default-568h@2x.png */; };
- 7FA2C58413E0370B00BA9875 /* ReviewListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FA2C58313E0370B00BA9875 /* ReviewListViewController.m */; };
- 7FA3EA9913F76E3500C80C07 /* DownloadStepOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FA3EA9813F76E3500C80C07 /* DownloadStepOperation.m */; };
- 7FA3EA9D13F77DF000C80C07 /* MultiOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FA3EA9C13F77DF000C80C07 /* MultiOperation.m */; };
7FAB532613DCC1270027274F /* Back@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FAB532413DCC1260027274F /* Back@2x.png */; };
7FAB532713DCC1270027274F /* Forward@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FAB532513DCC1270027274F /* Forward@2x.png */; };
7FAB532C13DCFA7E0027274F /* AppIconView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FAB532B13DCFA7D0027274F /* AppIconView.m */; };
@@ -102,8 +83,6 @@
7FAEB66A13E6D1AF00750788 /* Badge.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FAEB66813E6D1AF00750788 /* Badge.png */; };
7FAEB66B13E6D1AF00750788 /* Badge@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FAEB66913E6D1AF00750788 /* Badge@2x.png */; };
7FAEB67113E6D3AC00750788 /* UIImage+Tinting.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FAEB67013E6D3AB00750788 /* UIImage+Tinting.m */; };
- 7FAEB67413E6DD2100750788 /* Payments.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FAEB67213E6DD2100750788 /* Payments.png */; };
- 7FAEB67513E6DD2100750788 /* Payments@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FAEB67313E6DD2100750788 /* Payments@2x.png */; };
7FAEB67813E6DD4C00750788 /* Account.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FAEB67613E6DD4C00750788 /* Account.png */; };
7FAEB67913E6DD4C00750788 /* Account@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FAEB67713E6DD4C00750788 /* Account@2x.png */; };
7FAEB68F13E75B0000750788 /* About.html in Resources */ = {isa = PBXBuildFile; fileRef = 7FAEB68E13E75AFF00750788 /* About.html */; };
@@ -112,7 +91,6 @@
7FD2C1E513CDCB3D002868C7 /* DailyReport.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FD2C1E413CDCB3D002868C7 /* DailyReport.m */; };
7FD2C1EB13CE486A002868C7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FD2C1EA13CE486A002868C7 /* QuartzCore.framework */; };
7FD4ECDC13DAFF120054FE6D /* AppleFiscalCalendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FD4ECDB13DAFF120054FE6D /* AppleFiscalCalendar.m */; };
- 7FD9D36113F67CB500D76D02 /* PromoCodes.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FD9D36013F67CB300D76D02 /* PromoCodes.png */; };
7FDCCE7D1594316600124140 /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 7FDCCE751594316600124140 /* ioapi.c */; };
7FDCCE7F1594316600124140 /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 7FDCCE791594316600124140 /* unzip.c */; };
7FDCCE801594316600124140 /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 7FDCCE7B1594316600124140 /* zip.c */; };
@@ -640,12 +618,6 @@
7FDF728013DAEBFE00B8CC4E /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FDF727E13DAEBFE00B8CC4E /* Default.png */; };
7FDF728113DAEBFE00B8CC4E /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FDF727F13DAEBFE00B8CC4E /* Default@2x.png */; };
7FDF728513DAED8E00B8CC4E /* InApp@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FDF728413DAED8D00B8CC4E /* InApp@2x.png */; };
- 7FE5E0B313E13EF800F7FDA3 /* AllReviewsButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0B113E13EF800F7FDA3 /* AllReviewsButton@2x.png */; };
- 7FE5E0B413E13EF800F7FDA3 /* AllReviewsButtonHighlighted@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0B213E13EF800F7FDA3 /* AllReviewsButtonHighlighted@2x.png */; };
- 7FE5E0C813E157E800F7FDA3 /* Check.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0C613E157E800F7FDA3 /* Check.png */; };
- 7FE5E0C913E157E800F7FDA3 /* Check@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0C713E157E800F7FDA3 /* Check@2x.png */; };
- 7FE5E0CC13E15DD700F7FDA3 /* ReviewBarButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0CB13E15DD700F7FDA3 /* ReviewBarButton.png */; };
- 7FE5E0CE13E15E4E00F7FDA3 /* ReviewBarButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0CD13E15E4E00F7FDA3 /* ReviewBarButton@2x.png */; };
7FE5E0D113E19A7200F7FDA3 /* AllApps.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0CF13E19A7100F7FDA3 /* AllApps.png */; };
7FE5E0D213E19A7200F7FDA3 /* AllApps@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0D013E19A7200F7FDA3 /* AllApps@2x.png */; };
7FE5E0D513E19B3900F7FDA3 /* GenericApp@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FE5E0D313E19B3900F7FDA3 /* GenericApp@2x.png */; };
@@ -653,13 +625,8 @@
7FED633213DB2D6F00DF33B1 /* Icon57.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FED632F13DB2D6F00DF33B1 /* Icon57.png */; };
7FED633313DB2D6F00DF33B1 /* Icon72.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FED633013DB2D6F00DF33B1 /* Icon72.png */; };
7FED633413DB2D6F00DF33B1 /* Icon114.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FED633113DB2D6F00DF33B1 /* Icon114.png */; };
- 7FF88AD413E428720016AA17 /* Star.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FF88AD013E428720016AA17 /* Star.png */; };
- 7FF88AD513E428720016AA17 /* Star@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FF88AD113E428720016AA17 /* Star@2x.png */; };
- 7FF88AD613E428720016AA17 /* Star_Highlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FF88AD213E428720016AA17 /* Star_Highlighted.png */; };
- 7FF88AD713E428720016AA17 /* Star_Highlighted@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FF88AD313E428720016AA17 /* Star_Highlighted@2x.png */; };
7FFE4BB113BD497A00D9D078 /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FFE4BB013BD497A00D9D078 /* RegexKitLite.m */; };
7FFE4BB513BD4B9700D9D078 /* NSDictionary+HTTP.m in Sources */ = {isa = PBXBuildFile; fileRef = 7FFE4BB413BD4B9700D9D078 /* NSDictionary+HTTP.m */; };
- 7FFFB39813D4573700AD18E3 /* Reviews.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FFFB39513D4573700AD18E3 /* Reviews.png */; };
7FFFB39A13D4573700AD18E3 /* Sales.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FFFB39713D4573700AD18E3 /* Sales.png */; };
7FFFB39D13D4599300AD18E3 /* DateButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 7FFFB39C13D4599300AD18E3 /* DateButton.png */; };
/* End PBXBuildFile section */
@@ -679,14 +646,7 @@
6D81576414CB44BE005E8F3F /* passcode_square_filled@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "passcode_square_filled@2x.png"; sourceTree = "<group>"; };
7F06B6BD13BF73C8004DB170 /* Report.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Report.h; sourceTree = "<group>"; };
7F06B6BE13BF73C8004DB170 /* Report.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Report.m; sourceTree = "<group>"; };
- 7F0B8A6713F77F95006E9151 /* PromoCodeOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PromoCodeOperation.h; sourceTree = "<group>"; };
- 7F0B8A6813F77F95006E9151 /* PromoCodeOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PromoCodeOperation.m; sourceTree = "<group>"; };
7F0B8A6B13F7B776006E9151 /* AppSales 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "AppSales 2.xcdatamodel"; sourceTree = "<group>"; };
- 7F0B8A6C13F7B941006E9151 /* PromoCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PromoCode.h; sourceTree = "<group>"; };
- 7F0B8A6D13F7B941006E9151 /* PromoCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PromoCode.m; sourceTree = "<group>"; };
- 7F0B8A6F13F7C0EC006E9151 /* RequestPromoCode.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = RequestPromoCode.png; sourceTree = "<group>"; };
- 7F0B8A7113F7E647006E9151 /* PromoCodesLicenseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PromoCodesLicenseViewController.h; sourceTree = "<group>"; };
- 7F0B8A7213F7E647006E9151 /* PromoCodesLicenseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PromoCodesLicenseViewController.m; sourceTree = "<group>"; };
7F0BF5D313D3154F0063A6B0 /* TopBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = TopBackground.png; sourceTree = "<group>"; };
7F0BF5D613D328380063A6B0 /* CellBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CellBackground.png; sourceTree = "<group>"; };
7F0BF5D813D3317D0063A6B0 /* ShadowTop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ShadowTop.png; sourceTree = "<group>"; };
@@ -701,26 +661,19 @@
7F1499CF13BE311600D89064 /* ReportDownloadOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportDownloadOperation.m; sourceTree = "<group>"; };
7F1499DF13BE544F00D89064 /* ReportDownloadCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportDownloadCoordinator.h; sourceTree = "<group>"; };
7F1499E013BE544F00D89064 /* ReportDownloadCoordinator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportDownloadCoordinator.m; sourceTree = "<group>"; };
- 7F15452F14223FFA00D74A18 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait~ipad.png"; sourceTree = "<group>"; };
7F1B14F113C51AC900243AA3 /* CurrencyManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurrencyManager.h; sourceTree = "<group>"; };
7F1B14F213C51AC900243AA3 /* CurrencyManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CurrencyManager.m; sourceTree = "<group>"; };
7F1B153513C8029600243AA3 /* ReportImportOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportImportOperation.h; sourceTree = "<group>"; };
7F1B153613C8029600243AA3 /* ReportImportOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportImportOperation.m; sourceTree = "<group>"; };
7F24E70513E40A0D0056EA97 /* DashboardViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DashboardViewController.h; sourceTree = "<group>"; };
7F24E70613E40A0D0056EA97 /* DashboardViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DashboardViewController.m; sourceTree = "<group>"; };
- 7F24E70813E4187A0056EA97 /* ReviewsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReviewsViewController.h; sourceTree = "<group>"; };
- 7F24E70913E4187A0056EA97 /* ReviewsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReviewsViewController.m; sourceTree = "<group>"; };
7F2668931405211E00FD2CC5 /* AppSales 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "AppSales 3.xcdatamodel"; sourceTree = "<group>"; };
7F26689514055D2200FD2CC5 /* AccountsViewController+VendorID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AccountsViewController+VendorID.h"; sourceTree = "<group>"; };
7F26689614055D2200FD2CC5 /* AccountsViewController+VendorID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AccountsViewController+VendorID.m"; sourceTree = "<group>"; };
- 7F26DF8F13E13319001D0F33 /* ReviewDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReviewDetailViewController.h; sourceTree = "<group>"; };
- 7F26DF9013E13319001D0F33 /* ReviewDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReviewDetailViewController.m; sourceTree = "<group>"; };
- 7F26DF9313E1358B001D0F33 /* ReviewTemplate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ReviewTemplate.html; sourceTree = "<group>"; };
7F2946EC13D880260023F530 /* ReportDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportDetailViewController.h; sourceTree = "<group>"; };
7F2946ED13D880260023F530 /* ReportDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportDetailViewController.m; sourceTree = "<group>"; };
7F2946EF13D8806E0023F530 /* MapView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapView.h; sourceTree = "<group>"; };
7F2946F013D8806E0023F530 /* MapView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapView.m; sourceTree = "<group>"; };
- 7F2E75D114237F2500793375 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = "<group>"; };
7F3796C913F8244000FA6E49 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
7F398EBB13DE1F2D004BEC44 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = "<group>"; };
7F398EBC13DE1F2D004BEC44 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = "<group>"; };
@@ -736,7 +689,6 @@
7F4065C813DD379B006148AA /* ReportDetailEntryCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportDetailEntryCell.h; sourceTree = "<group>"; };
7F4065C913DD379B006148AA /* ReportDetailEntryCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportDetailEntryCell.m; sourceTree = "<group>"; };
7F454F8213D4AC9A00AE47D1 /* LatestValueButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = LatestValueButton.png; sourceTree = "<group>"; };
- 7F454F8513D4B4CF00AE47D1 /* Reviews@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Reviews@2x.png"; sourceTree = "<group>"; };
7F454F8713D4B4CF00AE47D1 /* Sales@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Sales@2x.png"; sourceTree = "<group>"; };
7F454F8D13D4BE0600AE47D1 /* LatestValueButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LatestValueButton@2x.png"; sourceTree = "<group>"; };
7F454F8F13D5A56900AE47D1 /* DashboardAppCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DashboardAppCell.h; sourceTree = "<group>"; };
@@ -775,33 +727,14 @@
7F709D8B13BD03D30008DBAD /* SalesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SalesViewController.m; sourceTree = "<group>"; };
7F709D8D13BD064D0008DBAD /* ASAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASAccount.h; sourceTree = "<group>"; };
7F709D8E13BD064D0008DBAD /* ASAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASAccount.m; sourceTree = "<group>"; };
- 7F7F1D0A13F6442C00F18143 /* PromoCodesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PromoCodesViewController.h; sourceTree = "<group>"; };
- 7F7F1D0B13F6442C00F18143 /* PromoCodesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PromoCodesViewController.m; sourceTree = "<group>"; };
- 7F7F1D0D13F6455900F18143 /* PromoCodesAppViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PromoCodesAppViewController.h; sourceTree = "<group>"; };
- 7F7F1D0E13F6455900F18143 /* PromoCodesAppViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PromoCodesAppViewController.m; sourceTree = "<group>"; };
- 7F7F4A3D13E50A52006C6651 /* PaymentsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentsViewController.h; sourceTree = "<group>"; };
- 7F7F4A3E13E50A52006C6651 /* PaymentsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PaymentsViewController.m; sourceTree = "<group>"; };
- 7F7F4A4013E51A99006C6651 /* YearView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YearView.h; sourceTree = "<group>"; };
- 7F7F4A4113E51A99006C6651 /* YearView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YearView.m; sourceTree = "<group>"; };
- 7F89BCDC13DFA45F001C607F /* ReviewDownloadManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReviewDownloadManager.h; path = Classes/ReviewDownloadManager.h; sourceTree = "<group>"; };
- 7F89BCDD13DFA45F001C607F /* ReviewDownloadManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ReviewDownloadManager.m; path = Classes/ReviewDownloadManager.m; sourceTree = "<group>"; };
- 7F89BCE213DFB4F1001C607F /* stores.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = stores.plist; sourceTree = "<group>"; };
- 7F89BCE413DFC193001C607F /* Review.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Review.h; sourceTree = "<group>"; };
- 7F89BCE513DFC193001C607F /* Review.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Review.m; sourceTree = "<group>"; };
- 7F89BCE713DFD925001C607F /* ReviewSummaryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReviewSummaryView.h; sourceTree = "<group>"; };
- 7F89BCE813DFD925001C607F /* ReviewSummaryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReviewSummaryView.m; sourceTree = "<group>"; };
- 7F89BCEE13E0143D001C607F /* AllReviewsButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AllReviewsButton.png; sourceTree = "<group>"; };
- 7F89BCF013E0171D001C607F /* AllReviewsButtonHighlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AllReviewsButtonHighlighted.png; sourceTree = "<group>"; };
+ 7F82B193167DB1D700C0D9E9 /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait.png"; sourceTree = "<group>"; };
+ 7F82B194167DB1D800C0D9E9 /* Default-Landscape@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x.png"; sourceTree = "<group>"; };
+ 7F82B195167DB1DA00C0D9E9 /* Default-Portrait@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x.png"; sourceTree = "<group>"; };
+ 7F82B196167DB1DB00C0D9E9 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape.png"; sourceTree = "<group>"; };
7F958AC613D46DD000FDFF75 /* DateButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "DateButton@2x.png"; sourceTree = "<group>"; };
7F963B4013E98B8600CA62FD /* AccountStatusView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccountStatusView.h; sourceTree = "<group>"; };
7F963B4113E98B8600CA62FD /* AccountStatusView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccountStatusView.m; sourceTree = "<group>"; };
7F97CFD4160CF9CF00313B1D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
- 7FA2C58213E0370B00BA9875 /* ReviewListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReviewListViewController.h; sourceTree = "<group>"; };
- 7FA2C58313E0370B00BA9875 /* ReviewListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReviewListViewController.m; sourceTree = "<group>"; };
- 7FA3EA9713F76E3500C80C07 /* DownloadStepOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadStepOperation.h; sourceTree = "<group>"; };
- 7FA3EA9813F76E3500C80C07 /* DownloadStepOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DownloadStepOperation.m; sourceTree = "<group>"; };
- 7FA3EA9B13F77DF000C80C07 /* MultiOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultiOperation.h; sourceTree = "<group>"; };
- 7FA3EA9C13F77DF000C80C07 /* MultiOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MultiOperation.m; sourceTree = "<group>"; };
7FAB532413DCC1260027274F /* Back@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Back@2x.png"; sourceTree = "<group>"; };
7FAB532513DCC1270027274F /* Forward@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Forward@2x.png"; sourceTree = "<group>"; };
7FAB532A13DCFA7D0027274F /* AppIconView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppIconView.h; sourceTree = "<group>"; };
@@ -816,8 +749,6 @@
7FAEB66913E6D1AF00750788 /* Badge@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Badge@2x.png"; sourceTree = "<group>"; };
7FAEB66F13E6D3AB00750788 /* UIImage+Tinting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Tinting.h"; sourceTree = "<group>"; };
7FAEB67013E6D3AB00750788 /* UIImage+Tinting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Tinting.m"; sourceTree = "<group>"; };
- 7FAEB67213E6DD2100750788 /* Payments.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Payments.png; sourceTree = "<group>"; };
- 7FAEB67313E6DD2100750788 /* Payments@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Payments@2x.png"; sourceTree = "<group>"; };
7FAEB67613E6DD4C00750788 /* Account.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Account.png; sourceTree = "<group>"; };
7FAEB67713E6DD4C00750788 /* Account@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Account@2x.png"; sourceTree = "<group>"; };
7FAEB68E13E75AFF00750788 /* About.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = About.html; sourceTree = "<group>"; };
@@ -830,7 +761,6 @@
7FD2C1EA13CE486A002868C7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
7FD4ECDA13DAFF120054FE6D /* AppleFiscalCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleFiscalCalendar.h; sourceTree = "<group>"; };
7FD4ECDB13DAFF120054FE6D /* AppleFiscalCalendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppleFiscalCalendar.m; sourceTree = "<group>"; };
- 7FD9D36013F67CB300D76D02 /* PromoCodes.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = PromoCodes.png; sourceTree = "<group>"; };
7FDCCE741594316600124140 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = "<group>"; };
7FDCCE751594316600124140 /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = "<group>"; };
7FDCCE761594316600124140 /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = "<group>"; };
@@ -1380,12 +1310,6 @@
7FDF727E13DAEBFE00B8CC4E /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
7FDF727F13DAEBFE00B8CC4E /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
7FDF728413DAED8D00B8CC4E /* InApp@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "InApp@2x.png"; sourceTree = "<group>"; };
- 7FE5E0B113E13EF800F7FDA3 /* AllReviewsButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "AllReviewsButton@2x.png"; sourceTree = "<group>"; };
- 7FE5E0B213E13EF800F7FDA3 /* AllReviewsButtonHighlighted@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "AllReviewsButtonHighlighted@2x.png"; sourceTree = "<group>"; };
- 7FE5E0C613E157E800F7FDA3 /* Check.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Check.png; sourceTree = "<group>"; };
- 7FE5E0C713E157E800F7FDA3 /* Check@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Check@2x.png"; sourceTree = "<group>"; };
- 7FE5E0CB13E15DD700F7FDA3 /* ReviewBarButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ReviewBarButton.png; sourceTree = "<group>"; };
- 7FE5E0CD13E15E4E00F7FDA3 /* ReviewBarButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ReviewBarButton@2x.png"; sourceTree = "<group>"; };
7FE5E0CF13E19A7100F7FDA3 /* AllApps.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AllApps.png; sourceTree = "<group>"; };
7FE5E0D013E19A7200F7FDA3 /* AllApps@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "AllApps@2x.png"; sourceTree = "<group>"; };
7FE5E0D313E19B3900F7FDA3 /* GenericApp@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "GenericApp@2x.png"; sourceTree = "<group>"; };
@@ -1394,15 +1318,10 @@
7FED633013DB2D6F00DF33B1 /* Icon72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon72.png; path = ../Images/Icon72.png; sourceTree = "<group>"; };
7FED633113DB2D6F00DF33B1 /* Icon114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon114.png; path = ../Images/Icon114.png; sourceTree = "<group>"; };
7FED633913DB69EA00DF33B1 /* GlobalSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalSettings.h; sourceTree = "<group>"; };
- 7FF88AD013E428720016AA17 /* Star.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Star.png; sourceTree = "<group>"; };
- 7FF88AD113E428720016AA17 /* Star@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Star@2x.png"; sourceTree = "<group>"; };
- 7FF88AD213E428720016AA17 /* Star_Highlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Star_Highlighted.png; sourceTree = "<group>"; };
- 7FF88AD313E428720016AA17 /* Star_Highlighted@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Star_Highlighted@2x.png"; sourceTree = "<group>"; };
7FFE4BAF13BD497A00D9D078 /* RegexKitLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegexKitLite.h; sourceTree = "<group>"; };
7FFE4BB013BD497A00D9D078 /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = "<group>"; };
7FFE4BB313BD4B9700D9D078 /* NSDictionary+HTTP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+HTTP.h"; sourceTree = "<group>"; };
7FFE4BB413BD4B9700D9D078 /* NSDictionary+HTTP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+HTTP.m"; sourceTree = "<group>"; };
- 7FFFB39513D4573700AD18E3 /* Reviews.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Reviews.png; sourceTree = "<group>"; };
7FFFB39713D4573700AD18E3 /* Sales.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Sales.png; sourceTree = "<group>"; };
7FFFB39C13D4599300AD18E3 /* DateButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DateButton.png; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -1457,13 +1376,10 @@
7F709D3D13BC98860008DBAD /* AppSalesAppDelegate.m */,
7FDF601C13DD2107005F1E2D /* Helpers */,
7FDF601F13DD21BB005F1E2D /* Accounts and Settings */,
- 7F7F1D0913F643F300F18143 /* Promo Codes */,
7FDF601D13DD2125005F1E2D /* Dashboard */,
7FDF602013DD21D5005F1E2D /* Common UI */,
- 7F7F1D0413F63F7F00F18143 /* Promo Code Download */,
7F88897A14CD4C9A007604D7 /* Passcode Lock */,
7F1499D113BE312100D89064 /* Report Download */,
- 7F89BCDA13DFA43E001C607F /* Review Download */,
7F709D9013BD06570008DBAD /* Model */,
);
path = Classes;
@@ -1495,21 +1411,6 @@
name = Sales;
sourceTree = "<group>";
};
- 7F24E70D13E41EBD0056EA97 /* Reviews */ = {
- isa = PBXGroup;
- children = (
- 7F24E70813E4187A0056EA97 /* ReviewsViewController.h */,
- 7F24E70913E4187A0056EA97 /* ReviewsViewController.m */,
- 7F89BCE713DFD925001C607F /* ReviewSummaryView.h */,
- 7F89BCE813DFD925001C607F /* ReviewSummaryView.m */,
- 7FA2C58213E0370B00BA9875 /* ReviewListViewController.h */,
- 7FA2C58313E0370B00BA9875 /* ReviewListViewController.m */,
- 7F26DF8F13E13319001D0F33 /* ReviewDetailViewController.h */,
- 7F26DF9013E13319001D0F33 /* ReviewDetailViewController.m */,
- );
- name = Reviews;
- sourceTree = "<group>";
- };
7F709D1C13BC98860008DBAD = {
isa = PBXGroup;
children = (
@@ -1552,11 +1453,9 @@
7F709D6F13BCCB8B0008DBAD /* Images */,
7F709D3513BC98860008DBAD /* AppSales-Info.plist */,
7F709D3F13BC98860008DBAD /* AppSales.xcdatamodeld */,
- 7F89BCE213DFB4F1001C607F /* stores.plist */,
7FAB533313DD0F9A0027274F /* country_names.plist */,
7FDF6E8013D8962500B8CC4E /* countries.plist */,
7FDF6E8213D89B1000B8CC4E /* countries_simple.plist */,
- 7F26DF9313E1358B001D0F33 /* ReviewTemplate.html */,
7FAEB68E13E75AFF00750788 /* About.html */,
);
name = "Supporting Files";
@@ -1566,34 +1465,24 @@
7F709D6F13BCCB8B0008DBAD /* Images */ = {
isa = PBXGroup;
children = (
+ 7F82B193167DB1D700C0D9E9 /* Default-Portrait.png */,
+ 7F82B194167DB1D800C0D9E9 /* Default-Landscape@2x.png */,
+ 7F82B195167DB1DA00C0D9E9 /* Default-Portrait@2x.png */,
+ 7F82B196167DB1DB00C0D9E9 /* Default-Landscape.png */,
+ 7FDF727E13DAEBFE00B8CC4E /* Default.png */,
+ 7FDF727F13DAEBFE00B8CC4E /* Default@2x.png */,
+ 7F97CFD4160CF9CF00313B1D /* Default-568h@2x.png */,
6D81576114CB44BE005E8F3F /* passcode_square_empty.png */,
6D81576214CB44BE005E8F3F /* passcode_square_empty@2x.png */,
6D81576314CB44BE005E8F3F /* passcode_square_filled.png */,
6D81576414CB44BE005E8F3F /* passcode_square_filled@2x.png */,
- 7F15452F14223FFA00D74A18 /* Default-Portrait~ipad.png */,
- 7F2E75D114237F2500793375 /* Default-Landscape~ipad.png */,
7FAEB66813E6D1AF00750788 /* Badge.png */,
7FAEB66913E6D1AF00750788 /* Badge@2x.png */,
- 7FF88AD013E428720016AA17 /* Star.png */,
- 7FF88AD113E428720016AA17 /* Star@2x.png */,
- 7FF88AD213E428720016AA17 /* Star_Highlighted.png */,
- 7FF88AD313E428720016AA17 /* Star_Highlighted@2x.png */,
- 7FE5E0C613E157E800F7FDA3 /* Check.png */,
- 7FE5E0C713E157E800F7FDA3 /* Check@2x.png */,
- 7FE5E0CB13E15DD700F7FDA3 /* ReviewBarButton.png */,
- 7FE5E0CD13E15E4E00F7FDA3 /* ReviewBarButton@2x.png */,
- 7F89BCEE13E0143D001C607F /* AllReviewsButton.png */,
- 7F89BCF013E0171D001C607F /* AllReviewsButtonHighlighted.png */,
- 7FE5E0B113E13EF800F7FDA3 /* AllReviewsButton@2x.png */,
- 7FE5E0B213E13EF800F7FDA3 /* AllReviewsButtonHighlighted@2x.png */,
7F398ECA13DE7F14004BEC44 /* LockIndicator.png */,
7F398EC213DE75B2004BEC44 /* Lock.png */,
7F398ECC13DE835C004BEC44 /* Lock@2x.png */,
7F398EC813DE7E3A004BEC44 /* Unlock.png */,
7F398ECD13DE835C004BEC44 /* Unlock@2x.png */,
- 7FDF727E13DAEBFE00B8CC4E /* Default.png */,
- 7FDF727F13DAEBFE00B8CC4E /* Default@2x.png */,
- 7F97CFD4160CF9CF00313B1D /* Default-568h@2x.png */,
7FDF727613D9C39100B8CC4E /* InApp.png */,
7FDF728413DAED8D00B8CC4E /* InApp@2x.png */,
7FAB532D13DD00470027274F /* Pin.png */,
@@ -1620,16 +1509,10 @@
7F0BF5D613D328380063A6B0 /* CellBackground.png */,
7FFFB39C13D4599300AD18E3 /* DateButton.png */,
7F958AC613D46DD000FDFF75 /* DateButton@2x.png */,
- 7FFFB39513D4573700AD18E3 /* Reviews.png */,
- 7F454F8513D4B4CF00AE47D1 /* Reviews@2x.png */,
7FAEB67613E6DD4C00750788 /* Account.png */,
7FAEB67713E6DD4C00750788 /* Account@2x.png */,
- 7FAEB67213E6DD2100750788 /* Payments.png */,
- 7FAEB67313E6DD2100750788 /* Payments@2x.png */,
7FFFB39713D4573700AD18E3 /* Sales.png */,
7F454F8713D4B4CF00AE47D1 /* Sales@2x.png */,
- 7FD9D36013F67CB300D76D02 /* PromoCodes.png */,
- 7F0B8A6F13F7C0EC006E9151 /* RequestPromoCode.png */,
);
name = Images;
path = ../Images;
@@ -1658,51 +1541,10 @@
7F1B14F213C51AC900243AA3 /* CurrencyManager.m */,
7F398ED013DF21F1004BEC44 /* Transaction.h */,
7F398ED113DF21F2004BEC44 /* Transaction.m */,
- 7F89BCE413DFC193001C607F /* Review.h */,
- 7F89BCE513DFC193001C607F /* Review.m */,
- 7F0B8A6C13F7B941006E9151 /* PromoCode.h */,
- 7F0B8A6D13F7B941006E9151 /* PromoCode.m */,
);
name = Model;
sourceTree = "<group>";
};
- 7F7F1D0413F63F7F00F18143 /* Promo Code Download */ = {
- isa = PBXGroup;
- children = (
- 7F0B8A6713F77F95006E9151 /* PromoCodeOperation.h */,
- 7F0B8A6813F77F95006E9151 /* PromoCodeOperation.m */,
- 7FA3EA9B13F77DF000C80C07 /* MultiOperation.h */,
- 7FA3EA9C13F77DF000C80C07 /* MultiOperation.m */,
- 7FA3EA9713F76E3500C80C07 /* DownloadStepOperation.h */,
- 7FA3EA9813F76E3500C80C07 /* DownloadStepOperation.m */,
- );
- name = "Promo Code Download";
- sourceTree = "<group>";
- };
- 7F7F1D0913F643F300F18143 /* Promo Codes */ = {
- isa = PBXGroup;
- children = (
- 7F7F1D0A13F6442C00F18143 /* PromoCodesViewController.h */,
- 7F7F1D0B13F6442C00F18143 /* PromoCodesViewController.m */,
- 7F7F1D0D13F6455900F18143 /* PromoCodesAppViewController.h */,
- 7F7F1D0E13F6455900F18143 /* PromoCodesAppViewController.m */,
- 7F0B8A7113F7E647006E9151 /* PromoCodesLicenseViewController.h */,
- 7F0B8A7213F7E647006E9151 /* PromoCodesLicenseViewController.m */,
- );
- name = "Promo Codes";
- sourceTree = "<group>";
- };
- 7F7F4A3C13E50A32006C6651 /* Payments */ = {
- isa = PBXGroup;
- children = (
- 7F7F4A3D13E50A52006C6651 /* PaymentsViewController.h */,
- 7F7F4A3E13E50A52006C6651 /* PaymentsViewController.m */,
- 7F7F4A4013E51A99006C6651 /* YearView.h */,
- 7F7F4A4113E51A99006C6651 /* YearView.m */,
- );
- name = Payments;
- sourceTree = "<group>";
- };
7F88897A14CD4C9A007604D7 /* Passcode Lock */ = {
isa = PBXGroup;
children = (
@@ -1718,16 +1560,6 @@
name = "Passcode Lock";
sourceTree = "<group>";
};
- 7F89BCDA13DFA43E001C607F /* Review Download */ = {
- isa = PBXGroup;
- children = (
- 7F89BCDC13DFA45F001C607F /* ReviewDownloadManager.h */,
- 7F89BCDD13DFA45F001C607F /* ReviewDownloadManager.m */,
- );
- name = "Review Download";
- path = ..;
- sourceTree = "<group>";
- };
7F89BCEA13DFE018001C607F /* App Icons */ = {
isa = PBXGroup;
children = (
@@ -1819,8 +1651,6 @@
7F24E70B13E41EA20056EA97 /* Common */,
7F24E70C13E41EB00056EA97 /* Sales */,
7FDF601E13DD2193005F1E2D /* Report Details */,
- 7F24E70D13E41EBD0056EA97 /* Reviews */,
- 7F7F4A3C13E50A32006C6651 /* Payments */,
);
name = Dashboard;
sourceTree = "<group>";
@@ -2430,12 +2260,10 @@
7F0BF5DA13D3317D0063A6B0 /* ShadowTop.png in Resources */,
7F0BF5DB13D3317D0063A6B0 /* ShadowBottom.png in Resources */,
7F0BF5DD13D336460063A6B0 /* CellBackgroundSelected.png in Resources */,
- 7FFFB39813D4573700AD18E3 /* Reviews.png in Resources */,
7FFFB39A13D4573700AD18E3 /* Sales.png in Resources */,
7FFFB39D13D4599300AD18E3 /* DateButton.png in Resources */,
7F958AC713D46DD000FDFF75 /* DateButton@2x.png in Resources */,
7F454F8313D4AC9A00AE47D1 /* LatestValueButton.png in Resources */,
- 7F454F8813D4B4CF00AE47D1 /* Reviews@2x.png in Resources */,
7F454F8A13D4B4CF00AE47D1 /* Sales@2x.png in Resources */,
7F454F8E13D4BE0600AE47D1 /* LatestValueButton@2x.png in Resources */,
7FDF6E8113D8962500B8CC4E /* countries.plist in Resources */,
@@ -2957,40 +2785,24 @@
7F398ECB13DE7F14004BEC44 /* LockIndicator.png in Resources */,
7F398ECE13DE835C004BEC44 /* Lock@2x.png in Resources */,
7F398ECF13DE835C004BEC44 /* Unlock@2x.png in Resources */,
- 7F89BCE313DFB4F1001C607F /* stores.plist in Resources */,
- 7F89BCEF13E0143D001C607F /* AllReviewsButton.png in Resources */,
- 7F89BCF113E0171D001C607F /* AllReviewsButtonHighlighted.png in Resources */,
- 7F26DF9413E1358B001D0F33 /* ReviewTemplate.html in Resources */,
- 7FE5E0B313E13EF800F7FDA3 /* AllReviewsButton@2x.png in Resources */,
- 7FE5E0B413E13EF800F7FDA3 /* AllReviewsButtonHighlighted@2x.png in Resources */,
- 7FE5E0C813E157E800F7FDA3 /* Check.png in Resources */,
- 7FE5E0C913E157E800F7FDA3 /* Check@2x.png in Resources */,
- 7FE5E0CC13E15DD700F7FDA3 /* ReviewBarButton.png in Resources */,
- 7FE5E0CE13E15E4E00F7FDA3 /* ReviewBarButton@2x.png in Resources */,
7FE5E0D113E19A7200F7FDA3 /* AllApps.png in Resources */,
7FE5E0D213E19A7200F7FDA3 /* AllApps@2x.png in Resources */,
7FE5E0D513E19B3900F7FDA3 /* GenericApp@2x.png in Resources */,
7FE5E0D613E19B3900F7FDA3 /* GenericApp.png in Resources */,
- 7FF88AD413E428720016AA17 /* Star.png in Resources */,
- 7FF88AD513E428720016AA17 /* Star@2x.png in Resources */,
- 7FF88AD613E428720016AA17 /* Star_Highlighted.png in Resources */,
- 7FF88AD713E428720016AA17 /* Star_Highlighted@2x.png in Resources */,
7FAEB66A13E6D1AF00750788 /* Badge.png in Resources */,
7FAEB66B13E6D1AF00750788 /* Badge@2x.png in Resources */,
- 7FAEB67413E6DD2100750788 /* Payments.png in Resources */,
- 7FAEB67513E6DD2100750788 /* Payments@2x.png in Resources */,
7FAEB67813E6DD4C00750788 /* Account.png in Resources */,
7FAEB67913E6DD4C00750788 /* Account@2x.png in Resources */,
7FAEB68F13E75B0000750788 /* About.html in Resources */,
- 7FD9D36113F67CB500D76D02 /* PromoCodes.png in Resources */,
- 7F0B8A7013F7C0EC006E9151 /* RequestPromoCode.png in Resources */,
- 7F15453014223FFA00D74A18 /* Default-Portrait~ipad.png in Resources */,
- 7F2E75D214237F2500793375 /* Default-Landscape~ipad.png in Resources */,
6D81576514CB44BE005E8F3F /* passcode_square_empty.png in Resources */,
6D81576614CB44BE005E8F3F /* passcode_square_empty@2x.png in Resources */,
6D81576714CB44BE005E8F3F /* passcode_square_filled.png in Resources */,
6D81576814CB44BE005E8F3F /* passcode_square_filled@2x.png in Resources */,
7F97CFD5160CF9CF00313B1D /* Default-568h@2x.png in Resources */,
+ 7F82B197167DB1DC00C0D9E9 /* Default-Portrait.png in Resources */,
+ 7F82B198167DB1DC00C0D9E9 /* Default-Landscape@2x.png in Resources */,
+ 7F82B199167DB1DC00C0D9E9 /* Default-Portrait@2x.png in Resources */,
+ 7F82B19A167DB1DC00C0D9E9 /* Default-Landscape.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3037,26 +2849,11 @@
7F398EBD13DE1F2D004BEC44 /* MBProgressHUD.m in Sources */,
7F398ED213DF21F2004BEC44 /* Transaction.m in Sources */,
7F398ED513DF570E004BEC44 /* ReportDetailEntry.m in Sources */,
- 7F89BCDE13DFA45F001C607F /* ReviewDownloadManager.m in Sources */,
- 7F89BCE613DFC193001C607F /* Review.m in Sources */,
- 7F89BCE913DFD925001C607F /* ReviewSummaryView.m in Sources */,
- 7FA2C58413E0370B00BA9875 /* ReviewListViewController.m in Sources */,
- 7F26DF9113E13319001D0F33 /* ReviewDetailViewController.m in Sources */,
7F24E70713E40A0D0056EA97 /* DashboardViewController.m in Sources */,
- 7F24E70A13E4187A0056EA97 /* ReviewsViewController.m in Sources */,
- 7F7F4A3F13E50A52006C6651 /* PaymentsViewController.m in Sources */,
- 7F7F4A4213E51A99006C6651 /* YearView.m in Sources */,
7FAEB66613E6D0EE00750788 /* BadgedCell.m in Sources */,
7FAEB67113E6D3AC00750788 /* UIImage+Tinting.m in Sources */,
7FAEB69213E75B7400750788 /* AboutViewController.m in Sources */,
7F963B4213E98B8600CA62FD /* AccountStatusView.m in Sources */,
- 7F7F1D0C13F6442C00F18143 /* PromoCodesViewController.m in Sources */,
- 7F7F1D0F13F6455A00F18143 /* PromoCodesAppViewController.m in Sources */,
- 7FA3EA9913F76E3500C80C07 /* DownloadStepOperation.m in Sources */,
- 7FA3EA9D13F77DF000C80C07 /* MultiOperation.m in Sources */,
- 7F0B8A6913F77F95006E9151 /* PromoCodeOperation.m in Sources */,
- 7F0B8A6E13F7B941006E9151 /* PromoCode.m in Sources */,
- 7F0B8A7313F7E647006E9151 /* PromoCodesLicenseViewController.m in Sources */,
7F26689714055D2200FD2CC5 /* AccountsViewController+VendorID.m in Sources */,
6D81575414CB3C2B005E8F3F /* KKKeychain.m in Sources */,
6D81575514CB3C2B005E8F3F /* KKPasscodeLock.m in Sources */,
View
2  Classes/AccountsViewController+VendorID.m
@@ -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;
View
56 Classes/AccountsViewController.m
@@ -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];
View
53 Classes/AppSalesAppDelegate.m
@@ -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];
View
42 Classes/DashboardViewController.m
@@ -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];
}
View
37 Classes/DownloadStepOperation.h
@@ -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
View
145 Classes/DownloadStepOperation.m
@@ -1,145 +0,0 @@
-//
-// DownloadStepOperation.m
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import "DownloadStepOperation.h"
-
-@interface DownloadStepOperation ()
-- (void)finish;
-@end
-
-@implementation DownloadStepOperation
-
-@synthesize inputOperation, startBlock, request, connection, data, paused;
-
-- (id)init
-{
- self = [super init];
- if (self) {
-
- }
- return self;
-}
-
-- (void)setStartBlock:(DownloadStepStartBlock)block
-{
- startBlock = Block_copy(block);
-}
-
-+ (id)operationWithInput:(DownloadStepOperation *)otherOperation
-{
- DownloadStepOperation *operation = [[[self alloc] init] autorelease];
- operation.inputOperation = otherOperation;
- return operation;
-}
-
-- (BOOL)isConcurrent
-{
- return YES;
-}
-
-- (void)start
-{
- //NSOperationQueue ignores the return value of isConcurrent since Mac OS X 10.6 (iOS 4.0?), so
- //we have to ensure that we run on the main thread ourselves...
- if (![NSThread isMainThread]) {
- [self performSelectorOnMainThread:@selector(start) withObject:nil waitUntilDone:YES];
- return;
- }
-
- [self willChangeValueForKey:@"isExecuting"];
- executing = YES;
- [self didChangeValueForKey:@"isExecuting"];
-
- if ([self isCancelled]) {
- return;
- }
- if ([self.inputOperation isCancelled]) {
- //input operation was cancelled, also cancel all subsequent operations...
- [self cancel];
- return;
- }
-
- if (self.startBlock) {
- self.startBlock(self);
- self.startBlock = nil; //ensures that the startBlock is only executed once (e.g. when pausing and resuming the operation)
- self.inputOperation = nil; //the input operation is only needed by the startBlock, which has been executed by now
- }
-
- if (self.paused) {
- //The startBlock may set this property to delay loading the request, e.g. to wait for user confirmation
- return;
- }
-
- if (self.request) {
- self.data = [NSMutableData data];
- self.connection = [NSURLConnection connectionWithRequest:self.request delegate:self];
- [self.connection start];
- } else {
- //If there is no request, finish immediately
- [self finish];
- }
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
-{
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)chunk
-{
- [self.data appendData:chunk];
-}
-
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
-{
- [self finish];
-}
-
-- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
-{
- [self cancel];
-}
-
-- (void)cancel
-{
- [super cancel];
- [self.connection cancel];
- //iOS 5 will complain if we mark an operation as finished without starting it...
- [self start];
- [self finish];
-}
-
-- (void)finish
-{
- [self willChangeValueForKey:@"isFinished"];
- [self willChangeValueForKey:@"isExecuting"];
- finished = YES;
- executing = NO;
- [self didChangeValueForKey:@"isFinished"];
- [self didChangeValueForKey:@"isExecuting"];
-}
-
-- (BOOL)isExecuting
-{
- return executing;
-}
-
-- (BOOL)isFinished
-{
- return finished;
-}
-
-- (void)dealloc
-{
- Block_release(startBlock);
- [connection release];
- [data release];
- [inputOperation release];
- [super dealloc];
-}
-
-@end
View
24 Classes/MultiOperation.h
@@ -1,24 +0,0 @@
-//
-// MultiOperation.h
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface MultiOperation : NSOperation {
-
- BOOL executing;
- BOOL finished;
-
- NSArray *operations;
- NSOperationQueue *queue;
-}
-
-@property (readonly) NSOperationQueue *queue;
-
-- (id)initWithOperations:(NSArray *)partialOperations;
-
-@end
View
97 Classes/MultiOperation.m
@@ -1,97 +0,0 @@
-//
-// MultiOperation.m
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import "MultiOperation.h"
-
-@interface MultiOperation ()
-- (void)finish;
-@end
-
-@implementation MultiOperation
-
-@synthesize queue;
-
-- (id)initWithOperations:(NSArray *)partialOperations
-{
- self = [super init];
- if (self) {
- queue = [[NSOperationQueue alloc] init];
- queue.maxConcurrentOperationCount = 1;
- operations = [partialOperations retain];
- }
- return self;
-}
-
-- (BOOL)isConcurrent
-{
- return YES;
-}
-
-- (void)start
-{
- if ([self isCancelled]) {
- return;
- }
- for (NSOperation *operation in operations) {
- [queue addOperation:operation];
- }
- [operations release];
- operations = nil;
-
- [queue addObserver:self forKeyPath:@"operationCount" options:NSKeyValueObservingOptionNew context:nil];
-
- [self willChangeValueForKey:@"isExecuting"];
- executing = YES;
- [self didChangeValueForKey:@"isExecuting"];
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
-{
- if ([queue operationCount] == 0) {
- [queue removeObserver:self forKeyPath:@"operationCount"];
- [self finish];
- }
-}
-
-- (void)cancel
-{
- [super cancel];
- [self start];
- [queue cancelAllOperations];
- [self finish];
-}
-
-- (void)finish
-{
- [self willChangeValueForKey:@"isFinished"];
- [self willChangeValueForKey:@"isExecuting"];
- finished = YES;
- executing = NO;
- [self didChangeValueForKey:@"isFinished"];
- [self didChangeValueForKey:@"isExecuting"];
-}
-
-- (BOOL)isExecuting
-{
- return executing;
-}
-
-- (BOOL)isFinished
-{
- return finished;
-}
-
-- (void)dealloc
-{
- [queue release];
- [operations release];
- [super dealloc];
-}
-
-
-@end
View
23 Classes/PromoCode.h
@@ -1,23 +0,0 @@
-//
-// PromoCode.h
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright (c) 2011 omz:software. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <CoreData/CoreData.h>
-
-@class Product;
-
-@interface PromoCode : NSManagedObject {
-
-}
-
-@property (nonatomic, retain) NSString * code;
-@property (nonatomic, retain) NSDate * requestDate;
-@property (nonatomic, retain) NSNumber * used;
-@property (nonatomic, retain) Product *product;
-
-@end
View
20 Classes/PromoCode.m
@@ -1,20 +0,0 @@
-//
-// PromoCode.m
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright (c) 2011 omz:software. All rights reserved.
-//
-
-#import "PromoCode.h"
-#import "Product.h"
-
-
-@implementation PromoCode
-
-@dynamic code;
-@dynamic requestDate;
-@dynamic used;
-@dynamic product;
-
-@end
View
24 Classes/PromoCodeOperation.h
@@ -1,24 +0,0 @@
-//
-// PromoCodeOperation.h
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "MultiOperation.h"
-
-#define ASPromoCodeDownloadFailedNotification @"ASPromoCodeDownloadFailedNotification"
-#define kASPromoCodeDownloadFailedErrorDescription @"errorDescription"
-
-@class Product;
-
-@interface PromoCodeOperation : MultiOperation {
-
-}
-
-- (id)initWithProduct:(Product *)aProduct;
-- (id)initWithProduct:(Product *)aProduct numberOfCodes:(NSInteger)numberOfCodes;
-
-@end
View
480 Classes/PromoCodeOperation.m
@@ -1,480 +0,0 @@
-//
-// PromoCodeOperation.m
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import "PromoCodeOperation.h"
-#import "DownloadStepOperation.h"
-#import "Product.h"
-#import "ASAccount.h"
-#import "PromoCode.h"
-#import "NSDictionary+HTTP.h"
-#import "RegexKitLite.h"
-
-@interface PromoCodeOperation ()
-+ (NSString *)scanNameForFormField:(NSString *)field withScanner:(NSScanner *)scanner;
-+ (NSURLRequest *)postRequestWithURL:(NSURL *)URL body:(NSDictionary *)bodyDict;
-+ (void)errorNotification:(NSString *)errorDescription;
-@end
-
-@implementation PromoCodeOperation
-
-- (id)initWithProduct:(Product *)aProduct
-{
- return [self initWithProduct:aProduct numberOfCodes:0];
-}
-
-- (id)initWithProduct:(Product *)aProduct numberOfCodes:(NSInteger)numberOfCodes
-{
- self = [super init];
-
- NSSet *existingCodes = [aProduct.promoCodes valueForKey:@"code"];
- __block NSInteger numberOfCodesToRequest = numberOfCodes;
-
- NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
- NSArray *cookies = [cookieStorage cookiesForURL:[NSURL URLWithString:@"https://itunesconnect.apple.com"]];
- for (NSHTTPCookie *cookie in cookies) {
- [cookieStorage deleteCookie:cookie];
- }
- NSString *username = aProduct.account.username;
- NSString *password = aProduct.account.password;
- NSString *productID = aProduct.productID;
- NSString *ittsBaseURL = @"https://itunesconnect.apple.com";
-
-
- DownloadStepOperation *step1 = [DownloadStepOperation operationWithInput:nil];
- NSURL *loginURL = [NSURL URLWithString:[ittsBaseURL stringByAppendingString:@"/WebObjects/iTunesConnect.woa"]];
- step1.request = [NSURLRequest requestWithURL:loginURL];
-
- DownloadStepOperation *step2 = [DownloadStepOperation operationWithInput:step1];
- step2.startBlock = ^(DownloadStepOperation *operation) {
- NSData *loginPageData = operation.inputOperation.data;
- NSString *loginPage = [[[NSString alloc] initWithData:loginPageData encoding:NSUTF8StringEncoding] autorelease];
- if (loginPage) {
- NSScanner *loginPageScanner = [NSScanner scannerWithString:loginPage];
- [loginPageScanner scanUpToString:@"action=\"" intoString:nil];
- if (![loginPageScanner scanString:@"action=\"" intoString:nil]) {
- [PromoCodeOperation errorNotification:@"could not log in"];
- [operation cancel];
- return;
- }
- NSString *loginAction = nil;
- [loginPageScanner scanUpToString:@"\"" intoString:&loginAction];
-
- NSDictionary *postDict = [NSDictionary dictionaryWithObjectsAndKeys:
- username, @"theAccountName",
- password, @"theAccountPW",
- @"39", @"1.Continue.x", // coordinates of submit button on screen. any values seem to work
- @"7", @"1.Continue.y",
- nil];
- operation.request = [PromoCodeOperation postRequestWithURL:[NSURL URLWithString:[ittsBaseURL stringByAppendingString:loginAction]] body:postDict];
- } else {
- [PromoCodeOperation errorNotification:@"could not log in"];
- [operation cancel];
- }
- };
-
-
- DownloadStepOperation *step3 = [DownloadStepOperation operationWithInput:step2];
- step3.startBlock = ^(DownloadStepOperation *operation) {
- NSData *loginPageData = operation.inputOperation.data;
- NSString *loginPage = [[[NSString alloc] initWithData:loginPageData encoding:NSUTF8StringEncoding] autorelease];
- if (loginPage) {
- NSScanner *manageAppsScanner = [NSScanner scannerWithString:loginPage];
- NSString *paymentsAction = nil;
- [manageAppsScanner scanUpToString:@"alt=\"Manage Your Applications" intoString:NULL];
- [manageAppsScanner scanUpToString:@"<a href=\"" intoString:NULL];
- [manageAppsScanner scanString:@"<a href=\"" intoString:NULL];
- [manageAppsScanner scanUpToString:@"\"" intoString:&paymentsAction];
- if (paymentsAction) {
- NSString *manageAppsURLString = [NSString stringWithFormat:@"https://itunesconnect.apple.com%@", paymentsAction];
- operation.request = [NSURLRequest requestWithURL:[NSURL URLWithString:manageAppsURLString]];
- } else {
- [PromoCodeOperation errorNotification:@"could not find 'Manage Your Applications' link"];
- [operation cancel];
- }
- } else {
- [PromoCodeOperation errorNotification:@"could not load iTunes Connect"];
- [operation cancel];
- }
- };
-
-
- DownloadStepOperation *step4 = [DownloadStepOperation operationWithInput:step3];
- step4.startBlock = ^(DownloadStepOperation *operation) {
- NSData *manageAppsPageData = operation.inputOperation.data;
- NSString *manageAppsPage = [[[NSString alloc] initWithData:manageAppsPageData encoding:NSUTF8StringEncoding] autorelease];
- if (manageAppsPage) {
- NSScanner *searchFormScanner = [NSScanner scannerWithString:manageAppsPage];
- NSString *searchFormAction = nil;
- if ([searchFormScanner scanUpToString:@"<div id=\"titleSearch" intoString:NULL] && [searchFormScanner scanUpToString:@"action=\"" intoString:NULL] && [searchFormScanner scanString:@"action=\"" intoString:NULL] && [searchFormScanner scanUpToString:@"\"" intoString:&searchFormAction]) {
- NSString *nameCompareFieldName = [PromoCodeOperation scanNameForFormField:@"search-param-compare-name" withScanner:searchFormScanner];
- NSString *nameValueFieldName = [PromoCodeOperation scanNameForFormField:@"search-param-value-name" withScanner:searchFormScanner];
- NSString *appleIDFieldName = [PromoCodeOperation scanNameForFormField:@"search-param-value-appleId" withScanner:searchFormScanner];
- NSString *statusFieldName = [PromoCodeOperation scanNameForFormField:@"search-param-value-statusSearch" withScanner:searchFormScanner];
- NSString *appTypeFieldName = [PromoCodeOperation scanNameForFormField:@"search-param-value-" withScanner:searchFormScanner];
- if (nameCompareFieldName && nameValueFieldName && appleIDFieldName && statusFieldName) {
- NSDictionary *bodyDict;
- if (appTypeFieldName) {
- bodyDict = [NSDictionary dictionaryWithObjectsAndKeys:
- @"0", nameCompareFieldName,
- @"", nameValueFieldName,
- productID, appleIDFieldName,
- @"WONoSelectionString", statusFieldName,
- @"WONoSelectionString", appTypeFieldName,
- nil];
- } else {
- bodyDict = [NSDictionary dictionaryWithObjectsAndKeys:
- @"0", nameCompareFieldName,
- @"", nameValueFieldName,
- productID, appleIDFieldName,
- @"WONoSelectionString", statusFieldName,
- nil];
- }
- operation.request = [PromoCodeOperation postRequestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://itunesconnect.apple.com%@", searchFormAction]] body:bodyDict];
- } else {
- [PromoCodeOperation errorNotification:@"could not parse 'Manage Your Applications' page"];
- [operation cancel];
- }
- }
- } else {
- [PromoCodeOperation errorNotification:@"could not parse 'Manage Your Applications' page"];
- [operation cancel];
- }
- };
-
-
- DownloadStepOperation *step5 = [DownloadStepOperation operationWithInput:step4];
- step5.startBlock = ^(DownloadStepOperation *operation) {
- NSData *searchResultPageData = operation.inputOperation.data;
-
- NSString *searchResultPage = [[[NSString alloc] initWithData:searchResultPageData encoding:NSUTF8StringEncoding] autorelease];
- if (searchResultPage) {
- NSScanner *searchResultScanner = [NSScanner scannerWithString:searchResultPage];
- if ([searchResultScanner scanUpToString:@"<div class=\"software-column-type-col-0\">" intoString:NULL]) {
- [searchResultScanner scanUpToString:@"<a href=\"" intoString:NULL];
- [searchResultScanner scanString:@"<a href=\"" intoString:NULL];
- NSString *appPageURLPath = nil;
- [searchResultScanner scanUpToString:@"\"" intoString:&appPageURLPath];
- NSString *appPageURLString = [NSString stringWithFormat:@"https://itunesconnect.apple.com%@", appPageURLPath];
- operation.request = [NSURLRequest requestWithURL:[NSURL URLWithString:appPageURLString]];
- } else {
- [PromoCodeOperation errorNotification:@"could not parse app search results page"];
- [operation cancel];
- }
- } else {
- [PromoCodeOperation errorNotification:@"could not parse app search results page"];
- [operation cancel];
- }
- };
-
-
- DownloadStepOperation *step6 = [DownloadStepOperation operationWithInput:step5];
- step6.startBlock = ^(DownloadStepOperation *operation) {
- NSData *appPageData = operation.inputOperation.data;
- NSString *appPage = [[[NSString alloc] initWithData:appPageData encoding:NSUTF8StringEncoding] autorelease];
- NSScanner *currentVersionScanner = [NSScanner scannerWithString:appPage];
- if (![currentVersionScanner scanUpToString:@"<div class=\"version-container\">" intoString:NULL] || ![currentVersionScanner scanUpToString:@"<a href=\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse app page"];
- [operation cancel];
- }
- [currentVersionScanner scanString:@"<a href=\"" intoString:NULL];
- NSString *currentVersionURLPath = nil;
- [currentVersionScanner scanUpToString:@"\"" intoString:&currentVersionURLPath];
- NSString *currentVersionURLString = [NSString stringWithFormat:@"https://itunesconnect.apple.com%@", currentVersionURLPath];
- operation.request = [NSURLRequest requestWithURL:[NSURL URLWithString:currentVersionURLString]];
- };
-
-
- DownloadStepOperation *step7 = [DownloadStepOperation operationWithInput:step6];
- step7.startBlock = ^(DownloadStepOperation *operation) {
- NSData *currentVersionPageData = operation.inputOperation.data;
- NSString *currentVersionPage = [[[NSString alloc] initWithData:currentVersionPageData encoding:NSUTF8StringEncoding] autorelease];
- NSString *promoCodesURLPath = [currentVersionPage stringByMatching:@"<a href=\"(.*?)\"><span class=\"promo-codes" capture:1];
- if (!promoCodesURLPath) {
- [PromoCodeOperation errorNotification:@"could not find promo codes link, perhaps the app was removed from sale?"];
- [operation cancel];
- }
- NSString *promoCodesURLString = [NSString stringWithFormat:@"https://itunesconnect.apple.com%@", promoCodesURLPath];
- operation.request = [NSURLRequest requestWithURL:[NSURL URLWithString:promoCodesURLString]];
- };
-
-
- DownloadStepOperation *step8 = [DownloadStepOperation operationWithInput:step7];
- step8.startBlock = ^(DownloadStepOperation *operation) {
- NSData *promoCodesPageData = operation.inputOperation.data;
- NSString *promoCodesPage = [[[NSString alloc] initWithData:promoCodesPageData encoding:NSUTF8StringEncoding] autorelease];
-
- NSScanner *codesRemainingScanner = [NSScanner scannerWithString:promoCodesPage];
- if (![codesRemainingScanner scanUpToString:@"<div class=\"codeString\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse promo code request page"];
- [operation cancel];
- }
- [codesRemainingScanner scanUpToString:@">" intoString:NULL];
- [codesRemainingScanner scanString:@">" intoString:NULL];
- NSInteger codesRemaining = -1;
- [codesRemainingScanner scanInteger:&codesRemaining];
- if (codesRemaining < 0) {
- [PromoCodeOperation errorNotification:@"could not parse promo code request page"];
- [operation cancel];
- }
- //NSLog(@"%i codes available", codesRemaining);
- if (codesRemaining < numberOfCodesToRequest) {
- //NSLog(@"More codes requested than available, requesting all codes that are left");
- numberOfCodesToRequest = codesRemaining;
- }
- NSScanner *viewHistoryScanner = [NSScanner scannerWithString:promoCodesPage];
- [viewHistoryScanner scanUpToString:@"<form name=\"mainForm\"" intoString:NULL];
- if (![viewHistoryScanner scanUpToString:@"action=\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse promo code request page"];
- [operation cancel];
- }
- [viewHistoryScanner scanString:@"action=\"" intoString:NULL];
- NSString *viewHistoryFormAction = nil;
- [viewHistoryScanner scanUpToString:@"\"" intoString:&viewHistoryFormAction];
-
- if (![viewHistoryScanner scanUpToString:@"class=\"customActionButton\"" intoString:NULL] || ![viewHistoryScanner scanUpToString:@"name=\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse promo code request page"];
- [operation cancel];
- }
-
- [viewHistoryScanner scanString:@"name=\"" intoString:NULL];
- NSString *viewHistoryButtonName = nil;
- [viewHistoryScanner scanUpToString:@"\"" intoString:&viewHistoryButtonName];
-
- if (![viewHistoryScanner scanUpToString:@"<td class=\"metadata-field-code" intoString:NULL] || ![viewHistoryScanner scanUpToString:@"name=\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse promo code request page"];
- [operation cancel];
- }
-
- [viewHistoryScanner scanString:@"name=\"" intoString:NULL];
- NSString *numberOfCodesFieldName = nil;
- [viewHistoryScanner scanUpToString:@"\"" intoString:&numberOfCodesFieldName];
-
- if (![viewHistoryScanner scanUpToString:@"class=\"continueActionButton\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse promo code request page"];
- [operation cancel];
- }
- [viewHistoryScanner scanString:@"class=\"continueActionButton\"" intoString:NULL];
- [viewHistoryScanner scanUpToString:@"name=\"" intoString:NULL];
- [viewHistoryScanner scanString:@"name=\"" intoString:NULL];
- NSString *continueButtonName = nil;
- [viewHistoryScanner scanUpToString:@"\"" intoString:&continueButtonName];
- if (!continueButtonName) {
- [PromoCodeOperation errorNotification:@"could not parse promo code request page"];
- [operation cancel];
- }
-
- if (numberOfCodes == 0) {
- NSString *viewHistoryURLString = [NSString stringWithFormat:@"https://itunesconnect.apple.com%@", viewHistoryFormAction];
- NSDictionary *bodyDict = [NSDictionary dictionaryWithObjectsAndKeys:
- @"58", [NSString stringWithFormat:@"%@.x", viewHistoryButtonName],
- @"14", [NSString stringWithFormat:@"%@.y", viewHistoryButtonName],
- @"", numberOfCodesFieldName,
- nil];
- operation.request = [PromoCodeOperation postRequestWithURL:[NSURL URLWithString:viewHistoryURLString] body:bodyDict];
- } else {
- NSString *requestCodesURLString = [NSString stringWithFormat:@"https://itunesconnect.apple.com%@", viewHistoryFormAction];
- NSDictionary *bodyDict = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSString stringWithFormat:@"%i", numberOfCodesToRequest], numberOfCodesFieldName,
- @"58", [NSString stringWithFormat:@"%@.x", continueButtonName],
- @"14", [NSString stringWithFormat:@"%@.y", continueButtonName],
- nil];
- operation.request = [PromoCodeOperation postRequestWithURL:[NSURL URLWithString:requestCodesURLString] body:bodyDict];
- }
- };
-
- if (numberOfCodes == 0) {
- DownloadStepOperation *step9 = [DownloadStepOperation operationWithInput:step8];
- step9.startBlock = ^(DownloadStepOperation *operation) {
- NSString *historyPage = [[[NSString alloc] initWithData:operation.inputOperation.data encoding:NSUTF8StringEncoding] autorelease];
-
- NSArray *downloadPaths = [historyPage componentsMatchedByRegex:@"<a href=\"(.*?)\".*?download-codes" capture:1];
- NSArray *dateStrings = [historyPage componentsMatchedByRegex:@"<td>((Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)(.*?))</td>" capture:1];
-
- NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
- [dateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
- [dateFormatter setDateFormat:@"MMM dd,yyyy HH:mm:ss"];
- [dateFormatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en-us"] autorelease]];
-
- if ([dateStrings count] >= [downloadPaths count]) {
- int i = 0;
- NSDate *date = nil;
- for (NSString *downloadPath in downloadPaths) {
- NSString *dateString = [dateStrings objectAtIndex:i];
- date = [dateFormatter dateFromString:dateString];
-
- NSString *downloadURLString = [NSString stringWithFormat:@"https://itunesconnect.apple.com%@", downloadPath];
-
- DownloadStepOperation *codeDownloadStep = [DownloadStepOperation operationWithInput:nil];
- codeDownloadStep.request = [NSURLRequest requestWithURL:[NSURL URLWithString:downloadURLString]];
- codeDownloadStep.completionBlock = ^ {
- dispatch_async(dispatch_get_main_queue(), ^ {
- NSString *promoCodeFile = [[[NSString alloc] initWithData:codeDownloadStep.data encoding:NSUTF8StringEncoding] autorelease];
- NSArray *promoCodes = [promoCodeFile componentsSeparatedByString:@"\n"];
- if ([promoCodes count] > 51) {
- [PromoCodeOperation errorNotification:@"parsing the downloaded promo codes failed"];
- [operation cancel];
- return;
- }
- for (NSString *promoCode in promoCodes) {
- promoCode = [promoCode stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
- if ([promoCode length] == 12 && ![existingCodes containsObject:promoCode]) {
- PromoCode *newPromoCode = [NSEntityDescription insertNewObjectForEntityForName:@"PromoCode" inManagedObjectContext:aProduct.managedObjectContext];
- newPromoCode.code = promoCode;
- newPromoCode.requestDate = date;
- [[aProduct mutableSetValueForKey:@"promoCodes"] addObject:newPromoCode];
- }
- if ([promoCode length] > 0 && [promoCode length] != 12) {
- [PromoCodeOperation errorNotification:@"parsing the downloaded promo codes failed"];
- [operation cancel];
- return;
- }
- }
- });
- };
- [self.queue addOperation:codeDownloadStep];
- i++;
- }
- }
- };
- [super initWithOperations:[NSArray arrayWithObjects:step1, step2, step3, step4, step5, step6, step7, step8, step9, nil]];
- } else {
- DownloadStepOperation *step9 = [DownloadStepOperation operationWithInput:step8];
- step9.startBlock = ^(DownloadStepOperation *operation) {
- NSData *licenseAgreementPageData = operation.inputOperation.data;
- NSString *licenseAgreementPage = [[[NSString alloc] initWithData:licenseAgreementPageData encoding:NSUTF8StringEncoding] autorelease];
- NSScanner *licenseAgreementScanner = [NSScanner scannerWithString:licenseAgreementPage];
- if ([licenseAgreementScanner scanUpToString:@"<html>" intoString:NULL]) {
- NSString *licenseAgreementHTML = nil;
- [licenseAgreementScanner scanString:@"<html>" intoString:NULL];
- if ([licenseAgreementScanner scanUpToString:@"</html>" intoString:&licenseAgreementHTML]) {
- licenseAgreementHTML = [licenseAgreementHTML stringByAppendingString:@"</html>"];
- }
- if (!licenseAgreementHTML) {
- [licenseAgreementScanner setScanLocation:0];
- if ([licenseAgreementScanner scanUpToString:@"<h3 style=\"text-align:center;\">MAC APP STORE VOLUME CUSTOM CODE AGREEMENT</h3>" intoString:NULL]) {
- [licenseAgreementScanner scanUpToString:@"<td colspan=\"2\" class=\"check-agreement\"" intoString:&licenseAgreementHTML];
- }
- }
- if (licenseAgreementHTML) {
- [licenseAgreementScanner setScanLocation:0];
- if (![licenseAgreementScanner scanUpToString:@" <form name=\"mainForm\"" intoString:NULL] || ![licenseAgreementScanner scanUpToString:@"action=\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse license agreement page"];
- [operation cancel];
- }
- NSString *licenseAgreementFormAction = nil;
- [licenseAgreementScanner scanString:@"action=\"" intoString:NULL];
- [licenseAgreementScanner scanUpToString:@"\"" intoString:&licenseAgreementFormAction];
-
- if (![licenseAgreementScanner scanUpToString:@"<input type=\"checkbox\"" intoString:NULL] || ![licenseAgreementScanner scanUpToString:@"name=\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse license agreement page"];
- [operation cancel];
- }
-
- NSString *licenseAgreementCheckboxName = nil;
- [licenseAgreementScanner scanString:@"name=\"" intoString:NULL];
- [licenseAgreementScanner scanUpToString:@"\"" intoString:&licenseAgreementCheckboxName];
-
- if (![licenseAgreementScanner scanUpToString:@"class=\"continueActionButton\"" intoString:NULL] || ![licenseAgreementScanner scanUpToString:@"name=\"" intoString:NULL]) {
- [PromoCodeOperation errorNotification:@"could not parse license agreement page"];
- [operation cancel];
- }
- NSString *licenseAgreementContinueButtonName = nil;
- [licenseAgreementScanner scanString:@"name=\"" intoString:NULL];
- [licenseAgreementScanner scanUpToString:@"\"" intoString:&licenseAgreementContinueButtonName];
-
- NSDictionary *postDict = [NSDictionary dictionaryWithObjectsAndKeys:
- licenseAgreementCheckboxName, licenseAgreementCheckboxName,
- @"58", [NSString stringWithFormat:@"%@.x", licenseAgreementContinueButtonName],
- @"14", [NSString stringWithFormat:@"%@.y", licenseAgreementContinueButtonName],
- nil];
- NSString *continueURLString = [@"https://itunesconnect.apple.com" stringByAppendingString:licenseAgreementFormAction];
- operation.request = [PromoCodeOperation postRequestWithURL:[NSURL URLWithString:continueURLString] body:postDict];
-
- operation.paused = YES;
- [[NSNotificationCenter defaultCenter] postNotificationName:@"PromoCodeOperationLoadedLicenseAgreementNotification" object:operation userInfo:[NSDictionary dictionaryWithObject:licenseAgreementHTML forKey:@"licenseAgreement"]];
- } else {
- [PromoCodeOperation errorNotification:@"could not parse license agreement page"];
- [operation cancel];
- }
- } else {
- [PromoCodeOperation errorNotification:@"could not parse license agreement page"];
- [operation cancel];
- }
- };
-
- DownloadStepOperation *step10 = [DownloadStepOperation operationWithInput:step9];
- step10.startBlock = ^(DownloadStepOperation *operation) {
- NSData *codeDownloadPageData = operation.inputOperation.data;
- NSString *codeDownloadPage = [[[NSString alloc] initWithData:codeDownloadPageData encoding:NSUTF8StringEncoding] autorelease];
-
- NSString *downloadLinkURLPath = [codeDownloadPage stringByMatching:@"<a href=\"(.*?)\".*?download-codes" capture:1];
- NSString *downloadLinkURLString = [NSString stringWithFormat:@"https://itunesconnect.apple.com%@", downloadLinkURLPath];
-
- if (!downloadLinkURLString) {
- [PromoCodeOperation errorNotification:@"could not find promo codes download link"];
- [operation cancel];
- }
- operation.request = [NSURLRequest requestWithURL:[NSURL URLWithString:downloadLinkURLString]];
- };
-
- DownloadStepOperation *step11 = [DownloadStepOperation operationWithInput:step10];
- step11.startBlock = ^(DownloadStepOperation *operation) {
- NSData *promoCodeData = operation.inputOperation.data;
- NSString *promoCodesFile = [[[NSString alloc] initWithData:promoCodeData encoding:NSUTF8StringEncoding] autorelease];
- NSArray *promoCodes = [promoCodesFile componentsSeparatedByString:@"\n"];
- for (NSString *promoCode in promoCodes) {
- if ([promoCode length] > 0 && ![existingCodes containsObject:promoCode]) {
- PromoCode *newPromoCode = [NSEntityDescription insertNewObjectForEntityForName:@"PromoCode" inManagedObjectContext:aProduct.managedObjectContext];
- newPromoCode.code = promoCode;
- newPromoCode.requestDate = [NSDate date];
- [[aProduct mutableSetValueForKey:@"promoCodes"] addObject:newPromoCode];
- }
- }
- };
-
- [super initWithOperations:[NSArray arrayWithObjects:step1, step2, step3, step4, step5, step6, step7, step8, step9, step10, step11, nil]];
- }
-
- return self;
-}
-
-+ (NSString *)scanNameForFormField:(NSString *)field withScanner:(NSScanner *)scanner
-{
- [scanner scanUpToString:[NSString stringWithFormat:@"class='%@'", field] intoString:NULL];
- [scanner scanUpToString:@"name=\"" intoString:NULL];
- if ([scanner scanString:@"name=\"" intoString:NULL]) {
- NSString *fieldName = nil;
- [scanner scanUpToString:@"\"" intoString:&fieldName];
- return fieldName;
- }
- return nil;
-}
-
-+ (NSURLRequest *)postRequestWithURL:(NSURL *)URL body:(NSDictionary *)bodyDict
-{
- NSString *postDictString = [bodyDict formatForHTTP];
- NSData *httpBody = [postDictString dataUsingEncoding:NSASCIIStringEncoding];
- NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
- [request setHTTPMethod:@"POST"];
- [request setHTTPBody:httpBody];
- return request;
-}
-
-+ (void)errorNotification:(NSString *)errorDescription
-{
- dispatch_async(dispatch_get_main_queue(), ^ {
- [[NSNotificationCenter defaultCenter] postNotificationName:ASPromoCodeDownloadFailedNotification object:nil userInfo:[NSDictionary dictionaryWithObject:errorDescription forKey:kASPromoCodeDownloadFailedErrorDescription]];
- });
-}
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
-@end
View
37 Classes/PromoCodesAppViewController.h
@@ -1,37 +0,0 @@
-//
-// PromoCodesAppViewController.h
-// AppSales
-//
-// Created by Ole Zorn on 13.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import <MessageUI/MessageUI.h>
-#import "FieldEditorViewController.h"
-
-@class Product, PromoCode;
-
-@interface PromoCodesAppViewController : UITableViewController <UIActionSheetDelegate, FieldEditorViewControllerDelegate, MFMailComposeViewControllerDelegate> {
-
- Product *product;
- NSOperationQueue *queue;
- NSArray *promoCodes;
- NSDateFormatter *dateFormatter;
-
- NSArray *idleToolbarItems;
- NSArray *busyToolbarItems;
-
- PromoCode *selectedPromoCode;
- UIActionSheet *activeSheet;
-}
-
-@property (nonatomic, retain) NSArray *promoCodes;
-@property (nonatomic, retain) PromoCode *selectedPromoCode;
-@property (nonatomic, retain) UIActionSheet *activeSheet;
-
-- (id)initWithProduct:(Product *)aProduct;
-- (void)reloadPromoCodes;
-- (void)requestNewCodes:(id)sender;
-
-@end
View
359 Classes/PromoCodesAppViewController.m
@@ -1,359 +0,0 @@
-//
-// PromoCodesAppViewController.m
-// AppSales
-//
-// Created by Ole Zorn on 13.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import "PromoCodesAppViewController.h"
-#import "Product.h"
-#import "ASAccount.h"
-#import "MBProgressHUD.h"
-#import "UIImage+Tinting.h"
-#import "PromoCodeOperation.h"
-#import "PromoCode.h"
-#import "ReportDownloadCoordinator.h"
-
-#define kActionsSheetTag 1
-#define kDeleteCodesSheetTag 2
-#define kActionsAllCodesSheetTag 3
-
-@implementation PromoCodesAppViewController
-
-@synthesize promoCodes, selectedPromoCode, activeSheet;
-
-- (id)initWithProduct:(Product *)aProduct
-{
- self = [super initWithStyle:UITableViewStyleGrouped];
- if (self) {
- product = [aProduct retain];
- queue = [[NSOperationQueue alloc] init];
- [queue setMaxConcurrentOperationCount:1];
- dateFormatter = [[NSDateFormatter alloc] init];
- [dateFormatter setDateStyle:NSDateFormatterMediumStyle];
- [dateFormatter setTimeStyle:NSDateFormatterShortStyle];
- [dateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
- [product addObserver:self forKeyPath:@"promoCodes" options:NSKeyValueObservingOptionNew context:nil];
- [product addObserver:self forKeyPath:@"isDownloadingPromoCodes" options:NSKeyValueObservingOptionNew context:nil];
-
- UIBarButtonItem *flexSpace = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease];
- UIBarButtonItem *deleteItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemTrash target:self action:@selector(deletePromoCodes:)] autorelease];
- UIBarButtonItem *actionItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(shareCodes:)] autorelease];
- idleToolbarItems = [[NSArray alloc] initWithObjects:deleteItem, flexSpace, actionItem, nil];
-
- UIActivityIndicatorView *spinner = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite] autorelease];
- [spinner startAnimating];
- UIBarButtonItem *spinnerItem = [[[UIBarButtonItem alloc] initWithCustomView:spinner] autorelease];
-
- UILabel *statusLabel = [[[UILabel alloc] initWithFrame:CGRectMake(0, 10, 200, 20)] autorelease];
- statusLabel.font = [UIFont boldSystemFontOfSize:14.0];
- statusLabel.backgroundColor = [UIColor clearColor];
- statusLabel.textColor = [UIColor whiteColor];
- statusLabel.shadowColor = [UIColor blackColor];
- statusLabel.shadowOffset = CGSizeMake(0, -1);
- statusLabel.textAlignment = UITextAlignmentCenter;
- statusLabel.text = NSLocalizedString(@"Loading Promo Codes...", nil);
-
- UIView *statusView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 40)] autorelease];
- [statusView addSubview:statusLabel];
- UIBarButtonItem *statusItem = [[[UIBarButtonItem alloc] initWithCustomView:statusView] autorelease];
-
- UIBarButtonItem *stopItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop target:self action:@selector(stopDownload:)] autorelease];
- busyToolbarItems = [[NSArray alloc] initWithObjects:spinnerItem, flexSpace, statusItem, flexSpace, stopItem, nil];
-
- self.toolbarItems = (product.isDownloadingPromoCodes) ? busyToolbarItems : idleToolbarItems;
- }
- return self;
-}
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
- self.title = [product displayName];
- self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshHistory:)] autorelease];
-
- [self reloadPromoCodes];
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
-{
- if ([keyPath isEqualToString:@"promoCodes"]) {
- [self reloadPromoCodes];
- } else if ([keyPath isEqualToString:@"isDownloadingPromoCodes"]) {
- self.toolbarItems = (product.isDownloadingPromoCodes) ? busyToolbarItems : idleToolbarItems;
- }
-}
-
-- (void)reloadPromoCodes
-{
- self.promoCodes = [[product.promoCodes allObjects] sortedArrayUsingDescriptors:[NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"requestDate" ascending:NO] autorelease]]];
-
- [self.tableView reloadData];
-}
-
-- (void)requestNewCodes:(id)sender
-{
- FieldSpecifier *numberOfCodesField = [FieldSpecifier numericFieldWithKey:@"numberOfCodes" title:NSLocalizedString(@"Number of Codes", nil) defaultValue:@""];
-
- FieldSectionSpecifier *numberOfCodesSection = [FieldSectionSpecifier sectionWithFields:[NSArray arrayWithObject:numberOfCodesField]
- title:@""
- description:NSLocalizedString(@"AppSales will automatically adjust the number you enter to the number of codes that are available.", nil)];
- FieldEditorViewController *vc = [[[FieldEditorViewController alloc] initWithFieldSections:[NSArray arrayWithObject:numberOfCodesSection] title:NSLocalizedString(@"Promo Codes", nil)] autorelease];
- vc.delegate = self;
- vc.doneButtonTitle = NSLocalizedString(@"Request", nil);
- vc.cancelButtonTitle = NSLocalizedString(@"Cancel", nil);
- UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:vc] autorelease];
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
- navController.modalPresentationStyle = UIModalPresentationFormSheet;
- }
- [self presentModalViewController:navController animated:YES];
-}
-
-- (void)stopDownload:(id)sender
-{
- [[ReportDownloadCoordinator sharedReportDownloadCoordinator] cancelAllDownloads];
-}
-
-- (void)deletePromoCodes:(id)sender
-{
- if (self.activeSheet.visible) {
- [self.activeSheet dismissWithClickedButtonIndex:activeSheet.cancelButtonIndex animated:NO];
- }
- UIActionSheet *deleteSheet = [[[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Do you want to delete all promo codes for this app? You can reload them later from your history.", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) destructiveButtonTitle:NSLocalizedString(@"Delete Promo Codes", nil) otherButtonTitles:nil] autorelease];
- deleteSheet.tag = kDeleteCodesSheetTag;
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
- self.activeSheet = deleteSheet;
- [deleteSheet showFromBarButtonItem:sender animated:YES];
- } else {
- [deleteSheet showFromToolbar:self.navigationController.toolbar];
- }
-}
-
-- (void)shareCodes:(id)sender
-{
- if (self.activeSheet.visible) {
- [self.activeSheet dismissWithClickedButtonIndex:self.activeSheet.cancelButtonIndex animated:NO];
- }
- UIActionSheet *sheet = [[[UIActionSheet alloc] initWithTitle:nil
- delegate:self
- cancelButtonTitle:NSLocalizedString(@"Cancel", nil)
- destructiveButtonTitle:nil
- otherButtonTitles:
- NSLocalizedString(@"Email All Codes", nil),
- NSLocalizedString(@"Copy All Codes", nil), nil] autorelease];
- sheet.tag = kActionsAllCodesSheetTag;
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
- [sheet showFromBarButtonItem:sender animated:YES];
- self.activeSheet = sheet;
- } else {
- [sheet showFromToolbar:self.navigationController.toolbar];
- }
-}
-
-- (void)fieldEditor:(FieldEditorViewController *)editor didFinishEditingWithValues:(NSDictionary *)returnValues
-{
- NSInteger numberOfCodes = [[returnValues objectForKey:@"numberOfCodes"] integerValue];
- if (numberOfCodes <= 0) {
- [[[[UIAlertView alloc] initWithTitle:nil message:NSLocalizedString(@"Please enter the number of codes you want to request.", nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil] autorelease] show];
- return;
- } else if (numberOfCodes > 50) {
- [[[[UIAlertView alloc] initWithTitle:nil message:NSLocalizedString(@"Please enter a smaller number. You have a maximum of 50 promo codes per version of your app.", nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil] autorelease] show];
- return;
- }
- [self dismissModalViewControllerAnimated:YES];
-
- [[ReportDownloadCoordinator sharedReportDownloadCoordinator] downloadPromoCodesForProduct:product numberOfCodes:numberOfCodes];
-}
-
-- (void)fieldEditorDidCancel:(FieldEditorViewController *)editor
-{
- [self dismissModalViewControllerAnimated:YES];
-}
-
-- (void)refreshHistory:(id)sender
-{
- [[ReportDownloadCoordinator sharedReportDownloadCoordinator] downloadPromoCodesForProduct:product numberOfCodes:0];
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
- return YES;
- }
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
-{
- return 2;
-}
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
-{
- if (section == 0) {
- return 1;
- }
- return [self.promoCodes count];
-}
-
-- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
-{
- if (section == 1) {
- return NSLocalizedString(@"Promo Code History", nil);
- }
- return nil;
-}
-
-- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section
-{
- if (section == 1) {
- return NSLocalizedString(@"Tap the refresh button to load promo codes you recently requested without AppSales.", nil);
- }
- return nil;
-}
-
-- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
-{
- if (indexPath.section == 0) {
- return 44.0;
- }
- return 55.0;
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
-{
- static NSString *CellIdentifier = @"Cell";
-
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
- }
-
- if (indexPath.section == 0) {
- cell.textLabel.text = NSLocalizedString(@"Request New Codes...", nil);
- cell.imageView.image = [UIImage imageNamed:@"RequestPromoCode.png"];
- cell.imageView.highlightedImage = [UIImage as_tintedImageNamed:@"RequestPromoCode.png" color:[UIColor whiteColor]];
- cell.textLabel.textColor = [UIColor blackColor];
- } else {
- PromoCode *promoCode = [self.promoCodes objectAtIndex:indexPath.row];
- BOOL used = [promoCode.used boolValue];
- cell.textLabel.text = promoCode.code;
- NSString *dateString = [dateFormatter stringFromDate:promoCode.requestDate];
- cell.detailTextLabel.text = (used) ? [NSString stringWithFormat:@"(used) %@", dateString] : dateString;
- cell.imageView.image = (used) ? [UIImage as_tintedImageNamed:@"PromoCodes.png" color:[UIColor grayColor]] : [UIImage imageNamed:@"PromoCodes.png"];
- cell.imageView.highlightedImage = [UIImage as_tintedImageNamed:@"PromoCodes.png" color:[UIColor whiteColor]];
- cell.textLabel.textColor = (used) ? [UIColor grayColor] : [UIColor blackColor];
- }
-
- return cell;
-}
-
-
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
-{
- if (indexPath.section == 1) {
- self.selectedPromoCode = [self.promoCodes objectAtIndex:indexPath.row];
- BOOL used = [selectedPromoCode.used boolValue];
- UIActionSheet *sheet = [[[UIActionSheet alloc] initWithTitle:nil
- delegate:self
- cancelButtonTitle:NSLocalizedString(@"Cancel", nil)
- destructiveButtonTitle:nil
- otherButtonTitles:
- NSLocalizedString(@"Email Code", nil),
- NSLocalizedString(@"Copy", nil),
- (used) ? NSLocalizedString(@"Mark as Unused", nil) : NSLocalizedString(@"Mark as Used", nil) , nil] autorelease];
- sheet.tag = kActionsSheetTag;
- [sheet showFromToolbar:self.navigationController.toolbar];
- } else {
- [tableView deselectRowAtIndexPath:indexPath animated:YES];
- [self requestNewCodes:self];
- }
-}
-
-- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
-{
- [self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:YES];
-
- if (actionSheet.tag == kActionsSheetTag) {
- if (buttonIndex != actionSheet.cancelButtonIndex) {
- if (buttonIndex == 0) {
- //email
- if (![MFMailComposeViewController canSendMail]) {
- [[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No Email Account", nil) message:NSLocalizedString(@"You have not configured this device for sending email.", nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil] autorelease] show];
- return;
- }
- MFMailComposeViewController *mailComposeViewController = [[[MFMailComposeViewController alloc] init] autorelease];
- mailComposeViewController.mailComposeDelegate = self;
- NSString *body = [NSString stringWithFormat:@"<br/><a href=\"https://phobos.apple.com/WebObjects/MZFinance.woa/wa/freeProductCodeWizard?code=%@\">Redeem Promo Code for %@ (%@)</a>", self.selectedPromoCode.code, [self.selectedPromoCode.product displayName], self.selectedPromoCode.code];
- NSString *subject = [NSString stringWithFormat:@"Promo Code for %@", [product displayName]];
- [mailComposeViewController setMessageBody:body isHTML:YES];
- [mailComposeViewController setSubject:subject];
- [self presentModalViewController:mailComposeViewController animated:YES];
- } else if (buttonIndex == 1) {
- //copy
- [[UIPasteboard generalPasteboard] setString:self.selectedPromoCode.code];
- } else if (buttonIndex == 2) {
- //toggle used
- self.selectedPromoCode.used = [NSNumber numberWithBool:![self.selectedPromoCode.used boolValue]];
- [self.tableView reloadData];
- }
- }
- } else if (actionSheet.tag == kActionsAllCodesSheetTag) {
- if (buttonIndex != actionSheet.cancelButtonIndex) {
- if (buttonIndex == 0) {
- if (![MFMailComposeViewController canSendMail]) {
- [[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No Email Account", nil) message:NSLocalizedString(@"You have not configured this device for sending email.", nil) delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil] autorelease] show];
- return;
- }
- MFMailComposeViewController *mailComposeViewController = [[[MFMailComposeViewController alloc] init] autorelease];
- mailComposeViewController.mailComposeDelegate = self;
- NSMutableString *body = [NSMutableString stringWithString:@"\n"];
- for (PromoCode *promoCode in self.promoCodes) {
- [body appendFormat:@"%@\n", promoCode.code];
- }
- NSString *subject = [NSString stringWithFormat:@"Promo Codes for %@", [product displayName]];
- [mailComposeViewController setMessageBody:body isHTML:NO];
- [mailComposeViewController setSubject:subject];
- [self presentModalViewController:mailComposeViewController animated:YES];
- } else if (buttonIndex == 1) {
- NSMutableString *allCodes = [NSMutableString string];
- for (PromoCode *promoCode in self.promoCodes) {
- [allCodes appendFormat:@"%@\n", promoCode.code];
- }
- [[UIPasteboard generalPasteboard] setString:allCodes];
- }
- }
- } else if (actionSheet.tag == kDeleteCodesSheetTag) {
- if (buttonIndex != actionSheet.cancelButtonIndex) {
- product.promoCodes = [NSSet set];
- [self.navigationController popViewControllerAnimated:YES];
- }
- }
-}
-
-- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
-{
- if (self.selectedPromoCode && result == MFMailComposeResultSent) {
- self.selectedPromoCode.used = [NSNumber numberWithBool:YES];
- [self.tableView reloadData];
- }
- [self dismissModalViewControllerAnimated:YES];
-}
-
-
-
-- (void)dealloc
-{
- [product removeObserver:self forKeyPath:@"promoCodes"];
- [product removeObserver:self forKeyPath:@"isDownloadingPromoCodes"];
- [product release];
- [selectedPromoCode release];
- [queue release];
- [dateFormatter release];
- [idleToolbarItems release];
- [busyToolbarItems release];
- [super dealloc];
-}
-
-@end
View
24 Classes/PromoCodesLicenseViewController.h
@@ -1,24 +0,0 @@
-//
-// PromoCodesLicenseViewController.h
-// AppSales
-//
-// Created by Ole Zorn on 14.08.11.
-// Copyright 2011 omz:software. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class DownloadStepOperation;
-
-@interface PromoCodesLicenseViewController : UIViewController <UIWebViewDelegate> {
-
- NSString *licenseAgreementHTML;
- DownloadStepOperation *downloadOperation;
- UIWebView *webView;
-}
-
-@property (nonatomic, retain) UIWebView *webView;
-
-- (id)initWithLicenseAgreement:(NSString *)licenseAgreement operation:(DownloadStepOperation *)operation;
-