├── AppRank.plist ├── AppStoreHeader.h ├── AppleAccountModel.h ├── AppleAccountModel.m ├── Entitlements.plist ├── ImportHeader.h ├── LotoDeviceManager.h ├── LotoDeviceManager.m ├── Makefile ├── README.md ├── RankAppModel.h ├── RankAppModel.m ├── RankManager.h ├── RankManager.m ├── RateModel.h ├── RateModel.m ├── SBAutoManager.h ├── SBAutoManager.m ├── SpringBoardHeader.h ├── Tweak.xm ├── control └── packages ├── com.superlake.apprank_0.0.1-1711+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1712+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1713+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1714+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1715+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1716+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1717+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1718+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1719+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1720+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1721+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1722+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1723+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1724+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1725+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1726+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1727+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1728+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1729+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1730+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1731+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1732+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1733+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1734+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1735+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1736+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1737+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1738+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1739+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1740+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1741+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1742+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1743+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1744+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1745+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1746+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1747+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1748+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1749+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1750+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1751+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1752+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1753+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1754+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1755+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1756+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1757+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1758+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1759+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1760+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1761+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1762+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1763+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1764+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1765+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1766+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1767+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1768+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1769+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1770+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1771+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1772+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1773+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1774+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1775+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1776+debug_iphoneos-arm.deb ├── com.superlake.apprank_0.0.1-1777+debug_iphoneos-arm.deb └── com.superlake.apprank_0.0.1-1778+debug_iphoneos-arm.deb /AppRank.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | Bundles = ( 4 | "com.apple.AppStore", 5 | "com.apple.itunesstored", 6 | "com.apple.ios.StoreKitUI", 7 | "com.apple.storeservices", 8 | "com.apple.springboard", 9 | "com.apple.storebookkeeperd", 10 | "com.apple.AuthKit", 11 | "com.apple.ios.StoreKitUIService", 12 | ); 13 | }; 14 | } -------------------------------------------------------------------------------- /AppStoreHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppStoreHeader.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #ifndef AppStoreHeader_h 10 | #define AppStoreHeader_h 11 | 12 | static int rankIndex; 13 | 14 | @interface SKUIAttributedStringLayout : NSObject 15 | @property (nonatomic,readonly) NSAttributedString * attributedString; 16 | @end 17 | 18 | @interface SKUIStyledButton : UIControl 19 | @property (nonatomic,retain) SKUIAttributedStringLayout * titleLayout; 20 | @end 21 | 22 | @interface SKUIReviewMetadata : NSObject 23 | 24 | @property (nonatomic,copy) NSString * body; 25 | @property (nonatomic,copy) NSString * nickname; 26 | @property (assign,nonatomic) float rating; 27 | @property (nonatomic,copy) NSString * title; 28 | 29 | @end 30 | 31 | @interface SUViewController : UIViewController 32 | @end 33 | 34 | @interface SKUIComposeReviewFormViewController : SUViewController 35 | -(void)_submit; 36 | @end 37 | 38 | @interface SKUIItemOfferButtonState : NSObject 39 | @property(nonatomic) _Bool hasImage; 40 | @property(nonatomic) long long progressType; 41 | @property(nonatomic) _Bool showingConfirmation; 42 | @property(nonatomic) _Bool highlighted; 43 | @end 44 | 45 | @interface SKRemoteComposeReviewViewController :UIViewController 46 | @end 47 | 48 | @interface SKComposeReviewViewController : UIViewController 49 | @end 50 | 51 | @interface SKUIViewController:UIViewController 52 | @end 53 | 54 | @interface SKUIStackedBar : UIView 55 | - (void)animateToFullSizeIfNecessary; 56 | @end 57 | 58 | @interface SKUIStorePageSectionsViewController:SKUIViewController 59 | { 60 | _Bool _scrollOffsetHasChanged; 61 | } 62 | @property(readonly, nonatomic) UICollectionView *collectionView; 63 | @property(readonly, nonatomic) NSArray *sections; 64 | - (void)_reloadRelevantEntityProviders; 65 | - (void)_reloadCollectionView; 66 | - (void)_prefetchArtworkForVisibleSections; 67 | - (SKUIStackedBar *)SKUIStackedBar; 68 | -(void)collectionView:(id)arg1 didSelectItemAtIndexPath:(id)arg2 ; 69 | @end 70 | 71 | @interface SKUIStackDocumentViewController : SKUIViewController 72 | @property(readonly, nonatomic) SKUIStorePageSectionsViewController *sectionsViewController; 73 | @end 74 | 75 | @interface SKUIGridViewElementPageSection : NSObject 76 | @end 77 | 78 | @interface SKUIDocumentContainerViewController: SKUIViewController 79 | - (id)childViewController; 80 | @end 81 | 82 | @interface SUStorePageViewController: UIViewController 83 | @end 84 | 85 | @interface SKUIAccountButtonsView : UIView 86 | @property(readonly, nonatomic) UIButton *appleIDButton; 87 | @end 88 | 89 | @interface SKUIAccountButtonsViewController:UIViewController 90 | - (void)_signOut; 91 | @end 92 | 93 | @interface SKUIItemOfferButton : UIControl 94 | @property (assign,nonatomic) id delegate; 95 | @end 96 | 97 | @interface SKUICardViewElement : NSObject 98 | @property(readonly, retain, nonatomic) NSDictionary *attributes; 99 | @end 100 | 101 | @interface SKUITabBarController:UITabBarController 102 | @end 103 | 104 | @interface SKUISearchFieldController : NSObject 105 | @property (nonatomic,readonly) UIViewController * contentsController; 106 | @property (nonatomic,readonly) UISearchBar * searchBar; 107 | -(void)searchBar:(id)arg1 textDidChange:(id)arg2 ; 108 | -(void)searchBarSearchButtonClicked:(id)arg1 ; 109 | @end 110 | 111 | @interface SKUISegmentedControlViewElementController : NSObject 112 | @property (nonatomic,readonly) UIView * segmentedControlView; 113 | -(void)segmentedControl:(id)arg1 didSelectSegmentIndex:(long long)arg2 ; 114 | @end 115 | 116 | #endif /* AppStoreHeader_h */ 117 | -------------------------------------------------------------------------------- /AppleAccountModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppleAccountModel.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppleAccountModel : NSObject 12 | @property (nonatomic, strong) NSString *lotoid; 13 | @property (nonatomic, strong) NSArray *appids; 14 | @property (nonatomic, strong) NSString *serial; 15 | @property (nonatomic, strong) NSString *ECID; 16 | @property (nonatomic, strong) NSString *IMEI; 17 | @property (nonatomic, strong) NSString *wifiMac; 18 | @property (nonatomic, strong) NSString *bluetoothMac; 19 | @property (nonatomic, strong) NSString *uuid; 20 | @property (nonatomic, strong) NSString *appleid; 21 | @property (nonatomic, strong) NSString *applepwd; 22 | @property (nonatomic, assign) NSInteger status; 23 | @property (nonatomic, assign) long long holdingtime; 24 | @property (nonatomic, strong) NSString *devicename; 25 | @property (nonatomic, strong) NSArray *ratedAppids; 26 | @property (nonatomic, strong) NSArray *ratingAppids; 27 | 28 | + (AppleAccountModel *)itemWithDictionary:(NSDictionary *)dic; 29 | - (id)toDictionary; 30 | @end 31 | -------------------------------------------------------------------------------- /AppleAccountModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppleAccountModel.m 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import "AppleAccountModel.h" 10 | 11 | @implementation AppleAccountModel 12 | + (AppleAccountModel *)itemWithDictionary:(NSDictionary *)dic 13 | { 14 | AppleAccountModel *account = [[AppleAccountModel alloc] init]; 15 | account.serial = [dic objectForKey:@"sn"]; 16 | account.ECID = [dic objectForKey:@"ecid"]; 17 | account.IMEI = [dic objectForKey:@"imei"]; 18 | account.wifiMac = [dic objectForKey:@"wifiMac"]; 19 | account.bluetoothMac = [dic objectForKey:@"bluetoothMac"]; 20 | account.uuid = [dic objectForKey:@"uuid"]; 21 | account.appleid = [dic objectForKey:@"appleid"]; 22 | account.applepwd = [dic objectForKey:@"applepwd"]; 23 | account.lotoid = [dic objectForKey:@"_id"]; 24 | account.appids = [dic objectForKey:@"appids"]; 25 | account.status = [[dic objectForKey:@"status"] integerValue]; 26 | account.holdingtime = [[dic objectForKey:@"holdingtime"] longLongValue]; 27 | account.devicename = [dic objectForKey:@"deviceName"]; 28 | account.ratedAppids = [dic objectForKey:@"rateAppids"]; 29 | account.ratingAppids = [dic objectForKey:@"ratingAppids"]; 30 | return account; 31 | } 32 | 33 | - (id)toDictionary 34 | { 35 | NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 36 | if (self.serial) { 37 | [dict setObject:self.serial forKey:@"sn"]; 38 | } 39 | if (self.ECID) { 40 | [dict setObject:self.ECID forKey:@"ecid"]; 41 | } 42 | if (self.IMEI){ 43 | [dict setObject:self.IMEI forKey:@"imei"]; 44 | } 45 | if (self.wifiMac) { 46 | [dict setObject:self.wifiMac forKey:@"wifiMac"]; 47 | } 48 | if (self.bluetoothMac) { 49 | [dict setObject:self.bluetoothMac forKey:@"bluetoothMac"]; 50 | } 51 | if (self.uuid) { 52 | [dict setObject:self.uuid forKey:@"uuid"]; 53 | } 54 | if (self.appleid) { 55 | [dict setObject:self.appleid forKey:@"appleid"]; 56 | } 57 | if (self.applepwd) { 58 | [dict setObject:self.applepwd forKey:@"applepwd"]; 59 | } 60 | if (self.appids){ 61 | [dict setObject:self.appids forKey:@"appids"]; 62 | } 63 | if (self.ratedAppids){ 64 | [dict setObject:self.ratedAppids forKey:@"rateAppids"]; 65 | } 66 | if (self.ratingAppids){ 67 | [dict setObject:self.ratingAppids forKey:@"ratingAppids"]; 68 | } 69 | if (self.lotoid){ 70 | [dict setObject:self.lotoid forKey:@"_id"]; 71 | } 72 | return dict; 73 | } 74 | @end 75 | -------------------------------------------------------------------------------- /Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.private.mobileinstall.allowedSPI 6 | 7 | Install 8 | Browse 9 | Uninstall 10 | Archive 11 | RemoveArchive 12 | UninstallForLaunchServices 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ImportHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // ImportHeader.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #ifndef ImportHeader_h 10 | #define ImportHeader_h 11 | 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import "RankAppModel.h" 21 | #import "AppStoreHeader.h" 22 | #import "SpringBoardHeader.h" 23 | #import "AppleAccountModel.h" 24 | #import "RateModel.h" 25 | 26 | #endif /* ImportHeader_h */ 27 | -------------------------------------------------------------------------------- /LotoDeviceManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // LotoDeviceManager.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import "ImportHeader.h" 10 | 11 | @interface LotoDeviceManager : NSObject 12 | 13 | + (LotoDeviceManager *)sharedInstance; 14 | - (NSString *)currentuserobject:(NSString *)key; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /LotoDeviceManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // LotoDeviceManager.m 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import "LotoDeviceManager.h" 10 | 11 | @implementation LotoDeviceManager 12 | + (LotoDeviceManager *)sharedInstance 13 | { 14 | static id _sharedInstance = nil; 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | _sharedInstance = [[LotoDeviceManager alloc] init]; 18 | }); 19 | return _sharedInstance; 20 | } 21 | - (NSString *)currentuserobject:(NSString *)key 22 | { 23 | NSString *totalstring = nil; 24 | NSString *txtPath = @"/var/mobile/Media/AppRank/currentuser.plist"; 25 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:txtPath]; 26 | if (dic != nil) 27 | { 28 | NSString *fileguid = [dic objectForKey:key]; 29 | if (fileguid != nil) 30 | { 31 | totalstring = fileguid; 32 | } 33 | } 34 | return totalstring; 35 | } 36 | @end 37 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | export TARGET_CODESIGN_FLAGS="-SEntitlements.plist" 2 | export ARCHS = armv7 arm64 3 | export TARGET=iphone:10.3:7.0 4 | THEOS_DEVICE_IP=10.0.1.80 5 | ARCHS = arm64 6 | include $(THEOS)/makefiles/common.mk 7 | 8 | TWEAK_NAME = AppRank 9 | AppRank_FILES = Tweak.xm RankAppModel.m AppleAccountModel.m RankManager.m SBAutoManager.m LotoDeviceManager.m RateModel.m 10 | AppRank_FRAMEWORKS = Foundation UIKit CoreGraphics CoreFoundation 11 | AppRank_PRIVATE_FRAMEWORKS = MobileCoreServices 12 | 13 | include $(THEOS_MAKE_PATH)/tweak.mk 14 | after-install:: 15 | install.exec "killall -9 AppStore & killall -9 itunesstored & killall -9 SpringBoard & killall -9 itunescloudd & killall -9 storebookkeeperd & killall -9 akd" 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # YCStoreRank 2 | 3 | Only works for jailbreak iOS. 4 | 5 | Only test for iOS 8, iOS 9, iOS 10 6 | 7 | 本项目仅用于iOS越狱开发学习和参考 -------------------------------------------------------------------------------- /RankAppModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // RankAppModel.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface RankAppModel : NSObject 13 | 14 | @property (nonatomic, strong) NSString *taskID; 15 | @property (nonatomic, strong) NSString *searchAppID; 16 | @property (nonatomic, strong) NSString *bundldID; 17 | @property (nonatomic, assign) BOOL allowCloudDownload; 18 | @property (nonatomic, strong) NSString *searchTerms; 19 | // @property (nonatomic, strong) NSArray *currentSearchTerms; 20 | @property (nonatomic, strong) NSArray *moreKeywords; 21 | @property (nonatomic, assign) BOOL shouldOpen; 22 | @property (nonatomic, assign) NSInteger workType; 23 | 24 | + (RankAppModel *)itemWithDictionary:(NSDictionary *)dic; 25 | - (id)toDictionary; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /RankAppModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // RankAppModel.m 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import "RankAppModel.h" 10 | 11 | @implementation RankAppModel 12 | 13 | + (RankAppModel *)itemWithDictionary:(NSDictionary *)dic 14 | { 15 | RankAppModel *rank = [[RankAppModel alloc] init]; 16 | rank.taskID = [dic objectForKey:@"_id"]; 17 | rank.searchTerms = [dic objectForKey:@"searchterms"]; 18 | // rank.currentSearchTerms = [dic objectForKey:@"currentSearchTerms"]; 19 | id appid = [dic objectForKey:@"appid"]; 20 | if ([appid isKindOfClass:[NSNumber class]]) 21 | rank.searchAppID = [NSString stringWithFormat:@"%@",appid]; 22 | else 23 | rank.searchAppID = appid; 24 | rank.bundldID = [dic objectForKey:@"bundleid"]; 25 | rank.allowCloudDownload = [[dic objectForKey:@"allowcloud"] boolValue]; 26 | rank.moreKeywords = [dic objectForKey:@"morekeywords"]; 27 | rank.shouldOpen = [[dic objectForKey:@"open"] boolValue]; 28 | rank.workType = [[dic objectForKey:@"type"] integerValue]; 29 | return rank; 30 | } 31 | - (id)toDictionary 32 | { 33 | NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 34 | if (self.taskID){ 35 | [dict setObject:self.taskID forKey:@"_id"]; 36 | } 37 | if (self.searchTerms) { 38 | [dict setObject:self.searchTerms forKey:@"searchterms"]; 39 | } 40 | if (self.searchAppID) { 41 | [dict setObject:self.searchAppID forKey:@"appid"]; 42 | } 43 | if (self.bundldID){ 44 | [dict setObject:self.bundldID forKey:@"bundleid"]; 45 | } 46 | if (self.moreKeywords) { 47 | [dict setObject:self.moreKeywords forKey:@"morekeywords"]; 48 | } 49 | // if (self.currentSearchTerms){ 50 | // [dict setObject:self.currentSearchTerms forKey:@"currentSearchTerms"]; 51 | // } 52 | [dict setObject:@(self.allowCloudDownload) forKey:@"allowcloud"]; 53 | [dict setObject:@(self.shouldOpen) forKey:@"open"]; 54 | [dict setObject:@(self.workType) forKey:@"type"]; 55 | return dict; 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /RankManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // RankManager.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import "ImportHeader.h" 10 | 11 | @interface RankManager : NSObject 12 | + (RankManager *)sharedInstance; 13 | @property (nonatomic, strong) UITabBarController *tabBarVc; 14 | @property (nonatomic, strong) UISearchBar *searchBar; 15 | @property (nonatomic, strong) UILabel *statusLabel; 16 | @property (nonatomic, strong) UINavigationController *naviVC; 17 | @property (nonatomic, strong) NSMutableArray *appLists; 18 | @property (nonatomic, strong) RankAppModel *currentapp; 19 | @property (nonatomic, assign) float progress; 20 | @property (nonatomic, strong) UIButton *appleIDButton; 21 | @property (nonatomic, assign) NSInteger signcount; 22 | @property (nonatomic, assign) NSInteger signoutcount; 23 | @property (nonatomic, strong) SKUIAccountButtonsViewController *accountVC; 24 | @property (nonatomic, assign) NSInteger progresscount; 25 | @property (nonatomic, assign) BOOL bSkip; 26 | // @property (nonatomic, strong) NSString *currentSearchText; 27 | @property (nonatomic, assign) BOOL bHaveCloud; 28 | @property (nonatomic, assign) BOOL bDoAppInfoDownload; 29 | @property (nonatomic, assign) BOOL bLoadFeaturePage; 30 | @property (nonatomic, assign) NSInteger keywodIndex; 31 | @property (nonatomic, strong) SKUIStorePageSectionsViewController *currentVC; 32 | @property (nonatomic, assign) BOOL bInAppInfoPage; 33 | @property (nonatomic, assign) NSInteger searchResults; 34 | @property (nonatomic, assign) NSInteger commonResultsCount; 35 | @property (nonatomic, assign) BOOL bCheckSignin; 36 | @property (nonatomic, assign) BOOL bCheckSignout; 37 | @property (nonatomic, assign) BOOL bCheckProgress; 38 | @property (nonatomic, strong) AppleAccountModel *currentAccount; 39 | @property (nonatomic, assign) BOOL bDownloadSuccess; 40 | @property (nonatomic, assign) NSInteger searchLoadCount; 41 | @property (nonatomic, strong) RateModel *currentRate; 42 | @property (nonatomic, assign) BOOL haveSearchCellBtn; 43 | @property (nonatomic, assign) BOOL bSelectedReview; 44 | @property (nonatomic, assign) BOOL bInDownloading; 45 | @property (nonatomic, strong) NSArray *disableAccounts; 46 | // @property (nonatomic, strong) SKUISearchFieldController *searchVC; 47 | // @property (nonatomic, assign) BOOL bSendRequest; 48 | 49 | - (NSString *)queryDictionaryToString:(NSDictionary *)dic; 50 | - (void)getUserFromServer:(BOOL)bHaveDeviceName complete:(void (^)(id responseObject, NSError *error))complete; 51 | - (void)changeUserInfo:(NSDictionary *)para bSuccess:(BOOL)bsuccess complete:(void (^)(id responseObject, NSError *error))complete; 52 | - (void)writeErrorAccout:(NSString *)alerttitle; 53 | - (void)writeLog:(NSString *)logString; 54 | - (void)flagErrorAccount:(NSInteger)status complete:(void (^)())complete; 55 | - (void)checksigninstatues; 56 | - (void)checksignoutstatues; 57 | - (void)completesignout; 58 | - (void)removeAppStoreFile; 59 | - (void)checkProgressStatues; 60 | - (void)setupProgressTimer; 61 | - (id)getchildViewController; 62 | - (BOOL)bSearchDidLoaded:(id)childVC; 63 | - (UICollectionViewCell *)getAppInfoPageDownloadCell; 64 | - (UIView *)getOfferViewFromCell:(UICollectionViewCell *)cell; 65 | - (SKUIItemOfferButton *)getOfferButtonFromOfferView:(UIView *)offerview; 66 | - (BOOL)checkIsOpen; 67 | - (BOOL)checkIsCloud; 68 | - (void)doAppInfoPageDownload; 69 | - (void)doReview; 70 | - (void)doTouchWriteReview; 71 | - (void)doDownload; 72 | - (NSString *)newNickName; 73 | - (NSString *)getNickName; 74 | - (void)allowCloudDownloadDo:(SKUIItemOfferButton *)skbtn withOfferView:(UIView *)offerview; 75 | - (void)checkIsCloudToDownload:(SKUIItemOfferButton *)skbtn withOfferView:(UIView *)offerview; 76 | - (NSArray *)getViewElements:(SKUIStorePageSectionsViewController *)skpagesectionVC; 77 | - (void)searchListDoTotalApp; 78 | - (void)doSearchCell:(SKUIStorePageSectionsViewController *)skpagesectionVC; 79 | - (void)doScrollBottom:(SKUIStorePageSectionsViewController *)skpagesectionVC; 80 | - (void)reloadSearchData:(SKUIStorePageSectionsViewController *)skpagesectionVC; 81 | - (void)doGetError; 82 | - (void)completeDownload; 83 | - (void)completeReview; 84 | - (void)begainSearch; 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /RankManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // RankManager.m 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import "RankManager.h" 10 | 11 | static BOOL doRate = NO; 12 | static BOOL doReview = NO; 13 | 14 | @implementation RankManager 15 | 16 | + (RankManager *)sharedInstance 17 | { 18 | static id _sharedInstance = nil; 19 | static dispatch_once_t onceToken; 20 | dispatch_once(&onceToken, ^{ 21 | _sharedInstance = [[RankManager alloc] init]; 22 | }); 23 | return _sharedInstance; 24 | } 25 | 26 | - (instancetype)init 27 | { 28 | if (self = [super init]) { 29 | NSLog(@"----------------RankManager init----------------"); 30 | self.disableAccounts = [NSArray arrayWithContentsOfFile:@"/var/mobile/Media/AppRank/disableaccount.plist"]; 31 | } 32 | return self; 33 | } 34 | 35 | - (NSString *)queryDictionaryToString:(NSDictionary *)dic 36 | { 37 | NSString *requestBody = @""; 38 | NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(compare:)]; 39 | for (id nestedKey in [dic.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { 40 | id nestedValue = dic[nestedKey]; 41 | if (nestedValue) { 42 | if (requestBody.length > 0) 43 | requestBody = [NSString stringWithFormat:@"%@&%@=%@",requestBody,nestedKey,nestedValue]; 44 | else 45 | requestBody = [NSString stringWithFormat:@"%@=%@",nestedKey,nestedValue]; 46 | } 47 | } 48 | return requestBody; 49 | } 50 | 51 | - (void)getUserFromServer:(BOOL)bHaveDeviceName complete:(void (^)(id responseObject, NSError *error))complete 52 | { 53 | NSString *baseURL = @"http://10.0.1.11:8088/tasks/fetch?"; 54 | if (doRate) 55 | { 56 | baseURL = @"http://10.0.1.11:8088/rating/fetch?"; 57 | } 58 | else if(doReview) 59 | { 60 | baseURL = @"http://10.0.1.11:8088/rates/fetch?"; 61 | } 62 | 63 | NSString *urlString = [NSString stringWithFormat:@"%@country=%@",baseURL,@"US"]; 64 | if (bHaveDeviceName) 65 | { 66 | NSString* userPhoneName = [[UIDevice currentDevice] name]; 67 | urlString = [NSString stringWithFormat:@"%@country=%@&deviceName=%@", baseURL, @"US",userPhoneName]; 68 | } 69 | NSLog(@"-----getUserFromServer:%@",urlString); 70 | NSURL *url = [NSURL URLWithString:urlString]; 71 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60]; 72 | NSURLSession *session = [NSURLSession sharedSession]; 73 | NSURLSessionTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { 74 | dispatch_async(dispatch_get_main_queue(), ^{ 75 | if (error) 76 | { 77 | NSLog(@"error:%@", error.localizedDescription); 78 | if (complete) { 79 | complete(nil,error); 80 | } 81 | } 82 | else 83 | { 84 | NSError *errorJson = nil; 85 | id object = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&errorJson]; 86 | NSLog(@"success:%@",object); 87 | if (complete) { 88 | complete(object,errorJson); 89 | } 90 | } 91 | }); 92 | }]; 93 | [task resume]; 94 | } 95 | 96 | - (void)changeUserInfo:(NSDictionary *)para bSuccess:(BOOL)bsuccess complete:(void (^)(id responseObject, NSError *error))complete 97 | { 98 | NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:@{@"user":para}]; 99 | if (bsuccess) 100 | { 101 | NSDictionary *task = @{@"_id":self.currentapp.taskID}; 102 | [dic setObject:task forKey:@"task"]; 103 | if (self.currentapp.workType == 1) 104 | { 105 | NSDictionary *task = @{@"_id":self.currentRate.rateID,@"status":@(0)}; 106 | [dic setObject:task forKey:@"rate"]; 107 | } 108 | } 109 | 110 | NSLog(@"---changeUserInfo para %@",dic); 111 | NSError *jsonerror = nil; 112 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:0 error:&jsonerror]; 113 | if (jsonerror) { 114 | NSLog(@"%@",jsonerror); 115 | if (complete) { 116 | complete(nil,jsonerror); 117 | } 118 | return; 119 | } 120 | NSString *urlString = @"http://10.0.1.11:8088/tasks/update"; 121 | if (self.currentapp.workType == 1) 122 | { 123 | urlString = @"http://10.0.1.11:8088/rates/update"; 124 | } 125 | else if (self.currentapp.workType == 2) 126 | { 127 | urlString = @"http://10.0.1.11:8088/rating/update"; 128 | } 129 | NSURL *url = [NSURL URLWithString:urlString]; 130 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60]; 131 | request.HTTPMethod = @"PUT"; 132 | request.HTTPBody = jsonData; 133 | [request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; 134 | NSURLSession *session = [NSURLSession sharedSession]; 135 | NSURLSessionTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { 136 | dispatch_async(dispatch_get_main_queue(), ^{ 137 | if (error) 138 | { 139 | NSLog(@"error:%@", error.localizedDescription); 140 | if (complete) { 141 | complete(nil,error); 142 | } 143 | } 144 | else 145 | { 146 | NSError *errorJson = nil; 147 | id object = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&errorJson]; 148 | NSLog(@"success:%@ error:%@",object,errorJson); 149 | if (complete) { 150 | complete(object,errorJson); 151 | } 152 | } 153 | }); 154 | }]; 155 | [task resume]; 156 | } 157 | 158 | - (void)writeErrorAccout:(NSString *)alerttitle 159 | { 160 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 161 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; 162 | NSString *strDate = [dateFormatter stringFromDate:[NSDate date]]; 163 | NSString *filePath = @"/var/mobile/Media/AppRank/erroraccount.txt"; 164 | NSError *error = nil; 165 | NSString *string = [[NSString alloc] initWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&error]; 166 | NSString *jsonStr = [NSString stringWithFormat:@"%@: %@ %@",strDate,self.currentAccount.appleid,alerttitle]; 167 | jsonStr = [jsonStr stringByAppendingString:@",\n"]; 168 | string = [string stringByAppendingString:jsonStr]; 169 | [string writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:&error]; 170 | } 171 | 172 | - (void)writeLog:(NSString *)logString 173 | { 174 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 175 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; 176 | NSString *strDate = [dateFormatter stringFromDate:[NSDate date]]; 177 | NSString *filePath = @"/var/mobile/Media/AppRank/appranklogs.txt"; 178 | NSError *error = nil; 179 | NSString *string = [[NSString alloc] initWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&error]; 180 | NSString *jsonStr = @""; 181 | if (self.keywodIndex < self.currentapp.moreKeywords.count) 182 | { 183 | NSString *keyword = [self.currentapp.moreKeywords objectAtIndex:self.keywodIndex]; 184 | jsonStr = [NSString stringWithFormat:@"%@: keyword:%@ %@",strDate,keyword,logString]; 185 | } 186 | else 187 | { 188 | jsonStr = [NSString stringWithFormat:@"%@: keyword:%@ %@",strDate,self.currentapp.searchTerms,logString]; 189 | } 190 | jsonStr = [jsonStr stringByAppendingString:@",\n"]; 191 | string = [string stringByAppendingString:jsonStr]; 192 | if(![string writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:&error]) 193 | { 194 | NSLog(@"writeLog error:%@",error); 195 | } 196 | } 197 | 198 | - (void)flagErrorAccount:(NSInteger)status complete:(void (^)())complete 199 | { 200 | NSMutableDictionary *dic = [NSMutableDictionary dictionary]; 201 | [dic setObject:@"0" forKey:@"holdingtime"]; 202 | [dic setObject:self.currentAccount.appleid forKey:@"appleid"]; 203 | [dic setObject:@(status) forKey:@"status"]; 204 | if (self.currentAccount.devicename == nil) 205 | { 206 | NSString* userPhoneName = [[UIDevice currentDevice] name]; 207 | [dic setObject:userPhoneName forKey:@"deviceName"]; 208 | } 209 | [self changeUserInfo:dic bSuccess:NO complete:^(id responseObject, NSError *error) { 210 | NSString *status = [responseObject objectForKey:@"status"]; 211 | if (error == nil && [status isEqualToString:@"ok"]) 212 | { 213 | NSString *logString = [NSString stringWithFormat:@"%@ error account changeUserInfo success",self.currentAccount.appleid]; 214 | [self writeLog:logString]; 215 | } 216 | else if (error == nil) 217 | { 218 | NSString *logString = [NSString stringWithFormat:@"%@ error account changeUserInfo fail %@",self.currentAccount.appleid,responseObject[@"message"]]; 219 | [self writeLog:logString]; 220 | } 221 | else 222 | { 223 | NSString *logString = [NSString stringWithFormat:@"%@ error account changeUserInfo fail %@",self.currentAccount.appleid,error.localizedDescription]; 224 | [self writeLog:logString]; 225 | } 226 | if (complete) 227 | { 228 | complete(); 229 | } 230 | }]; 231 | } 232 | 233 | - (void)checksigninstatues 234 | { 235 | self.bCheckSignin = YES; 236 | NSString *btnTitle = self.appleIDButton.titleLabel.text; 237 | if (![btnTitle isEqualToString:@"Sign In"]) 238 | { 239 | self.statusLabel.text = [NSString stringWithFormat:@"sign in success %@",btnTitle]; 240 | UITabBarController *tabbar = (UITabBarController*)self.tabBarVc; 241 | tabbar.selectedIndex = 3; 242 | self.keywodIndex = 0; 243 | self.bCheckSignin = NO; 244 | [self performSelector:@selector(begainSearch) withObject:nil afterDelay:5.0f]; 245 | } 246 | else if(self.signcount > 50) 247 | { 248 | NSString *logString = [NSString stringWithFormat:@"%@ signin failed",self.currentAccount.appleid]; 249 | [self writeLog:logString]; 250 | self.statusLabel.text = [NSString stringWithFormat:@"sign in failed %@",self.currentAccount.appleid]; 251 | self.signcount = 0; 252 | self.bCheckSignin = NO; 253 | [self writeErrorAccout:@"sign in failed"]; 254 | [self signError]; 255 | } 256 | else 257 | { 258 | self.signcount ++; 259 | self.statusLabel.text = [NSString stringWithFormat:@"chek signin %ld",(long)self.signcount]; 260 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 261 | NSString *alert = [[NSString alloc] initWithContentsOfFile:txtPath encoding:NSUTF8StringEncoding error:nil]; 262 | alert = [alert stringByReplacingOccurrencesOfString:@"\r" withString:@""]; 263 | alert = [alert stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 264 | if ([alert isEqualToString:@"Apple ID Verification"] || [alert isEqualToString:@"Verification Failed"]) 265 | { 266 | self.signcount = 0; 267 | NSString *text = @""; 268 | [text writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 269 | [self flagErrorAccount:2 complete:^{ 270 | [self writeErrorAccout:@"Login Verification Failed"]; 271 | [self signError]; 272 | }]; 273 | } 274 | else 275 | { 276 | NSLog(@"sigin alert---%@",alert); 277 | [self performSelector:@selector(checksigninstatues) withObject:nil afterDelay:5]; 278 | } 279 | } 280 | } 281 | - (void)checksignoutstatues 282 | { 283 | self.bCheckSignout = YES; 284 | NSString *btnTitle = self.appleIDButton.titleLabel.text; 285 | if ([btnTitle isEqualToString:@"Sign In"]) 286 | { 287 | self.signoutcount = 0; 288 | self.statusLabel.text = @"sign out success"; 289 | self.bCheckSignout = NO; 290 | [self performSelector:@selector(completesignout) withObject:nil afterDelay:2]; 291 | } 292 | else if (self.signoutcount > 30) 293 | { 294 | NSString *logString = [NSString stringWithFormat:@"%@ checksignoutstatues failed",self.currentAccount.appleid]; 295 | [self writeLog:logString]; 296 | self.statusLabel.text = [NSString stringWithFormat:@"sign out failed %@",btnTitle]; 297 | self.signoutcount = 0; 298 | self.bCheckSignout = NO; 299 | [self performSelector:@selector(completesignout) withObject:nil afterDelay:2]; 300 | } 301 | else 302 | { 303 | self.signoutcount++; 304 | [self performSelector:@selector(checksignoutstatues) withObject:nil afterDelay:5]; 305 | } 306 | } 307 | 308 | - (void)signError 309 | { 310 | self.bLoadFeaturePage = NO; 311 | NSString *autoPath = @"/var/mobile/Media/AppRank/auto.txt"; 312 | NSString *startString = @"done"; 313 | [startString writeToFile:autoPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 314 | exit(0); 315 | } 316 | 317 | - (void)completesignout 318 | { 319 | // [self removeAppStoreFile]; 320 | self.bLoadFeaturePage = NO; 321 | if (self.currentapp.workType == 1 || self.currentapp.workType == 2) 322 | { 323 | notify_post("com.lotogram.doratedelaytime"); 324 | } 325 | else if (self.currentapp.workType == 0) 326 | { 327 | // notify_post("com.lotogram.appstorechangedeviceinfo"); 328 | 329 | NSString *autoPath = @"/var/mobile/Media/AppRank/auto.txt"; 330 | NSString *startString = @"done"; 331 | [startString writeToFile:autoPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 332 | } 333 | exit(0); 334 | } 335 | 336 | - (void)removeAppStoreFile 337 | { 338 | NSInteger logoutcount = [[[NSUserDefaults standardUserDefaults] objectForKey:@"LotoLogoutCount"] integerValue]; 339 | if (logoutcount < 500) 340 | { 341 | logoutcount = logoutcount + 1; 342 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:logoutcount] forKey:@"LotoLogoutCount"]; 343 | return; 344 | } 345 | [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:0] forKey:@"LotoLogoutCount"]; 346 | NSError *error = nil; 347 | if([[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/com.apple.itunesstored" error:&error]) 348 | { 349 | [[NSUserDefaults standardUserDefaults] setObject:@(2) forKey:@"bRemoveiTunesFile"]; 350 | [self writeLog:@"removeAppStoreFile com.apple.itunesstored remove success"]; 351 | NSLog(@"removeAppStoreFile com.apple.itunesstored remove success"); 352 | notify_post("com.lotogram.appstoredeleteitunesstoredfile"); 353 | } 354 | else 355 | { 356 | NSString *logString = [NSString stringWithFormat:@"removeAppStoreFile com.apple.itunesstored remove failed %@",error]; 357 | [self writeLog:logString]; 358 | NSLog(@"removeAppStoreFile com.apple.itunesstored remove failed %@",error); 359 | } 360 | // error = nil; 361 | // if ([[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/com.apple.nsurlsessiond" error:&error]) 362 | // { 363 | // [self writeLog:@"removeAppStoreFile com.apple.nsurlsessiond remove success"]; 364 | // NSLog(@"removeAppStoreFile com.apple.nsurlsessiond remove success"); 365 | // } 366 | // else 367 | // { 368 | // NSString *logString = [NSString stringWithFormat:@"removeAppStoreFile com.apple.nsurlsessiond remove failed %@",error]; 369 | // [self writeLog:logString]; 370 | // NSLog(@"removeAppStoreFile com.apple.nsurlsessiond remove failed %@",error); 371 | // } 372 | 373 | // error = nil; 374 | 375 | // if ([[NSFileManager defaultManager] moveItemAtPath:@"/var/mobile/Media/AppRank/com.apple.itunesstored" toPath:@"/var/mobile/Library" error:&error]) 376 | // { 377 | // [self writeLog:@"move appstore file com.apple.itunesstored success"]; 378 | // NSLog(@"move appstore file com.apple.itunesstored success"); 379 | // } 380 | // else 381 | // { 382 | // NSString *logString = [NSString stringWithFormat:@"move appstore file com.apple.itunesstored failed %@",error]; 383 | // [self writeLog:logString]; 384 | // NSLog(@"move appstore file com.apple.itunesstored failed %@",error); 385 | // } 386 | 387 | // error = nil; 388 | 389 | // if ([[NSFileManager defaultManager] moveItemAtPath:@"/var/mobile/Media/AppRank/com.apple.nsurlsessiond" toPath:@"/var/mobile/Library" error:&error]) 390 | // { 391 | // [self writeLog:@"move appstore file com.apple.nsurlsessiond success"]; 392 | // NSLog(@"move appstore file com.apple.nsurlsessiond success"); 393 | // } 394 | // else 395 | // { 396 | // NSString *logString = [NSString stringWithFormat:@"move appstore file com.apple.nsurlsessiond failed %@",error]; 397 | // [self writeLog:logString]; 398 | // NSLog(@"move appstore file com.apple.nsurlsessiond failed %@",error); 399 | // } 400 | 401 | // float version = [[UIDevice currentDevice].systemVersion floatValue]; 402 | // if (version >= 10.0f) 403 | // { 404 | // [self removeSystemCacheFile]; 405 | // } 406 | // NSString *accountPath = @"/var/mobile/Library/Accounts"; 407 | // NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:accountPath]; 408 | // for (NSString *fileName in enumerator) { 409 | // error = nil; 410 | // if ([[NSFileManager defaultManager] removeItemAtPath:[accountPath stringByAppendingPathComponent:fileName] error:&error]) 411 | // { 412 | // NSLog(@"removeAppStoreFile %@ Accounts remove success",fileName); 413 | // } 414 | // else 415 | // { 416 | // NSLog(@"removeAppStoreFile %@ Accounts remove failed %@",fileName,error); 417 | // } 418 | // } 419 | } 420 | 421 | - (void)removeSystemCacheFile 422 | { 423 | NSString *DocumentsPath = @"/var/containers/Data/System"; 424 | NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:DocumentsPath]; 425 | for (NSString *fileName in enumerator) { 426 | NSString *path = [DocumentsPath stringByAppendingPathComponent:fileName]; 427 | NSString *plistPath = [path stringByAppendingPathComponent:@".com.apple.mobile_container_manager.metadata.plist"]; 428 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:plistPath]; 429 | NSString *identifyString = [dic objectForKey:@"MCMMetadataIdentifier"]; 430 | if ([identifyString isEqualToString:@"com.apple.appstored"]) 431 | { 432 | path = [path stringByAppendingPathComponent:@"Documents"]; 433 | NSDirectoryEnumerator *enumerator1 = [[NSFileManager defaultManager] enumeratorAtPath:path]; 434 | for (NSString *fileName in enumerator1) 435 | { 436 | NSError *error = nil; 437 | if ([[NSFileManager defaultManager] removeItemAtPath:[path stringByAppendingPathComponent:fileName] error:&error]) 438 | { 439 | NSLog(@"removeAppStoreFile %@ remove success",fileName); 440 | } 441 | else 442 | { 443 | NSLog(@"removeAppStoreFile %@ remove failed %@",fileName,error); 444 | } 445 | } 446 | break; 447 | } 448 | } 449 | } 450 | 451 | - (void)checkProgressStatues 452 | { 453 | self.bCheckProgress = YES; 454 | if (self.progress > 0) 455 | { 456 | self.bCheckProgress = NO; 457 | } 458 | else if (self.progresscount >= 60) 459 | { 460 | self.bCheckProgress = NO; 461 | self.tabBarVc.selectedIndex = 0; 462 | self.statusLabel.text = @"self.progresscount >= 60 pause test"; 463 | } 464 | else 465 | { 466 | self.progresscount ++; 467 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 468 | NSString *alert = [[NSString alloc] initWithContentsOfFile:txtPath encoding:NSUTF8StringEncoding error:nil]; 469 | alert = [alert stringByReplacingOccurrencesOfString:@"\r" withString:@""]; 470 | alert = [alert stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 471 | if ([alert isEqualToString:@"Apple Media Services Terms and Conditions have changed."]) 472 | { 473 | //验证 474 | NSLog(@"self.progress 验证下 %@",alert); 475 | NSString *text = @""; 476 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 477 | [text writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 478 | self.bCheckProgress = NO; 479 | } 480 | else if ([alert isEqualToString:@"Verification Failed"]) 481 | { 482 | // 483 | NSLog(@"self.progress action failed %@",alert); 484 | NSString *text = @""; 485 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 486 | [text writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 487 | self.bCheckProgress = NO; 488 | [self performSelector:@selector(doAppInfoPageDownload) withObject:nil afterDelay:0]; 489 | } 490 | else if ([alert isEqualToString:@"Verification Required"]) 491 | { 492 | NSLog(@"self.progress 帐号问题 %@",alert); 493 | //帐号问题 494 | NSString *text = @""; 495 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 496 | [text writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 497 | self.bCheckProgress = NO; 498 | [self flagErrorAccount:2 complete:^{ 499 | [self writeErrorAccout:alert]; 500 | [self doGetError]; 501 | }]; 502 | } 503 | else if([alert isEqualToString:@"Your Apple ID has been disabled."]) 504 | { 505 | NSLog(@"self.progress disabled %@",alert); 506 | //帐号问题 507 | NSString *text = @""; 508 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 509 | [text writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 510 | self.bCheckProgress = NO; 511 | [self flagErrorAccount:0 complete:^{ 512 | [self writeErrorAccout:alert]; 513 | [self doGetError]; 514 | }]; 515 | } 516 | else if([alert isEqualToString:@"Apple ID Verification"]) 517 | { 518 | NSLog(@"self.progress account %@",alert); 519 | //帐号问题 520 | NSString *text = @""; 521 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 522 | [text writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 523 | self.bCheckProgress = NO; 524 | [self flagErrorAccount:2 complete:^{ 525 | [self writeErrorAccout:@"Download Verification Failed"]; 526 | [self doGetError]; 527 | }]; 528 | } 529 | else if([alert isEqualToString:@"Cannot connect to iTunes Store"]) 530 | { 531 | NSLog(@"self.progress action failed %@",alert); 532 | NSString *text = @""; 533 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 534 | [text writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 535 | self.bCheckProgress = NO; 536 | [self performSelector:@selector(doAppInfoPageDownload) withObject:nil afterDelay:0]; 537 | } 538 | else 539 | { 540 | NSLog(@"self.progress alerttitle---%@",alert); 541 | [self performSelector:@selector(checkProgressStatues) withObject:nil afterDelay:5]; 542 | } 543 | } 544 | } 545 | 546 | - (void)setupProgressTimer 547 | { 548 | NSLog(@"---------setupProgressTimer"); 549 | NSString *text = @""; 550 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 551 | [text writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 552 | self.progress = 0; 553 | self.progresscount = 0; 554 | if (self.bCheckProgress == NO) 555 | { 556 | [self checkProgressStatues]; 557 | } 558 | else 559 | { 560 | self.statusLabel.text = @"already in checkProgress"; 561 | } 562 | } 563 | 564 | // - (void)getSearchText 565 | // { 566 | // self.currentSearchText = [[NSUserDefaults standardUserDefaults] objectForKey:@"lotokeyword"]; 567 | // NSLog(@"---keyword---currentSearchText:%@",self.currentSearchText); 568 | // if (self.currentSearchText == nil) 569 | // { 570 | // self.currentSearchText = self.currentapp.searchTerms.firstObject; 571 | // } 572 | // NSArray *keywords = self.currentapp.searchTerms; 573 | // NSInteger nextIndex = 0; 574 | // for (int i = 0; i < keywords.count; ++i) 575 | // { 576 | // NSString *keyword = keywords[i]; 577 | // if ([keyword isEqualToString:self.currentSearchText]) 578 | // { 579 | // nextIndex = i+1; 580 | // if (nextIndex >= keywords.count) 581 | // { 582 | // nextIndex = 0; 583 | // } 584 | // break; 585 | // } 586 | // } 587 | // NSString *nextKeyword = keywords[nextIndex]; 588 | // NSLog(@"---keyword---nextKeyword:%@",nextKeyword); 589 | // [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"lotokeyword"]; 590 | // [[NSUserDefaults standardUserDefaults] setObject:nextKeyword forKey:@"lotokeyword"]; 591 | // } 592 | 593 | - (id)getchildViewController 594 | { 595 | id childVC = nil; 596 | id selectedVC = self.tabBarVc.selectedViewController; 597 | if (selectedVC != nil && [selectedVC isKindOfClass:[UINavigationController class]]) 598 | { 599 | UINavigationController *naviVC = self.tabBarVc.selectedViewController; 600 | id visiVC = naviVC.visibleViewController; 601 | if (visiVC != nil) 602 | { 603 | NSString *className = NSStringFromClass([visiVC class]); 604 | if ([className isEqualToString:@"SKUIDocumentContainerViewController"]) 605 | { 606 | SKUIDocumentContainerViewController *skdocumentVC = (SKUIDocumentContainerViewController *)naviVC.visibleViewController; 607 | childVC = [skdocumentVC childViewController]; 608 | } 609 | } 610 | } 611 | return childVC; 612 | } 613 | 614 | - (BOOL)bSearchDidLoaded:(id)childVC 615 | { 616 | NSString *childClass = NSStringFromClass([childVC class]); 617 | if ([childClass isEqualToString:@"SKUIStackDocumentViewController"]) 618 | { 619 | return YES; 620 | } 621 | return NO; 622 | } 623 | 624 | - (UICollectionViewCell *)getSegmentedControlCell 625 | { 626 | SKUIStorePageSectionsViewController *skpagesectionVC = self.currentVC; 627 | if (!skpagesectionVC) 628 | { 629 | return nil; 630 | } 631 | UICollectionViewCell *segmentCell = nil; 632 | UICollectionView *collection = skpagesectionVC.collectionView; 633 | NSInteger sections = [collection numberOfSections]; 634 | for(int i=0; i 12) 1167 | { 1168 | self.searchLoadCount = 0; 1169 | [self performSelector:@selector(begainSearch) withObject:nil afterDelay:10]; 1170 | } 1171 | else 1172 | { 1173 | [self performSelector:@selector(searchListDoTotalApp) withObject:nil afterDelay:5]; 1174 | } 1175 | 1176 | } 1177 | } 1178 | 1179 | - (void)doSearchCell:(SKUIStorePageSectionsViewController *)skpagesectionVC 1180 | { 1181 | if (self.bSkip) 1182 | { 1183 | self.tabBarVc.selectedIndex = 0; 1184 | return; 1185 | } 1186 | BOOL bfindCell = NO; 1187 | NSArray *viewElements = [self getViewElements:skpagesectionVC]; 1188 | UICollectionView *collection = skpagesectionVC.collectionView; 1189 | NSInteger count = [collection numberOfItemsInSection:0]; 1190 | for (int i = 0; i < viewElements.count; i++) 1191 | { 1192 | SKUICardViewElement *cardElement = viewElements[i]; 1193 | NSDictionary *attributes = cardElement.attributes; 1194 | NSString *appid = attributes[@"data-content-id"]; 1195 | if ([appid isEqualToString:self.currentapp.searchAppID]) 1196 | { 1197 | rankIndex = i+1; 1198 | self.statusLabel.text = [NSString stringWithFormat:@"searchs %ld find %@ rank %i",(long)count,appid,i+1]; 1199 | NSLog(@"----doSearchCell---%@",self.statusLabel.text); 1200 | if (self.bSkip) 1201 | { 1202 | self.tabBarVc.selectedIndex = 0; 1203 | } 1204 | else 1205 | { 1206 | NSIndexPath *index = [NSIndexPath indexPathForRow:i inSection:0]; 1207 | if (i < count) 1208 | { 1209 | bfindCell = YES; 1210 | [collection scrollToItemAtIndexPath:index atScrollPosition:UICollectionViewScrollPositionTop animated:NO]; 1211 | self.bInAppInfoPage = YES; 1212 | if (self.keywodIndex >= self.currentapp.moreKeywords.count) 1213 | { 1214 | self.bDoAppInfoDownload = NO; 1215 | } 1216 | self.keywodIndex ++; 1217 | [collection.delegate collectionView:collection didSelectItemAtIndexPath:index]; 1218 | } 1219 | else 1220 | { 1221 | self.statusLabel.text = [NSString stringWithFormat:@"searchs i = %i count = %ld ",i,(long)count]; 1222 | } 1223 | } 1224 | break; 1225 | } 1226 | } 1227 | if (!bfindCell) 1228 | { 1229 | NSString *logString = [NSString stringWithFormat:@"%@ searchs %ld count not find %@",self.currentAccount.appleid,(long)count,self.currentapp.searchAppID]; 1230 | self.statusLabel.text = logString; 1231 | [self writeLog:logString]; 1232 | NSLog(@"----doSearchCell----%@",logString); 1233 | [self doScrollBottom:skpagesectionVC]; 1234 | } 1235 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doSearchCell:) object:skpagesectionVC]; 1236 | } 1237 | 1238 | - (void)doScrollBottom:(SKUIStorePageSectionsViewController *)skpagesectionVC 1239 | { 1240 | UICollectionView *collection = skpagesectionVC.collectionView; 1241 | NSInteger count = [collection numberOfItemsInSection:0]; 1242 | if (count < 600) 1243 | { 1244 | if (self.searchResults == count) 1245 | { 1246 | self.commonResultsCount ++; 1247 | } 1248 | else 1249 | { 1250 | self.commonResultsCount = 0; 1251 | } 1252 | 1253 | if (self.commonResultsCount > 6) 1254 | { 1255 | self.commonResultsCount = 0; 1256 | NSString *logString = [NSString stringWithFormat:@"cannot load more search results to find %@",self.currentapp.searchAppID]; 1257 | self.statusLabel.text = logString; 1258 | [self writeLog:logString]; 1259 | if (self.keywodIndex < self.currentapp.moreKeywords.count) 1260 | { 1261 | self.keywodIndex ++; 1262 | } 1263 | // else 1264 | // { 1265 | // [self getSearchText]; 1266 | // } 1267 | [self begainSearch]; 1268 | } 1269 | else 1270 | { 1271 | self.searchResults = count; 1272 | NSIndexPath *index = [NSIndexPath indexPathForRow:count-1 inSection:0]; 1273 | [collection scrollToItemAtIndexPath:index atScrollPosition:UICollectionViewScrollPositionTop animated:NO]; 1274 | CGPoint offset = collection.contentOffset; 1275 | offset.y = offset.y + 568; 1276 | [collection.delegate scrollViewWillEndDragging:collection withVelocity:CGPointMake(0, 6.3) targetContentOffset:&offset]; 1277 | [self performSelector:@selector(reloadSearchData:) withObject:skpagesectionVC afterDelay:1]; 1278 | } 1279 | } 1280 | else 1281 | { 1282 | NSString *logString = [NSString stringWithFormat:@"not find %@ over 600",self.currentapp.searchAppID]; 1283 | self.statusLabel.text = logString; 1284 | [self writeLog:logString]; 1285 | if (self.keywodIndex < self.currentapp.moreKeywords.count) 1286 | { 1287 | self.keywodIndex ++; 1288 | } 1289 | // else 1290 | // { 1291 | // [self getSearchText]; 1292 | // } 1293 | [self begainSearch]; 1294 | } 1295 | } 1296 | 1297 | - (void)reloadSearchData:(SKUIStorePageSectionsViewController *)skpagesectionVC 1298 | { 1299 | UICollectionView *collection = skpagesectionVC.collectionView; 1300 | [skpagesectionVC _reloadCollectionView]; 1301 | [skpagesectionVC _reloadRelevantEntityProviders]; 1302 | [collection reloadData]; 1303 | [self performSelector:@selector(doSearchCell:) withObject:skpagesectionVC afterDelay:1]; 1304 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(reloadSearchData:) object:skpagesectionVC]; 1305 | } 1306 | 1307 | - (void)doGetError 1308 | { 1309 | NSString *logString = [NSString stringWithFormat:@"%@ download failed progress %f",self.currentAccount.appleid,self.progress]; 1310 | [self writeLog:logString]; 1311 | self.tabBarVc.selectedIndex = 0; 1312 | } 1313 | 1314 | - (void)completeReview 1315 | { 1316 | NSString *logString = [NSString stringWithFormat:@"%@ review successfully",self.currentAccount.appleid]; 1317 | [self writeLog:logString]; 1318 | 1319 | NSMutableDictionary *dic = [NSMutableDictionary dictionary]; 1320 | if (self.currentapp.workType == 2) 1321 | { 1322 | NSMutableArray *ratingAppids = [NSMutableArray arrayWithArray:self.currentAccount.ratingAppids]; 1323 | [ratingAppids addObject:self.currentapp.searchAppID]; 1324 | [dic setObject:ratingAppids forKey:@"ratingAppids"]; 1325 | } 1326 | else if(self.currentapp.workType == 1) 1327 | { 1328 | NSMutableArray *ratedappids = [NSMutableArray arrayWithArray:self.currentAccount.ratedAppids]; 1329 | [ratedappids addObject:self.currentapp.searchAppID]; 1330 | [dic setObject:ratedappids forKey:@"rateAppids"]; 1331 | } 1332 | [dic setObject:@"0" forKey:@"holdingtime"]; 1333 | [dic setObject:self.currentAccount.appleid forKey:@"appleid"]; 1334 | [self changeUserInfo:dic bSuccess:YES complete:^(id responseObject, NSError *error) { 1335 | NSString *status = [responseObject objectForKey:@"status"]; 1336 | if (error == nil && [status isEqualToString:@"ok"]) 1337 | { 1338 | NSString *logString = [NSString stringWithFormat:@"%@ success rate changeUserInfo success",self.currentAccount.appleid]; 1339 | [self writeLog:logString]; 1340 | } 1341 | else if (error == nil) 1342 | { 1343 | NSString *logString = [NSString stringWithFormat:@"%@ success rate changeUserInfo fail %@",self.currentAccount.appleid,responseObject[@"message"]]; 1344 | [self writeLog:logString]; 1345 | } 1346 | else 1347 | { 1348 | NSString *logString = [NSString stringWithFormat:@"%@ success rate changeUserInfo fail %@",self.currentAccount.appleid,error.localizedDescription]; 1349 | [self writeLog:logString]; 1350 | } 1351 | self.tabBarVc.selectedIndex = 0; 1352 | }]; 1353 | } 1354 | 1355 | - (void)completeDownload 1356 | { 1357 | if (self.bHaveCloud) 1358 | { 1359 | NSString *logString = [NSString stringWithFormat:@"%@ redownload successfully",self.currentAccount.appleid]; 1360 | [self writeLog:logString]; 1361 | } 1362 | else 1363 | { 1364 | NSString *logString = [NSString stringWithFormat:@"%@ download successfully",self.currentAccount.appleid]; 1365 | [self writeLog:logString]; 1366 | } 1367 | NSMutableDictionary *dic = [NSMutableDictionary dictionary]; 1368 | NSMutableArray *appids = [NSMutableArray arrayWithArray:self.currentAccount.appids]; 1369 | [appids addObject:self.currentapp.searchAppID]; 1370 | [dic setObject:appids forKey:@"appids"]; 1371 | [dic setObject:@"0" forKey:@"holdingtime"]; 1372 | [dic setObject:self.currentAccount.appleid forKey:@"appleid"]; 1373 | if (self.currentAccount.devicename == nil) 1374 | { 1375 | NSString* userPhoneName = [[UIDevice currentDevice] name]; 1376 | [dic setObject:userPhoneName forKey:@"deviceName"]; 1377 | } 1378 | [self changeUserInfo:dic bSuccess:YES complete:^(id responseObject, NSError *error) { 1379 | NSString *status = [responseObject objectForKey:@"status"]; 1380 | if (error == nil && [status isEqualToString:@"ok"]) 1381 | { 1382 | NSString *logString = [NSString stringWithFormat:@"%@ success download changeUserInfo success",self.currentAccount.appleid]; 1383 | [self writeLog:logString]; 1384 | } 1385 | else if (error == nil) 1386 | { 1387 | NSString *logString = [NSString stringWithFormat:@"%@ success download changeUserInfo fail %@",self.currentAccount.appleid,responseObject[@"message"]]; 1388 | [self writeLog:logString]; 1389 | } 1390 | else 1391 | { 1392 | NSString *logString = [NSString stringWithFormat:@"%@ success download changeUserInfo fail %@",self.currentAccount.appleid,error.localizedDescription]; 1393 | [self writeLog:logString]; 1394 | } 1395 | self.tabBarVc.selectedIndex = 0; 1396 | }]; 1397 | } 1398 | 1399 | // - (void)begainSearch 1400 | // { 1401 | // if (self.searchVC) 1402 | // { 1403 | // self.searchVC.searchBar.text = @""; 1404 | // [self.searchVC searchBar:self.searchVC.searchBar textDidChange:@""]; 1405 | // [self.searchVC searchBarSearchButtonClicked:self.searchVC.searchBar]; 1406 | // } 1407 | // else 1408 | // { 1409 | // self.statusLabel.text = @"searchVC nil not find"; 1410 | // } 1411 | // } 1412 | 1413 | - (void)begainSearch 1414 | { 1415 | self.searchBar = nil; 1416 | UINavigationBar *bar = self.naviVC.navigationBar; 1417 | NSArray *barsview = [bar subviews]; 1418 | for (UIView *view in barsview) { 1419 | if ([view isKindOfClass:[UISearchBar class]]) { 1420 | UISearchBar *bar = (UISearchBar *)view; 1421 | self.searchBar = bar; 1422 | break; 1423 | } 1424 | } 1425 | if (!self.bSkip) 1426 | { 1427 | if (self.searchBar) 1428 | { 1429 | self.searchBar.text = @""; 1430 | SKUISearchFieldController *searchDelegate = (SKUISearchFieldController *)self.searchBar.delegate; 1431 | [searchDelegate searchBar:self.searchBar textDidChange:@""]; 1432 | [searchDelegate performSelector:@selector(searchBarSearchButtonClicked:) withObject:self.searchBar afterDelay:1]; 1433 | // [self.searchBar.delegate searchBarSearchButtonClicked:self.searchBar]; 1434 | [self performSelector:@selector(searchListDoTotalApp) withObject:nil afterDelay:8]; 1435 | } 1436 | else 1437 | { 1438 | self.statusLabel.text = @"searchBar nil not find"; 1439 | [self writeErrorAccout:@"not find searchBar"]; 1440 | notify_post("com.lotogram.changeappstorereopen"); 1441 | } 1442 | } 1443 | else 1444 | { 1445 | self.tabBarVc.selectedIndex = 0; 1446 | } 1447 | } 1448 | 1449 | @end 1450 | -------------------------------------------------------------------------------- /RateModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // RateModel.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/27. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RateModel : NSObject 12 | @property (nonatomic, strong) NSString *rateID; 13 | @property (nonatomic, strong) NSString *nickname; 14 | @property (nonatomic, strong) NSString *title; 15 | @property (nonatomic, strong) NSString *body; 16 | @property (nonatomic, assign) float rating; 17 | 18 | + (RateModel *)itemWithDictionary:(NSDictionary *)dic; 19 | - (id)toDictionary; 20 | + (RateModel *)testModel; 21 | @end 22 | -------------------------------------------------------------------------------- /RateModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // RateModel.m 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/27. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import "RateModel.h" 10 | 11 | @implementation RateModel 12 | + (RateModel *)itemWithDictionary:(NSDictionary *)dic 13 | { 14 | RateModel *item = [[RateModel alloc] init]; 15 | item.nickname = [dic objectForKey:@"nickname"]; 16 | 17 | NSString *title = [dic objectForKey:@"title"]; 18 | if (title.length >= 100) 19 | item.title = [title substringToIndex:99]; 20 | else 21 | item.title = title; 22 | 23 | item.rateID = [dic objectForKey:@"_id"]; 24 | 25 | NSString *body = [dic objectForKey:@"content"]; 26 | if (body.length >= 600) 27 | item.body = [body substringToIndex:599]; 28 | else 29 | item.body = body; 30 | 31 | float rating = [[dic objectForKey:@"star"] floatValue] - 1; 32 | if (rating > 4 || rating < 0) 33 | rating = 4; 34 | else 35 | item.rating = rating; 36 | return item; 37 | } 38 | 39 | + (RateModel *)testModel 40 | { 41 | RateModel *item = [[RateModel alloc] init]; 42 | item.nickname = @"stormyoverholttt"; 43 | item.title = @"nice app"; 44 | item.body = @"great app i love it"; 45 | item.rating = 4; 46 | return item; 47 | } 48 | 49 | - (id)toDictionary 50 | { 51 | NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 52 | if (self.nickname) { 53 | [dict setObject:self.nickname forKey:@"nickname"]; 54 | } 55 | if (self.title) { 56 | [dict setObject:self.title forKey:@"title"]; 57 | } 58 | if (self.body){ 59 | [dict setObject:self.body forKey:@"content"]; 60 | } 61 | if (self.rateID){ 62 | [dict setObject:self.rateID forKey:@"_id"]; 63 | } 64 | [dict setObject:[NSNumber numberWithFloat:(self.rating + 1)] forKey:@"star"]; 65 | return dict; 66 | 67 | } 68 | @end 69 | -------------------------------------------------------------------------------- /SBAutoManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // SBAutoManager.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | 10 | #import "ImportHeader.h" 11 | 12 | @interface SBAutoManager : NSObject 13 | @property (nonatomic, strong) NSMutableArray *appLists; 14 | @property (nonatomic, strong) RankAppModel *currentRankApp; 15 | @property (nonatomic, assign) BOOL bUninstall; 16 | @property (nonatomic, assign) BOOL bOpenedAppStore; 17 | @property (nonatomic, strong) NSMutableArray *accountLists; 18 | @property (nonatomic, assign) BOOL bShowAgree; 19 | @property (nonatomic, assign) BOOL bAutoCheck; 20 | @property (nonatomic, assign) BOOL bFirstOpen; 21 | @property (nonatomic, assign) BOOL bAppStoreLive; 22 | @property (nonatomic, assign) BOOL bDelayRate; 23 | 24 | + (SBAutoManager *)sharedInstance; 25 | - (void)writeLog:(NSString *)logString; 26 | - (void)checkAppStoreStatues; 27 | - (void)lotoUninstallApplication; 28 | - (void)uninstallApp:(NSString *)bundleID; 29 | - (void)openDownloadApplication; 30 | - (void)openApplication; 31 | - (void)checkAutoTxt; 32 | - (void)doContinue:(NSArray *)objectArray; 33 | - (void)alertdo:(NSArray *)alertObject; 34 | - (void)delayDoNext; 35 | - (void)randomVerifySerialNumber; 36 | 37 | @end 38 | 39 | 40 | -------------------------------------------------------------------------------- /SBAutoManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // SBAutoManager.m 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | 9 | #import "SBAutoManager.h" 10 | 11 | @implementation SBAutoManager 12 | 13 | + (SBAutoManager *)sharedInstance 14 | { 15 | static id _sharedInstance = nil; 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | _sharedInstance = [[SBAutoManager alloc] init]; 19 | }); 20 | return _sharedInstance; 21 | } 22 | 23 | - (void)writeLog:(NSString *)logString 24 | { 25 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 26 | [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; 27 | NSString *strDate = [dateFormatter stringFromDate:[NSDate date]]; 28 | NSString *filePath = @"/var/mobile/Media/AppRank/appranklogs.txt"; 29 | NSError *error = nil; 30 | NSString *string = [[NSString alloc] initWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&error]; 31 | NSString *jsonStr = [NSString stringWithFormat:@"%@: %@",strDate,logString]; 32 | jsonStr = [jsonStr stringByAppendingString:@",\n"]; 33 | string = [string stringByAppendingString:jsonStr]; 34 | if(![string writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:&error]) 35 | { 36 | NSLog(@"writeLog error:%@",error); 37 | } 38 | } 39 | 40 | - (instancetype)init 41 | { 42 | if (self = [super init]) { 43 | [self performSelector:@selector(checkAppStoreStatues) withObject:nil afterDelay:300]; 44 | NSLog(@"------------------------SBAutoManager init------------------------"); 45 | } 46 | return self; 47 | } 48 | 49 | - (void)checkAppStoreStatues 50 | { 51 | NSLog(@"---------checkAppStoreStatues-----------"); 52 | if (!self.bAppStoreLive && !self.bDelayRate) 53 | { 54 | NSLog(@"---------checkAppStoreStatues bAppStoreLive NO TO KILL-----------"); 55 | NSString *txtPath = @"/var/mobile/Media/AppRank/auto.txt"; 56 | NSString *autoString = [[NSString alloc] initWithContentsOfFile:txtPath encoding:NSUTF8StringEncoding error:nil]; 57 | autoString = [autoString stringByReplacingOccurrencesOfString:@"\r" withString:@""]; 58 | autoString = [autoString stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 59 | autoString = [autoString stringByReplacingOccurrencesOfString:@" " withString:@""]; 60 | if ([autoString isEqualToString:@"start"]) 61 | { 62 | system("killall -9 AppStore"); 63 | self.bOpenedAppStore = NO; 64 | } 65 | else 66 | { 67 | system("killall -9 AppStore"); 68 | [self performSelector:@selector(openDownloadApplication) withObject:nil afterDelay:1]; 69 | } 70 | } 71 | self.bAppStoreLive = NO; 72 | [self performSelector:@selector(checkAppStoreStatues) withObject:nil afterDelay:300]; 73 | } 74 | 75 | - (void)delayDoNext 76 | { 77 | self.bDelayRate = NO; 78 | NSString *autoPath = @"/var/mobile/Media/AppRank/auto.txt"; 79 | NSString *startString = @"done"; 80 | [startString writeToFile:autoPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 81 | } 82 | 83 | - (void)lotoUninstallApplication 84 | { 85 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 86 | NSString *bundleid = self.currentRankApp.bundldID; 87 | if (bundleid) 88 | { 89 | Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); 90 | if (LSApplicationWorkspace_class) { 91 | LSApplicationWorkspace *workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)]; 92 | if(workspace && [workspace applicationIsInstalled:bundleid]) 93 | { 94 | if([workspace uninstallApplication:bundleid withOptions:nil]) 95 | { 96 | self.bUninstall = YES; 97 | NSLog(@"-----lotoUninstallApplication uninstall success"); 98 | } 99 | else 100 | { 101 | self.bUninstall = NO; 102 | NSLog(@"-----lotoUninstallApplication uninstall failed"); 103 | } 104 | } 105 | else if (workspace) 106 | { 107 | self.bUninstall = YES; 108 | NSLog(@"-----lotoUninstallApplication not install application"); 109 | } 110 | else 111 | { 112 | self.bUninstall = NO; 113 | NSLog(@"-----Uninstall failed workspace nil"); 114 | } 115 | } 116 | else 117 | { 118 | self.bUninstall = NO; 119 | NSLog(@"-----Uninstall failed nil LSApplicationWorkspace_class"); 120 | } 121 | } 122 | else 123 | { 124 | self.bUninstall = NO; 125 | NSLog(@"-----Uninstall not find bundldID"); 126 | } 127 | }); 128 | } 129 | 130 | - (void)uninstallApp:(NSString *)bundleID 131 | { 132 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 133 | NSString *bundleid = bundleID; 134 | if (bundleid) 135 | { 136 | Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); 137 | if (LSApplicationWorkspace_class) { 138 | LSApplicationWorkspace *workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)]; 139 | if(workspace && [workspace applicationIsInstalled:bundleid]) 140 | { 141 | if([workspace uninstallApplication:bundleid withOptions:nil]) 142 | { 143 | self.bUninstall = YES; 144 | NSLog(@"-----lotoUninstallApplication uninstall success"); 145 | } 146 | else 147 | { 148 | self.bUninstall = NO; 149 | NSLog(@"-----lotoUninstallApplication uninstall failed"); 150 | } 151 | } 152 | else if (workspace) 153 | { 154 | self.bUninstall = YES; 155 | NSLog(@"-----lotoUninstallApplication not install application"); 156 | } 157 | else 158 | { 159 | self.bUninstall = NO; 160 | NSLog(@"-----Uninstall failed workspace nil"); 161 | } 162 | } 163 | else 164 | { 165 | self.bUninstall = NO; 166 | NSLog(@"-----Uninstall failed nil LSApplicationWorkspace_class"); 167 | } 168 | } 169 | else 170 | { 171 | self.bUninstall = NO; 172 | NSLog(@"-----Uninstall not find bundldID"); 173 | } 174 | }); 175 | } 176 | 177 | - (void)openDownloadApplication 178 | { 179 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 180 | NSString *bundleid = self.currentRankApp.bundldID; 181 | if (bundleid) 182 | { 183 | Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); 184 | if (LSApplicationWorkspace_class) { 185 | LSApplicationWorkspace *workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)]; 186 | if(workspace && [workspace applicationIsInstalled:bundleid]) 187 | { 188 | if([workspace openApplicationWithBundleID:bundleid]) 189 | { 190 | NSLog(@"-----openDownloadApplication success"); 191 | } 192 | else 193 | { 194 | NSLog(@"-----openDownloadApplication failed"); 195 | } 196 | } 197 | else if (workspace) 198 | { 199 | NSLog(@"-----openDownloadApplication not downloaded to open"); 200 | } 201 | else 202 | { 203 | NSLog(@"-----openDownloadApplication workspace nil"); 204 | } 205 | } 206 | else 207 | { 208 | NSLog(@"-----openDownloadApplication failed nil LSApplicationWorkspace_class"); 209 | } 210 | } 211 | else 212 | { 213 | NSLog(@"-----openDownloadApplication not find bundldID"); 214 | } 215 | }); 216 | } 217 | 218 | - (void)openApplication 219 | { 220 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 221 | Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); 222 | if (LSApplicationWorkspace_class) 223 | { 224 | LSApplicationWorkspace *workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)]; 225 | if (workspace && [workspace openApplicationWithBundleID:@"com.apple.AppStore"]) 226 | { 227 | self.bAppStoreLive = YES; 228 | NSLog(@"------openApplication Successful!"); 229 | } 230 | else 231 | { 232 | self.bAppStoreLive = NO; 233 | NSLog(@"-----openApplication failed"); 234 | } 235 | } 236 | else 237 | { 238 | self.bAppStoreLive = NO; 239 | NSLog(@"-----openApplication failed nil LSApplicationWorkspace_class"); 240 | } 241 | }); 242 | } 243 | 244 | - (void)randomVerifySerialNumber 245 | { 246 | [[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/Cookies/com.apple.itunesstored.2.sqlitedb" error:nil]; 247 | [[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/Cookies/Cookies.binarycookies" error:nil]; 248 | NSString *alphabet = @"A0B1CDEF2GHI3JKL4MN5OP6QRS7TU8VW9XYZ"; 249 | NSString *randomString = @""; 250 | for (int i = 0; i < 12; ++i) { 251 | NSUInteger j = arc4random_uniform(36); 252 | NSString *cu = [alphabet substringWithRange:NSMakeRange(j,1)]; 253 | randomString = [NSString stringWithFormat:@"%@%@",randomString,cu]; 254 | } 255 | if (randomString.length != 12) { 256 | randomString = @"D68FK8PBDG2X"; 257 | } 258 | NSError *error = nil; 259 | if(![randomString writeToFile:@"/var/mobile/Library/Preferences/deviceInfo.txt" atomically:YES encoding:NSUTF8StringEncoding error:&error]) 260 | { 261 | NSLog(@"---------------write SerialNumber failed:%@",error); 262 | } 263 | NSLog(@"randomSerialNumber:%@",randomString); 264 | system("killall -9 configd & killall -9 fairplayd.H1 & killall -9 fairplayd.H2 & killall -9 absd & killall -9 gamed & killall -9 adid & killall -9 itunesstored & killall -9 storebookkeeperd & killall -9 accountsd & killall -9 StoreKitUIService"); 265 | } 266 | 267 | - (void)checkAutoTxt 268 | { 269 | NSString *txtPath = @"/var/mobile/Media/AppRank/auto.txt"; 270 | NSString *autoString = [[NSString alloc] initWithContentsOfFile:txtPath encoding:NSUTF8StringEncoding error:nil]; 271 | autoString = [autoString stringByReplacingOccurrencesOfString:@"\r" withString:@""]; 272 | autoString = [autoString stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 273 | autoString = [autoString stringByReplacingOccurrencesOfString:@" " withString:@""]; 274 | if ([autoString isEqualToString:@"opendone"]) 275 | { 276 | self.bOpenedAppStore = NO; 277 | NSString *startString = @"openstart"; 278 | [startString writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 279 | } 280 | else if ([autoString isEqualToString:@"openstart"]) 281 | { 282 | if (self.bOpenedAppStore == NO) 283 | { 284 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Media/AppRank/applist.plist"]; 285 | self.currentRankApp = [RankAppModel itemWithDictionary:dic]; 286 | NSLog(@"checkAutoTxt:openstart"); 287 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 288 | [@"" writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 289 | self.bOpenedAppStore = YES; 290 | [self performSelector:@selector(openDownloadApplication) withObject:nil afterDelay:0]; 291 | [self performSelector:@selector(openApplication) withObject:nil afterDelay:20]; 292 | [self performSelector:@selector(lotoUninstallApplication) withObject:nil afterDelay:24]; 293 | } 294 | } 295 | else if ([autoString isEqualToString:@"done"]) 296 | { 297 | [[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/Cookies/com.apple.itunesstored.2.sqlitedb" error:nil]; 298 | [[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/Cookies/com.apple.itunesstored.binarycookies" error:nil]; 299 | [[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/Cookies/com.apple.itunesstored.2.sqlitedb-shm" error:nil]; 300 | [[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/Cookies/com.apple.itunesstored.2.sqlitedb-wal" error:nil]; 301 | [[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Library/Caches/sharedCaches" error:nil]; 302 | self.bOpenedAppStore = NO; 303 | NSString *startString = @"start"; 304 | [startString writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 305 | system("killall -9 itunesstored"); 306 | } 307 | else if ([autoString isEqualToString:@"start"]) 308 | { 309 | if (self.bOpenedAppStore == NO) 310 | { 311 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Media/AppRank/applist.plist"]; 312 | self.currentRankApp = [RankAppModel itemWithDictionary:dic]; 313 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 314 | [@"" writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 315 | self.bOpenedAppStore = YES; 316 | NSLog(@"checkAutoTxt:start"); 317 | [self openApplication]; 318 | [self lotoUninstallApplication]; 319 | } 320 | } 321 | else if ([autoString isEqualToString:@"pause"]) 322 | { 323 | NSLog(@"checkAutoTxt %@",autoString); 324 | } 325 | else if ([autoString isEqualToString:@"complete"]) 326 | { 327 | NSLog(@"checkAutoTxt %@",autoString); 328 | } 329 | if (self.bAutoCheck) 330 | { 331 | [self performSelector:@selector(checkAutoTxt) withObject:nil afterDelay:1]; 332 | } 333 | } 334 | 335 | - (void)doCreate:(NSArray *)objectArray 336 | { 337 | typedef void (^actionHandle)(UIAlertAction *action); 338 | actionHandle handle = nil; 339 | SBUserNotificationAlert *alertItem = objectArray.firstObject; 340 | UIAlertController *alert = [alertItem _alertController]; 341 | if (alert.actions.count != 3) 342 | { 343 | return; 344 | } 345 | UIAlertAction *action = alert.actions[1]; 346 | NSLog(@"do alert action title %@",action.title); 347 | unsigned int numIvars; 348 | Ivar *vars = class_copyIvarList(NSClassFromString(@"UIAlertAction"), &numIvars); 349 | NSString *key = nil; 350 | for(int i = 0; i < numIvars; i++) { 351 | Ivar thisIvar = vars[i]; 352 | key = [NSString stringWithUTF8String:ivar_getName(thisIvar)]; 353 | if ([key isEqualToString:@"_handler"]) 354 | { 355 | handle = object_getIvar(action,thisIvar); 356 | break; 357 | } 358 | } 359 | free(vars); 360 | if (handle != nil) 361 | { 362 | handle(action); 363 | } 364 | else 365 | { 366 | NSLog(@"handle nil"); 367 | } 368 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doCreate:) object:objectArray]; 369 | } 370 | 371 | - (void)doContinue:(NSArray *)objectArray 372 | { 373 | typedef void (^actionHandle)(UIAlertAction *action); 374 | actionHandle handle = nil; 375 | SBUserNotificationAlert *alertItem = objectArray.firstObject; 376 | UIAlertController *alert = [alertItem _alertController]; 377 | UIAlertAction *action = alert.actions.firstObject; 378 | if (objectArray.count == 2) 379 | { 380 | action = alert.actions.lastObject; 381 | } 382 | NSLog(@"do alert action title %@",action.title); 383 | unsigned int numIvars; 384 | Ivar *vars = class_copyIvarList(NSClassFromString(@"UIAlertAction"), &numIvars); 385 | NSString *key = nil; 386 | for(int i = 0; i < numIvars; i++) { 387 | Ivar thisIvar = vars[i]; 388 | key = [NSString stringWithUTF8String:ivar_getName(thisIvar)]; 389 | if ([key isEqualToString:@"_handler"]) 390 | { 391 | handle = object_getIvar(action,thisIvar); 392 | break; 393 | } 394 | } 395 | free(vars); 396 | if (handle != nil) 397 | { 398 | handle(action); 399 | } 400 | else 401 | { 402 | NSLog(@"handle nil"); 403 | } 404 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doContinue:) object:objectArray]; 405 | } 406 | 407 | - (void)alertdo:(NSArray *)alertObject 408 | { 409 | id signinalert = alertObject.firstObject; 410 | SBUserNotificationAlertSheet *signinalertsheet = alertObject.lastObject; 411 | NSString *alerttitle = signinalertsheet.title; 412 | NSString *logString = [NSString stringWithFormat:@"alert %@",alerttitle]; 413 | [self writeLog:logString]; 414 | if ([alerttitle isEqualToString:@"Sign In to iTunes Store"]) 415 | { 416 | NSLog(@"%@ do 1111111",alerttitle); 417 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:1]; 418 | [signinalertsheet dismissWithClickedButtonIndex:1 animated:NO]; 419 | } 420 | else if ([alerttitle isEqualToString:@"Require password for additional purchases on this device?"]) 421 | { 422 | NSLog(@"%@ do 000000",alerttitle); 423 | self.bShowAgree = NO; 424 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 425 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 426 | } 427 | else if([alerttitle isEqualToString:@"You must own this item to write a Customer Review."]) 428 | { 429 | NSLog(@"%@ do 000000",alerttitle); 430 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 431 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 432 | notify_post("com.lotogram.downloadapptoreview"); 433 | } 434 | else if([alerttitle isEqualToString:@"This nickname is taken. Enter another and try again."]) 435 | { 436 | NSLog(@"%@ do 000000",alerttitle); 437 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 438 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 439 | notify_post("com.lotogram.changenickname"); 440 | } 441 | else if ([alerttitle isEqualToString:@"Sign-In Required"]) 442 | { 443 | NSLog(@"%@ do 1111111",alerttitle); 444 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:1]; 445 | [signinalertsheet dismissWithClickedButtonIndex:1 animated:NO]; 446 | } 447 | else if ([alerttitle isEqualToString:@"Apple Media Services Terms and Conditions have changed."]) 448 | { 449 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 450 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 451 | if (self.bShowAgree == NO) 452 | { 453 | self.bShowAgree = YES; 454 | NSLog(@"%@ do 1111111",alerttitle); 455 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:1]; 456 | [signinalertsheet dismissWithClickedButtonIndex:1 animated:NO]; 457 | } 458 | else 459 | { 460 | NSLog(@"%@ do 000000",alerttitle); 461 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 462 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 463 | } 464 | } 465 | else if ([alerttitle isEqualToString:@"Verification Failed"]) 466 | { 467 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 468 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 469 | NSLog(@"%@ do 000000",alerttitle); 470 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 471 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 472 | } 473 | else if([alerttitle isEqualToString:@"Your Apple ID has been disabled."]) 474 | { 475 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 476 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 477 | NSLog(@"%@ do 000000",alerttitle); 478 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 479 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 480 | } 481 | else if([alerttitle isEqualToString:@"Verification Required"]) 482 | { 483 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 484 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 485 | NSLog(@"%@ do 000000",alerttitle); 486 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 487 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 488 | } 489 | else if([alerttitle isEqualToString:@"Apple ID Verification"]) 490 | { 491 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 492 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 493 | NSLog(@"%@ do 000000",alerttitle); 494 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 495 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 496 | } 497 | else if([alerttitle isEqualToString:@"Cannot connect to iTunes Store"]) 498 | { 499 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 500 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 501 | NSLog(@"%@ do 000000",alerttitle); 502 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 503 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 504 | } 505 | else 506 | { 507 | NSLog(@"%@ do 000000",alerttitle); 508 | [signinalert alertView:signinalertsheet clickedButtonAtIndex:0]; 509 | [signinalertsheet dismissWithClickedButtonIndex:0 animated:NO]; 510 | } 511 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(alertdo:) object:alertObject]; 512 | } 513 | 514 | @end 515 | -------------------------------------------------------------------------------- /SpringBoardHeader.h: -------------------------------------------------------------------------------- 1 | // 2 | // SpringBoardHeader.h 3 | // PageCollectionView 4 | // 5 | // Created by yecongcong on 2017/6/22. 6 | // Copyright © 2017年 lotogram. All rights reserved. 7 | // 8 | #ifndef SpringBoardHeader_h 9 | #define SpringBoardHeader_h 10 | 11 | @interface SBAlertItem : NSObject 12 | -(id)_alertController; 13 | -(id)alertController; 14 | @end 15 | 16 | @interface SBSIMLockAlertItem : SBAlertItem 17 | @end 18 | 19 | @interface SBUserNotificationAlert : SBAlertItem 20 | @property (retain) NSString * alertHeader; 21 | @property (retain) NSString * alertMessage; 22 | @property (retain) NSString * alertMessageDelimiter; 23 | @property (retain) NSString * lockScreenAlertHeader; 24 | @property (retain) NSString * lockScreenAlertMessage; 25 | @end 26 | 27 | @interface SBUserNotificationAlertSheet:UIAlertView 28 | @end 29 | 30 | @interface LSApplicationWorkspace : NSObject 31 | + (LSApplicationWorkspace *)defaultWorkspace; 32 | - (BOOL)installApplication:(NSURL *)path withOptions:(NSDictionary *)options; 33 | - (BOOL)uninstallApplication:(NSString *)identifier withOptions:(NSDictionary *)options; 34 | - (BOOL)applicationIsInstalled:(NSString *)appIdentifier; 35 | - (NSArray *)allInstalledApplications; 36 | - (NSArray *)allApplications; 37 | - (NSArray *)applicationsOfType:(unsigned int)appType; 38 | - (BOOL)openApplicationWithBundleID:(id)arg1; 39 | @end 40 | 41 | @interface LSApplicationProxy : NSObject 42 | + (LSApplicationProxy *)applicationProxyForIdentifier:(id)appIdentifier; 43 | @property(readonly) NSString * applicationIdentifier; 44 | @property(readonly) NSString * bundleVersion; 45 | @property(readonly) NSString * bundleExecutable; 46 | @property(readonly) NSArray * deviceFamily; 47 | @property(readonly) NSURL * bundleContainerURL; 48 | @property(readonly) NSString * bundleIdentifier; 49 | @property(readonly) NSURL * bundleURL; 50 | @property(readonly) NSURL * containerURL; 51 | @property(readonly) NSURL * dataContainerURL; 52 | @property(readonly) NSString * localizedShortName; 53 | @property(readonly) NSString * localizedName; 54 | @property(readonly) NSString * shortVersionString; 55 | @end 56 | 57 | @interface _UIAlertControllerShimPresenter : NSObject 58 | @property (assign,nonatomic) UIAlertController * alertController; 59 | @property (assign,nonatomic) UIAlertView * legacyAlert; 60 | @end 61 | 62 | @interface SBBacklightController : NSObject 63 | +(id)sharedInstance; 64 | -(void)cancelLockScreenIdleTimer; 65 | -(void)turnOnScreenFullyWithBacklightSource:(int)arg1 ; 66 | @end 67 | 68 | @interface SBLockScreenManager : NSObject 69 | +(id)sharedInstance; 70 | -(BOOL)attemptUnlockWithPasscode:(id)arg1; 71 | @end 72 | 73 | #endif /* SpringBoardHeader_h */ 74 | -------------------------------------------------------------------------------- /Tweak.xm: -------------------------------------------------------------------------------- 1 | #import "RankManager.h" 2 | #import "SBAutoManager.h" 3 | #import "LotoDeviceManager.h" 4 | 5 | %group WorkAppRank 6 | 7 | /*------------------------------------SpringBoard Hook------------------------------------*/ 8 | void LogEvent(CFNotificationCenterRef center, 9 | void *observer, 10 | CFStringRef name, 11 | const void *object, 12 | CFDictionaryRef userInfo) 13 | { 14 | [SBAutoManager sharedInstance].bAppStoreLive = YES; 15 | NSLog(@"-----------------------------LogEvent------------------------------"); 16 | } 17 | 18 | void rateEvent(CFNotificationCenterRef center, 19 | void *observer, 20 | CFStringRef name, 21 | const void *object, 22 | CFDictionaryRef userInfo) 23 | { 24 | [SBAutoManager sharedInstance].bDelayRate = YES; 25 | [[SBAutoManager sharedInstance] randomVerifySerialNumber]; 26 | int time = arc4random_uniform(6) + 10; 27 | float delayTime = time * 60.0f; 28 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayTime * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 29 | // system("killall -9 StoreKitUIService"); 30 | // system("killall -9 itunesstored"); 31 | [[SBAutoManager sharedInstance] delayDoNext]; 32 | }); 33 | NSLog(@"-----------------------------rateEvent------------------------------"); 34 | } 35 | 36 | void ChangeSNEvent(CFNotificationCenterRef center, 37 | void *observer, 38 | CFStringRef name, 39 | const void *object, 40 | CFDictionaryRef userInfo) 41 | { 42 | [[SBAutoManager sharedInstance] randomVerifySerialNumber]; 43 | [[SBAutoManager sharedInstance] performSelector:@selector(delayDoNext) withObject:nil afterDelay:5]; 44 | // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 45 | // // system("killall -9 StoreKitUIService"); 46 | // // system("killall -9 itunesstored"); 47 | // [[SBAutoManager sharedInstance] delayDoNext]; 48 | // }); 49 | NSLog(@"-----------------------------ChangeSNEvent------------------------------"); 50 | } 51 | 52 | void DeleteEvent(CFNotificationCenterRef center, 53 | void *observer, 54 | CFStringRef name, 55 | const void *object, 56 | CFDictionaryRef userInfo) 57 | { 58 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Media/AppRank/applist.plist"]; 59 | NSString *bundleid = [dic objectForKey:@"bundleid"]; 60 | [[SBAutoManager sharedInstance] uninstallApp:bundleid]; 61 | NSLog(@"-----------------------------DeleteEvent------------------------------"); 62 | } 63 | 64 | void itunesStoredEvent(CFNotificationCenterRef center, 65 | void *observer, 66 | CFStringRef name, 67 | const void *object, 68 | CFDictionaryRef userInfo) 69 | { 70 | system("killall -9 itunesstored"); 71 | NSLog(@"-----------------------------itunesStoredEvent------------------------------"); 72 | } 73 | 74 | void reopenEvent(CFNotificationCenterRef center, 75 | void *observer, 76 | CFStringRef name, 77 | const void *object, 78 | CFDictionaryRef userInfo) 79 | { 80 | system("killall -9 AppStore"); 81 | [[SBAutoManager sharedInstance] delayDoNext]; 82 | NSLog(@"-----------------------------reopenEvent------------------------------"); 83 | } 84 | 85 | %hook SpringBoard 86 | - (void)applicationDidFinishLaunching:(id)application 87 | { 88 | NSLog(@"---------applicationDidFinishLaunching"); 89 | CFNotificationCenterAddObserver( 90 | CFNotificationCenterGetDarwinNotifyCenter(), 91 | NULL, 92 | LogEvent, 93 | (CFStringRef)@"com.lotogram.appstore_to_springboard", 94 | NULL, 95 | CFNotificationSuspensionBehaviorCoalesce); 96 | CFNotificationCenterAddObserver( 97 | CFNotificationCenterGetDarwinNotifyCenter(), 98 | NULL, 99 | rateEvent, 100 | (CFStringRef)@"com.lotogram.doratedelaytime", 101 | NULL, 102 | CFNotificationSuspensionBehaviorCoalesce); 103 | CFNotificationCenterAddObserver( 104 | CFNotificationCenterGetDarwinNotifyCenter(), 105 | NULL, 106 | ChangeSNEvent, 107 | (CFStringRef)@"com.lotogram.appstorechangedeviceinfo", 108 | NULL, 109 | CFNotificationSuspensionBehaviorCoalesce); 110 | 111 | CFNotificationCenterAddObserver( 112 | CFNotificationCenterGetDarwinNotifyCenter(), 113 | NULL, 114 | DeleteEvent, 115 | (CFStringRef)@"com.lotogram.appstoredeleteapp", 116 | NULL, 117 | CFNotificationSuspensionBehaviorCoalesce); 118 | 119 | CFNotificationCenterAddObserver( 120 | CFNotificationCenterGetDarwinNotifyCenter(), 121 | NULL, 122 | itunesStoredEvent, 123 | (CFStringRef)@"com.lotogram.appstoredeleteitunesstoredfile", 124 | NULL, 125 | CFNotificationSuspensionBehaviorCoalesce); 126 | 127 | CFNotificationCenterAddObserver( 128 | CFNotificationCenterGetDarwinNotifyCenter(), 129 | NULL, 130 | reopenEvent, 131 | (CFStringRef)@"com.lotogram.changeappstorereopen", 132 | NULL, 133 | CFNotificationSuspensionBehaviorCoalesce); 134 | //[[NSFileManager defaultManager] removeItemAtPath:@"/var/mobile/Media/AppRank/applist.plist" error:nil]; 135 | %orig(application); 136 | } 137 | %end 138 | 139 | //ios9解锁屏幕 140 | %hook SBLockScreenViewController 141 | -(void)viewDidAppear:(BOOL)arg1 142 | { 143 | NSLog(@"SpringBoard---------SBLockScreenViewController"); 144 | %orig(arg1); 145 | [SBAutoManager sharedInstance].bAutoCheck = YES; 146 | [self performSelector:@selector(attemptToUnlockUIFromNotification) withObject:nil afterDelay:2]; 147 | [[SBAutoManager sharedInstance] performSelector:@selector(checkAutoTxt) withObject:nil afterDelay:5]; 148 | } 149 | %end 150 | 151 | //ios9 AppStore输入账号密码提示框及各种提示的弹窗 152 | %hook SBUserNotificationAlertSheet 153 | -(void)dismissWithClickedButtonIndex:(long long)arg1 animated:(BOOL)arg2 154 | { 155 | if (arg1 == 1 || arg1 == 0) 156 | { 157 | %orig(arg1,arg2); 158 | } 159 | else 160 | { 161 | %orig(1,arg2); 162 | } 163 | } 164 | 165 | - (void)setDelegate:(id)delegate 166 | { 167 | NSString *className = NSStringFromClass([delegate class]); 168 | if ([className isEqualToString:@"SBUserNotificationAlert"]) 169 | { 170 | SBUserNotificationAlert *sbalert = (SBUserNotificationAlert *)delegate; 171 | NSString *ahead = sbalert.alertHeader; 172 | NSString *txtPath = @"/var/mobile/Media/AppRank/currentuser.plist"; 173 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:txtPath]; 174 | NSArray *objectArray = [NSArray arrayWithObjects:delegate,self, nil]; 175 | if (dic != nil) 176 | { 177 | if ([ahead isEqualToString:@"Sign In to iTunes Store"]) 178 | [[SBAutoManager sharedInstance] performSelector:@selector(alertdo:) withObject:objectArray afterDelay:2]; 179 | else 180 | [[SBAutoManager sharedInstance] performSelector:@selector(alertdo:) withObject:objectArray afterDelay:1]; 181 | } 182 | else 183 | { 184 | NSLog(@"------SBUserNotificationAlertSheet----currentuser.plist--nil"); 185 | } 186 | } 187 | %orig(delegate); 188 | } 189 | 190 | - (UITextField *)textFieldAtIndex:(NSInteger)textFieldIndex 191 | { 192 | NSString *alertTitle = [self title]; 193 | NSString *alertMessage = [self message]; 194 | NSString *txtPath = @"/var/mobile/Media/AppRank/currentuser.plist"; 195 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:txtPath]; 196 | NSString *appleid = [dic objectForKey:@"appleid"]; 197 | NSString *applepwd = [dic objectForKey:@"applepwd"]; 198 | NSLog(@"Current Login User %@ alert title:%@ message:%@",appleid,alertTitle,alertMessage); 199 | UITextField *currentTF = %orig(textFieldIndex); 200 | if (textFieldIndex == 0) 201 | { 202 | if ((alertMessage == nil || alertMessage.length == 0) && [alertTitle isEqualToString:@"Sign In to iTunes Store"]) 203 | { 204 | currentTF.text = appleid; 205 | } 206 | else if (([alertTitle isEqualToString:@"Sign In to iTunes Store"]||[alertTitle isEqualToString:@"Sign-In Required"])&& alertMessage !=nil) 207 | { 208 | currentTF.text = applepwd; 209 | } 210 | } 211 | else if (textFieldIndex == 1) 212 | { 213 | currentTF.text = applepwd; 214 | } 215 | return currentTF; 216 | } 217 | %end 218 | 219 | //iOS9 账号密码输入框的AlertView点击方法 220 | %hook SBUserNotificationAlert 221 | -(void)alertView:(id)arg1 clickedButtonAtIndex:(long long)arg2 222 | { 223 | if (arg2 == 1 || arg2 == 0) 224 | { 225 | %orig(arg1,arg2); 226 | } 227 | else 228 | { 229 | %orig(arg1,1); 230 | } 231 | } 232 | %end 233 | 234 | //iOS9 用来自动关闭No SIM Card Installed提示框 235 | %hook _UIAlertControllerShimPresenter 236 | %new 237 | - (void)doOkAction 238 | { 239 | UIAlertController *alert = self.alertController; 240 | if ([alert.title isEqualToString:@"No SIM Card Installed"]) 241 | { 242 | typedef void (^actionHandle)(UIAlertAction *action); 243 | actionHandle handle = nil; 244 | UIAlertAction *action = alert.actions.firstObject; 245 | NSLog(@"do alert action title %@",action.title); 246 | unsigned int numIvars; 247 | Ivar *vars = class_copyIvarList(NSClassFromString(@"UIAlertAction"), &numIvars); 248 | NSString *key = nil; 249 | for(int i = 0; i < numIvars; i++) { 250 | Ivar thisIvar = vars[i]; 251 | key = [NSString stringWithUTF8String:ivar_getName(thisIvar)]; 252 | if ([key isEqualToString:@"_handler"]) 253 | { 254 | handle = object_getIvar(action,thisIvar); 255 | break; 256 | } 257 | } 258 | free(vars); 259 | if (handle != nil) 260 | { 261 | [self.legacyAlert dismissWithClickedButtonIndex:0 animated:NO]; 262 | [self.legacyAlert.delegate alertView:self.legacyAlert clickedButtonAtIndex:0]; 263 | handle(action); 264 | } 265 | else 266 | { 267 | NSLog(@"handle nil"); 268 | } 269 | } 270 | } 271 | 272 | -(void)_presentAlertControllerAnimated:(BOOL)arg1 completion:(void (^)(void))arg2 273 | { 274 | NSLog(@"_UIAlertControllerShimPresenter _presentAlertControllerAnimated"); 275 | %orig(arg1,arg2); 276 | [self performSelector:@selector(doOkAction) withObject:nil afterDelay:1]; 277 | } 278 | %end 279 | 280 | //iOS10 解锁屏幕 281 | %hook SBDashBoardViewController 282 | %new 283 | - (void)lotounlockScreen 284 | { 285 | [(SBLockScreenManager *)[%c(SBLockScreenManager) sharedInstance] attemptUnlockWithPasscode:nil]; 286 | } 287 | %new 288 | - (void)lotolightScreen 289 | { 290 | [(SBBacklightController *)[%c(SBBacklightController) sharedInstance] turnOnScreenFullyWithBacklightSource:1]; 291 | } 292 | 293 | -(void)viewDidAppear:(BOOL)arg1 294 | { 295 | NSLog(@"SBDashBoardViewController viewDidAppear"); 296 | %orig(arg1); 297 | [SBAutoManager sharedInstance].bAutoCheck = YES; 298 | [(SBBacklightController *)[%c(SBBacklightController) sharedInstance] cancelLockScreenIdleTimer]; 299 | [self performSelector:@selector(lotolightScreen) withObject:nil afterDelay:1]; 300 | [self performSelector:@selector(lotounlockScreen) withObject:nil afterDelay:2]; 301 | [[SBAutoManager sharedInstance] performSelector:@selector(checkAutoTxt) withObject:nil afterDelay:5]; 302 | } 303 | %end 304 | 305 | //iOS10 AppStore输入账号密码提示框及各种提示的弹窗包括No SIM Card Installed 306 | %hook SBSharedModalAlertItemPresenter 307 | %new 308 | - (void)doOkSimAlert:(SBSIMLockAlertItem *)alertItem 309 | { 310 | typedef void (^actionHandle)(UIAlertAction *action); 311 | actionHandle handle = nil; 312 | UIAlertController *alert = [alertItem _alertController]; 313 | if (alert == nil) 314 | { 315 | NSLog(@"SBSIMLockAlertItem _alertController nil"); 316 | return; 317 | } 318 | UIAlertAction *action = alert.actions.firstObject; 319 | NSLog(@"do alert action title %@",action.title); 320 | unsigned int numIvars; 321 | Ivar *vars = class_copyIvarList(NSClassFromString(@"UIAlertAction"), &numIvars); 322 | NSString *key = nil; 323 | for(int i = 0; i < numIvars; i++) { 324 | Ivar thisIvar = vars[i]; 325 | key = [NSString stringWithUTF8String:ivar_getName(thisIvar)]; 326 | if ([key isEqualToString:@"_handler"]) 327 | { 328 | handle = object_getIvar(action,thisIvar); 329 | break; 330 | } 331 | } 332 | free(vars); 333 | if (handle != nil) 334 | { 335 | handle(action); 336 | } 337 | else 338 | { 339 | NSLog(@"handle nil"); 340 | } 341 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doOkSimAlert:) object:alertItem]; 342 | } 343 | 344 | -(void)presentAlertItem:(id)arg1 isLocked:(BOOL)arg2 animated:(BOOL)arg3 345 | { 346 | [[RankManager sharedInstance] writeLog:[NSString stringWithFormat:@"SBSharedModalAlertItemPresenter presentAlertItem %@",arg1]]; 347 | %orig(arg1,arg2,arg3); 348 | NSString *className = NSStringFromClass([arg1 class]); 349 | if ([className isEqualToString:@"SBSIMLockAlertItem"]) 350 | { 351 | NSLog(@"className %@",className); 352 | SBSIMLockAlertItem *alertItem = (SBSIMLockAlertItem *)arg1; 353 | [self performSelector:@selector(doOkSimAlert:) withObject:alertItem afterDelay:1]; 354 | return; 355 | } 356 | else if (![className isEqualToString:@"SBUserNotificationAlert"]) 357 | { 358 | return; 359 | } 360 | SBUserNotificationAlert *alertItem = (SBUserNotificationAlert *)arg1; 361 | UIAlertController *alert = [alertItem _alertController]; 362 | if (!alert) 363 | { 364 | NSLog(@"alertController nil"); 365 | return; 366 | } 367 | else 368 | { 369 | NSString *alerttitle = alertItem.alertHeader; 370 | NSString *logString = [NSString stringWithFormat:@"alert %@",alerttitle]; 371 | [[SBAutoManager sharedInstance] writeLog:logString]; 372 | if ([alerttitle isEqualToString:@"Sign In to iTunes Store"]||[alerttitle isEqualToString:@"Sign-In Required"]) 373 | { 374 | NSString *txtPath = @"/var/mobile/Media/AppRank/currentuser.plist"; 375 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:txtPath]; 376 | if (dic != nil) 377 | { 378 | NSString *appleid = [dic objectForKey:@"appleid"]; 379 | NSString *applepwd = [dic objectForKey:@"applepwd"]; 380 | NSLog(@"%@ do 1111111",alerttitle); 381 | NSArray *textFields = alert.textFields; 382 | if (textFields.count == 0 || textFields == nil) 383 | { 384 | NSLog(@"alertController not nil but textFields nil"); 385 | } 386 | else if(textFields.count == 1) 387 | { 388 | UITextField *textField = textFields.firstObject; 389 | textField.text = applepwd; 390 | } 391 | else if(textFields.count == 2) 392 | { 393 | UITextField *textField = textFields.firstObject; 394 | textField.text = appleid; 395 | textField = textFields.lastObject; 396 | textField.text = applepwd; 397 | } 398 | else 399 | { 400 | NSLog(@"over 3 count textFields"); 401 | } 402 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem,@(1),nil]; 403 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:2]; 404 | } 405 | } 406 | else if ([alerttitle isEqualToString:@"Sign in to write a Customer Review."]) 407 | { 408 | NSLog(@"%@ do 1111111",alerttitle); 409 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem,@(1),nil]; 410 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:2]; 411 | } 412 | else if ([alerttitle isEqualToString:@"Require password for additional purchases on this device?"]) 413 | { 414 | NSLog(@"%@ do 000000",alerttitle); 415 | [SBAutoManager sharedInstance].bShowAgree = NO; 416 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 417 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 418 | } 419 | else if ([alerttitle isEqualToString:@"You've already purchased this, so it will be downloaded now at no additional charge."]) 420 | { 421 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 422 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 423 | notify_post("com.lotogram.springboard_purchased_tips"); 424 | } 425 | else if ([alerttitle isEqualToString:@"Apple Media Services Terms and Conditions have changed."]) 426 | { 427 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 428 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 429 | if ([SBAutoManager sharedInstance].bShowAgree == NO) 430 | { 431 | [SBAutoManager sharedInstance].bShowAgree = YES; 432 | NSLog(@"%@ do 1111111",alerttitle); 433 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem,@(1),nil]; 434 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 435 | } 436 | else 437 | { 438 | NSLog(@"%@ do 000000",alerttitle); 439 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 440 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 441 | } 442 | } 443 | else if ([alerttitle isEqualToString:@"Verification Failed"]) 444 | { 445 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 446 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 447 | NSLog(@"%@ do 000000",alerttitle); 448 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 449 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 450 | } 451 | else if([alerttitle isEqualToString:@"Your Apple ID has been disabled."]) 452 | { 453 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 454 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 455 | NSLog(@"%@ do 000000",alerttitle); 456 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 457 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 458 | } 459 | else if([alerttitle isEqualToString:@"Verification Required"]) 460 | { 461 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 462 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 463 | NSLog(@"%@ do 000000",alerttitle); 464 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 465 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 466 | } 467 | else if([alerttitle isEqualToString:@"Apple ID Verification"]) 468 | { 469 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 470 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 471 | NSLog(@"%@ do 000000",alerttitle); 472 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 473 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 474 | } 475 | else if([alerttitle isEqualToString:@"Cannot connect to iTunes Store"]) 476 | { 477 | NSString *txtPath = @"/var/mobile/Media/AppRank/alert.txt"; 478 | [alerttitle writeToFile:txtPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 479 | NSLog(@"%@ do 000000",alerttitle); 480 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 481 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 482 | } 483 | else if([alerttitle isEqualToString:@"This nickname is taken. Enter another and try again."]) 484 | { 485 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 486 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 487 | notify_post("com.lotogram.changenickname"); 488 | } 489 | else 490 | { 491 | NSLog(@"%@ do 000000",alerttitle); 492 | NSArray *objectArray = [NSArray arrayWithObjects:alertItem, nil]; 493 | [[SBAutoManager sharedInstance] performSelector:@selector(doContinue:) withObject:objectArray afterDelay:1]; 494 | } 495 | } 496 | } 497 | %end 498 | 499 | /*------------------------------------硬件信息 Hook------------------------------------*/ 500 | %hook SSLockdown 501 | -(CFStringRef)copyDeviceGUID 502 | { 503 | NSString *guidstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"uuid"]; 504 | if (guidstring == nil) 505 | { 506 | return %orig; 507 | } 508 | const char *a =[guidstring UTF8String]; 509 | CFStringRef strRef = __CFStringMakeConstantString(a); 510 | if (strRef == nil) 511 | { 512 | strRef = %orig; 513 | } 514 | //CFStringRef strRef = %orig; 515 | NSLog(@"----SSLockdown---copyDeviceGUID--%@",strRef); 516 | return strRef; 517 | } 518 | %end 519 | %hook NSUUID 520 | + (id)UUID 521 | { 522 | // NSString *guidstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"uuid"]; 523 | // NSLog(@"NSUUID---UUID---%@",guidstring); 524 | NSUUID *uuid = %orig; 525 | return uuid; 526 | } 527 | 528 | - (NSString *)UUIDString 529 | { 530 | NSString *guidstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"uuid"]; 531 | if (!guidstring) 532 | { 533 | return %orig; 534 | } 535 | NSLog(@"NSUUID---UUIDString---%@",guidstring); 536 | return guidstring; 537 | } 538 | - (id)initWithUUIDString:(id)arg1 539 | { 540 | NSString *guidstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"uuid"]; 541 | if (!guidstring) 542 | { 543 | return %orig; 544 | } 545 | NSLog(@"NSUUID---initWithUUIDString---%@",guidstring); 546 | return %orig(guidstring); 547 | } 548 | %end 549 | 550 | %hook UIDevice 551 | - (NSUUID *)identifierForVendor 552 | { 553 | NSString *guidstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"uuid"]; 554 | if (!guidstring) 555 | { 556 | return %orig; 557 | } 558 | NSLog(@"UIDevice---identifierForVendor---%@",guidstring); 559 | NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:guidstring]; 560 | return uuid; 561 | } 562 | %end 563 | 564 | %hook AKDevice 565 | - (NSString *)userChosenName 566 | { 567 | NSString *userChosen= %orig; 568 | NSLog(@"------AKDevice-----userChosenName:%@",userChosen); 569 | return userChosen; 570 | } 571 | 572 | - (NSString *)serialNumber 573 | { 574 | NSString *serialstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"serial"]; 575 | if (serialstring == nil) 576 | { 577 | serialstring = %orig; 578 | } 579 | NSLog(@"------AKDevice-----serialNumber:%@",serialstring); 580 | return serialstring; 581 | } 582 | 583 | - (NSString *)internationalMobileEquipmentIdentity 584 | { 585 | NSString *internationalMobile = [[LotoDeviceManager sharedInstance] currentuserobject:@"IMEI"]; 586 | if (!internationalMobile) 587 | { 588 | internationalMobile = %orig; 589 | } 590 | NSLog(@"------AKDevice-----internationalMobileEquipmentIdentity:%@",internationalMobile); 591 | return internationalMobile; 592 | } 593 | 594 | - (NSString *)mobileEquipmentIdentifier 595 | { 596 | NSString *mobileEquipment = %orig; 597 | NSLog(@"------AKDevice-----mobileEquipmentIdentifier:%@",mobileEquipment); 598 | return mobileEquipment; 599 | } 600 | 601 | - (NSString *)uniqueDeviceIdentifier 602 | { 603 | NSString *guidstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"uuid"]; 604 | if (!guidstring) 605 | { 606 | guidstring = %orig; 607 | } 608 | NSLog(@"------AKDevice-----uniqueDeviceIdentifier:%@",guidstring); 609 | return guidstring; 610 | } 611 | 612 | - (NSString *)integratedCircuitCardIdentifier 613 | { 614 | NSString *integratedCircuitCard = %orig; 615 | NSLog(@"------AKDevice-----integratedCircuitCardIdentifier:%@",integratedCircuitCard); 616 | return integratedCircuitCard; 617 | } 618 | %end 619 | 620 | %hook SSDevice 621 | - (NSString *)serialNumber 622 | { 623 | NSString *serialstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"serial"]; 624 | if (serialstring == nil) 625 | { 626 | serialstring = %orig; 627 | } 628 | NSLog(@"------SSDevice-----serialNumber:%@",serialstring); 629 | return serialstring; 630 | } 631 | 632 | - (NSString *)uniqueDeviceIdentifier 633 | { 634 | NSString *guidstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"uuid"]; 635 | if (guidstring == nil) 636 | { 637 | guidstring = %orig; 638 | } 639 | NSLog(@"------SSDevice-----guid:%@",guidstring); 640 | return guidstring; 641 | } 642 | 643 | %end 644 | 645 | %hook ISDevice 646 | - (NSString *)serialNumber 647 | { 648 | NSString *serialstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"serial"]; 649 | if (serialstring == nil) 650 | { 651 | serialstring = %orig; 652 | } 653 | NSLog(@"------ISDevice-----serialNumber:%@",serialstring); 654 | return serialstring; 655 | } 656 | 657 | - (NSString *)guid 658 | { 659 | NSString *guidstring = [[LotoDeviceManager sharedInstance] currentuserobject:@"uuid"]; 660 | if (guidstring == nil) 661 | { 662 | guidstring = %orig; 663 | } 664 | NSLog(@"------ISDevice-----guid:%@",guidstring); 665 | return guidstring; 666 | } 667 | %end 668 | 669 | /*------------------------------------Rate Hook------------------------------------*/ 670 | %hook SKUIComposeReviewFormViewController 671 | -(id)initWithReviewMetadata:(id)arg1 672 | { 673 | [[RankManager sharedInstance] writeLog:@"SKUIComposeReviewFormViewController initWithReviewMetadata"]; 674 | SKUIReviewMetadata *metaData = (SKUIReviewMetadata *)arg1; 675 | NSDictionary *rankdic = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Media/AppRank/applist.plist"]; 676 | RankAppModel *rankApp = [RankAppModel itemWithDictionary:rankdic]; 677 | if (metaData.nickname != nil && metaData.nickname.length >0 && metaData.body != nil && metaData.body.length >0 && metaData.title != nil && metaData.title.length >0) 678 | { 679 | [[RankManager sharedInstance] writeLog:[NSString stringWithFormat:@"%@ have rate before",metaData.nickname]]; 680 | } 681 | else if (rankApp.workType == 2) 682 | { 683 | if (metaData.nickname == nil || metaData.nickname.length == 0) 684 | { 685 | metaData.nickname = [[RankManager sharedInstance] getNickName]; 686 | } 687 | metaData.rating = 4; 688 | } 689 | else if (rankApp.workType == 1) 690 | { 691 | RateModel *rate = nil; 692 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Media/AppRank/currentrate.plist"]; 693 | rate = [RateModel itemWithDictionary:dic]; 694 | if (rate == nil) 695 | { 696 | [[RankManager sharedInstance] writeLog:@"currentrate nil pause"]; 697 | return %orig(arg1); 698 | } 699 | if (metaData.nickname == nil || metaData.nickname.length == 0) 700 | { 701 | metaData.nickname = rate.nickname; 702 | } 703 | metaData.title = rate.title; 704 | metaData.rating = rate.rating; 705 | metaData.body = rate.body; 706 | } 707 | return %orig(metaData); 708 | } 709 | 710 | - (void)viewDidAppear:(_Bool)arg1 711 | { 712 | [[RankManager sharedInstance] writeLog:@"SKUIComposeReviewFormViewController viewDidAppear"]; 713 | %orig(arg1); 714 | dispatch_async(dispatch_get_main_queue(), ^{ 715 | [self performSelector:@selector(_submit) withObject:nil afterDelay:4]; 716 | }); 717 | } 718 | %end 719 | 720 | %hook SKComposeReviewViewController 721 | -(void)_didFinishWithResult:(BOOL)arg1 error:(id)arg2 722 | { 723 | [[RankManager sharedInstance] writeLog:[NSString stringWithFormat:@"SKComposeReviewViewController _didFinishWithResult %i %@",arg1,arg2]]; 724 | notify_post("com.lotogram.ratesubmitclicked"); 725 | %orig(arg1,arg2); 726 | } 727 | %end 728 | 729 | /*------------------------------------AppStore Hook------------------------------------*/ 730 | %hook SUStorePageViewController 731 | - (void)_finishWebViewLoadWithResult:(bool)arg1 error:(id)arg2 732 | { 733 | NSLog(@"----_finishWebViewLoadWithResult----"); 734 | %orig(arg1,arg2); 735 | UINavigationController *storeNaviVC = self.navigationController; 736 | UIToolbar *bar = storeNaviVC.toolbar; 737 | NSArray *items = bar.items; 738 | for (int i = 0; i < items.count; i++) 739 | { 740 | UIBarButtonItem *item = items[i]; 741 | if ([item.title isEqualToString:@"Agree"]) 742 | { 743 | [item.target performSelector:item.action withObject:item afterDelay:0]; 744 | break; 745 | } 746 | } 747 | } 748 | %end 749 | 750 | %hook UIAlertView 751 | %new 752 | - (void)completeAgreeDo 753 | { 754 | NSLog(@"UIAlertView completeAgreeDo"); 755 | [self.delegate alertView:self didDismissWithButtonIndex:0]; 756 | [self dismissWithClickedButtonIndex:1 animated:NO]; 757 | } 758 | %new 759 | - (void)agreedonext 760 | { 761 | NSLog(@"UIAlertView agreedonext"); 762 | [self.delegate alertView:self clickedButtonAtIndex:1]; 763 | [self dismissWithClickedButtonIndex:1 animated:NO]; 764 | } 765 | 766 | - (void)show 767 | { 768 | NSLog(@"UIAlertView show message%@",self.message); 769 | if ([self.message isEqualToString:@"I have read and agree to the Apple Media Services Terms & Conditions."]) 770 | { 771 | [self performSelector:@selector(agreedonext) withObject:nil afterDelay:2]; 772 | } 773 | else if([self.message rangeOfString:@"now begin to download."].location !=NSNotFound)//_roaldSearchText 774 | { 775 | [self performSelector:@selector(completeAgreeDo) withObject:nil afterDelay:2]; 776 | } 777 | else 778 | { 779 | [[RankManager sharedInstance] writeLog:[NSString stringWithFormat:@"UIAlertView show message:%@",self.message]]; 780 | } 781 | %orig; 782 | } 783 | %end 784 | 785 | %hook UIAlertController 786 | %new 787 | - (void)doContinue:(NSNumber *)bcontinue 788 | { 789 | typedef void (^actionHandle)(UIAlertAction *action); 790 | actionHandle handle = nil; 791 | UIAlertAction *action = self.actions.firstObject; 792 | if (bcontinue) 793 | { 794 | action = self.actions.lastObject; 795 | } 796 | NSLog(@"do alert action title %@",action.title); 797 | unsigned int numIvars; 798 | Ivar *vars = class_copyIvarList(NSClassFromString(@"UIAlertAction"), &numIvars); 799 | NSString *key = nil; 800 | for(int i = 0; i < numIvars; i++) { 801 | Ivar thisIvar = vars[i]; 802 | key = [NSString stringWithUTF8String:ivar_getName(thisIvar)]; 803 | if ([key isEqualToString:@"_handler"]) 804 | { 805 | handle = object_getIvar(action,thisIvar); 806 | break; 807 | } 808 | } 809 | free(vars); 810 | if (handle != nil) 811 | { 812 | handle(action); 813 | [self dismissViewControllerAnimated:NO completion:nil]; 814 | 815 | } 816 | else 817 | { 818 | NSLog(@"handle nil"); 819 | } 820 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(doContinue:) object:bcontinue]; 821 | } 822 | 823 | - (void)viewDidAppear:(_Bool)arg1 824 | { 825 | %orig(arg1); 826 | NSLog(@"UIAlertController viewDidAppear title:%@ message:%@",self.title,self.message); 827 | if ([self.title isEqualToString:@"Item Not Available"]) 828 | { 829 | [self performSelector:@selector(doContinue:) withObject:nil afterDelay:1]; 830 | } 831 | } 832 | %end 833 | 834 | 835 | %hook SKUIAccountButtonsView 836 | - (void)layoutSubviews 837 | { 838 | [RankManager sharedInstance].appleIDButton = self.appleIDButton; 839 | %orig; 840 | } 841 | %end 842 | 843 | %hook SKUIStorePageSectionsViewController 844 | %new 845 | - (void)doSuccessGetUser:(NSDictionary *)user 846 | { 847 | AppleAccountModel *account = [AppleAccountModel itemWithDictionary:user]; 848 | [RankManager sharedInstance].currentAccount = account; 849 | NSDictionary *accountdic = [account toDictionary]; 850 | NSString *logString = [NSString stringWithFormat:@"success getuser %@",account.appleid]; 851 | [[RankManager sharedInstance] writeLog:logString]; 852 | if([accountdic writeToFile:@"/var/mobile/Media/AppRank/currentuser.plist" atomically:YES]) 853 | { 854 | [RankManager sharedInstance].statusLabel.text = @"check sign in....."; 855 | [[RankManager sharedInstance].appleIDButton sendActionsForControlEvents:UIControlEventTouchUpInside]; 856 | if ([RankManager sharedInstance].bCheckSignin == NO) 857 | { 858 | [[RankManager sharedInstance] checksigninstatues]; 859 | } 860 | else 861 | { 862 | [RankManager sharedInstance].statusLabel.text = @"already in checksigninstatues"; 863 | } 864 | } 865 | else 866 | { 867 | [RankManager sharedInstance].statusLabel.text = @"getUserToLogin writeToFile fail"; 868 | } 869 | } 870 | 871 | %new 872 | - (void)getUserToLogin 873 | { 874 | [[RankManager sharedInstance] getUserFromServer:YES complete:^(id responseObject, NSError *error) { 875 | NSString *status = [responseObject objectForKey:@"status"]; 876 | if (error == nil && [status isEqualToString:@"ok"]) 877 | { 878 | NSDictionary *user = responseObject[@"user"]; 879 | NSDictionary *task = responseObject[@"task"]; 880 | NSDictionary *rate = responseObject[@"rate"]; 881 | if (rate) 882 | { 883 | [RankManager sharedInstance].currentRate = [RateModel itemWithDictionary:rate]; 884 | NSDictionary *ratedic = [[RankManager sharedInstance].currentRate toDictionary]; 885 | [ratedic writeToFile:@"/var/mobile/Media/AppRank/currentrate.plist" atomically:YES]; 886 | } 887 | [RankManager sharedInstance].currentapp = [RankAppModel itemWithDictionary:task]; 888 | NSDictionary *dic = [[RankManager sharedInstance].currentapp toDictionary]; 889 | [dic writeToFile:@"/var/mobile/Media/AppRank/applist.plist" atomically:YES]; 890 | [self performSelector:@selector(doSuccessGetUser:) withObject:user afterDelay:0]; 891 | } 892 | else 893 | { 894 | NSString *logString = @""; 895 | if (error != nil) 896 | { 897 | logString = [NSString stringWithFormat:@"have devicename fail getuser %@",error.localizedDescription]; 898 | } 899 | else 900 | { 901 | logString = [NSString stringWithFormat:@"have devicename fail getuser %@",responseObject[@"message"]]; 902 | } 903 | [[RankManager sharedInstance] writeLog:logString]; 904 | [RankManager sharedInstance].statusLabel.text = [NSString stringWithFormat:@"%@",logString]; 905 | } 906 | }]; 907 | } 908 | 909 | %new 910 | - (void)doLogoutAction 911 | { 912 | if ([RankManager sharedInstance].accountVC) 913 | { 914 | NSString *logString = [NSString stringWithFormat:@"%@ second sign out",[RankManager sharedInstance].currentAccount.appleid]; 915 | [[RankManager sharedInstance] writeLog:logString]; 916 | [RankManager sharedInstance].statusLabel.text = [NSString stringWithFormat:@"%@ sign out.......",[RankManager sharedInstance].currentAccount.appleid]; 917 | [[RankManager sharedInstance].accountVC _signOut]; 918 | [RankManager sharedInstance].signoutcount = 0; 919 | if ([RankManager sharedInstance].bCheckSignout == NO) 920 | { 921 | [[RankManager sharedInstance] checksignoutstatues]; 922 | } 923 | else 924 | { 925 | [RankManager sharedInstance].statusLabel.text = @"already in checksignoutstatues"; 926 | } 927 | } 928 | else 929 | { 930 | NSString *logString = [NSString stringWithFormat:@"%@ still signout not found SKUIAccountButtonsViewController",[RankManager sharedInstance].currentAccount.appleid]; 931 | [[RankManager sharedInstance] writeLog:logString]; 932 | [RankManager sharedInstance].statusLabel.text = @"still sign out not found SKUIAccountButtonsViewController"; 933 | } 934 | } 935 | 936 | %new 937 | - (void)bottomTodoNext 938 | { 939 | if ([RankManager sharedInstance].appleIDButton == nil) 940 | { 941 | [RankManager sharedInstance].bLoadFeaturePage = YES; 942 | [RankManager sharedInstance].statusLabel.text = @"please wait scrollToBottom"; 943 | [self performSelector:@selector(scrollToBottom) withObject:nil afterDelay:2]; 944 | } 945 | else 946 | { 947 | NSString *txtPath = @"/var/mobile/Media/AppRank/auto.txt"; 948 | NSString *autoString = [[NSString alloc] initWithContentsOfFile:txtPath encoding:NSUTF8StringEncoding error:nil]; 949 | autoString = [autoString stringByReplacingOccurrencesOfString:@"\r" withString:@""]; 950 | autoString = [autoString stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 951 | autoString = [autoString stringByReplacingOccurrencesOfString:@" " withString:@""]; 952 | NSString *btnTitle = [RankManager sharedInstance].appleIDButton.titleLabel.text; 953 | if (![btnTitle isEqualToString:@"Sign In"] && [autoString isEqualToString:@"complete"]) 954 | { 955 | [[RankManager sharedInstance].accountVC _signOut]; 956 | [RankManager sharedInstance].statusLabel.text =[NSString stringWithFormat:@"auto.txt = %@",autoString]; 957 | [RankManager sharedInstance].bLoadFeaturePage = YES; 958 | } 959 | else if(![btnTitle isEqualToString:@"Sign In"]) 960 | { 961 | if ([RankManager sharedInstance].bLoadFeaturePage && [RankManager sharedInstance].currentapp.shouldOpen) 962 | { 963 | NSString *autoPath = @"/var/mobile/Media/AppRank/auto.txt"; 964 | NSString *startString = @"opendone"; 965 | [startString writeToFile:autoPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 966 | exit(0); 967 | } 968 | else 969 | { 970 | [RankManager sharedInstance].bLoadFeaturePage = YES; 971 | if ([RankManager sharedInstance].accountVC) 972 | { 973 | [RankManager sharedInstance].statusLabel.text = [NSString stringWithFormat:@"%@ sign out.......",[RankManager sharedInstance].currentAccount.appleid]; 974 | [[RankManager sharedInstance].accountVC _signOut]; 975 | [RankManager sharedInstance].signoutcount = 0; 976 | if ([RankManager sharedInstance].bCheckSignout == NO) 977 | { 978 | [[RankManager sharedInstance] checksignoutstatues]; 979 | } 980 | else 981 | { 982 | [RankManager sharedInstance].statusLabel.text = @"already in checksignoutstatues"; 983 | } 984 | } 985 | else 986 | { 987 | [RankManager sharedInstance].statusLabel.text = @"sign out not found SKUIAccountButtonsViewController"; 988 | [self performSelector:@selector(doLogoutAction) withObject:nil afterDelay:5]; 989 | } 990 | } 991 | } 992 | else if ([btnTitle isEqualToString:@"Sign In"] &&([autoString isEqualToString:@"start"] || [autoString hasPrefix:@"restart"] || [autoString hasPrefix:@"openstart"])) 993 | { 994 | [RankManager sharedInstance].bLoadFeaturePage = YES; 995 | [RankManager sharedInstance].signcount = 0; 996 | [RankManager sharedInstance].statusLabel.text = @"get user from server..."; 997 | [self performSelector:@selector(getUserToLogin) withObject:nil afterDelay:0]; 998 | } 999 | else 1000 | { 1001 | [RankManager sharedInstance].statusLabel.text =[NSString stringWithFormat:@"auto.txt = %@",autoString]; 1002 | [RankManager sharedInstance].bLoadFeaturePage = YES; 1003 | } 1004 | } 1005 | } 1006 | 1007 | %new 1008 | - (void)scrollToBottom 1009 | { 1010 | id view = self.view.subviews.firstObject; 1011 | if ([view isKindOfClass:[UICollectionView class]]) 1012 | { 1013 | UICollectionView *collection = (UICollectionView *)view; 1014 | NSInteger sections = [collection numberOfSections]; 1015 | NSInteger cellcount = [collection numberOfItemsInSection:sections-1]; 1016 | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:(cellcount-1) inSection:sections-1]; 1017 | [collection scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionBottom animated:YES]; 1018 | [self performSelector:@selector(bottomTodoNext) withObject:nil afterDelay:2.0f]; 1019 | } 1020 | else 1021 | { 1022 | [RankManager sharedInstance].statusLabel.text = @"featured page no find UICollectionView"; 1023 | } 1024 | } 1025 | 1026 | %new 1027 | - (void)doBackToSearchList 1028 | { 1029 | [self.navigationController popViewControllerAnimated:YES]; 1030 | } 1031 | 1032 | - (void)viewDidAppear:(_Bool)arg1 1033 | { 1034 | %orig(arg1); 1035 | notify_post("com.lotogram.appstore_to_springboard"); 1036 | NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier]; 1037 | if (![bundleID isEqualToString:@"com.apple.AppStore"]) 1038 | { 1039 | notify_post("com.lotogram.changeappstorereopen"); 1040 | [[RankManager sharedInstance] writeLog:[NSString stringWithFormat:@"reopen appstore bundleid:%@",bundleID]]; 1041 | return; 1042 | } 1043 | UITabBarController *tabbarvc = self.tabBarController; 1044 | if ([RankManager sharedInstance].bInDownloading) 1045 | { 1046 | [[RankManager sharedInstance] writeLog:@"bInDownloading do select 3"]; 1047 | tabbarvc.selectedIndex = 3; 1048 | return; 1049 | } 1050 | if (tabbarvc == nil || ![tabbarvc isKindOfClass:[UITabBarController class]]) 1051 | { 1052 | [RankManager sharedInstance].statusLabel.text = [NSString stringWithFormat:@"self.tabBarController is nil %@",NSStringFromClass([tabbarvc class])]; 1053 | return; 1054 | } 1055 | [RankManager sharedInstance].tabBarVc = tabbarvc; 1056 | if (tabbarvc.selectedIndex == 0) 1057 | { 1058 | [self performSelector:@selector(scrollToBottom) withObject:nil afterDelay:2.0f]; 1059 | [RankManager sharedInstance].bInAppInfoPage = NO; 1060 | } 1061 | else if(tabbarvc.selectedIndex == 3 && [RankManager sharedInstance].progress >= 0.9) 1062 | { 1063 | [RankManager sharedInstance].bInDownloading = NO; 1064 | tabbarvc.selectedIndex = 0; 1065 | } 1066 | else if([RankManager sharedInstance].bInAppInfoPage && tabbarvc.selectedIndex == 3) 1067 | { 1068 | [RankManager sharedInstance].bInAppInfoPage = NO; 1069 | [RankManager sharedInstance].currentVC = self; 1070 | if ([RankManager sharedInstance].keywodIndex > [RankManager sharedInstance].currentapp.moreKeywords.count) 1071 | { 1072 | NSLog(@"SKUIStorePageSectionsViewController viewDidAppear doAppInfoPageDownload"); 1073 | if ([[RankManager sharedInstance] checkIsOpen]) 1074 | { 1075 | [RankManager sharedInstance].statusLabel.text = @"find OPEN"; 1076 | [[RankManager sharedInstance] writeLog:@"find OPEN"]; 1077 | tabbarvc.selectedIndex = 0; 1078 | return; 1079 | } 1080 | [[RankManager sharedInstance] performSelector:@selector(doAppInfoPageDownload) withObject:nil afterDelay:1]; 1081 | } 1082 | else if ([RankManager sharedInstance].keywodIndex == 1) 1083 | { 1084 | NSLog(@"SKUIStorePageSectionsViewController viewDidAppear doBackAndSearch keywodIndex 1"); 1085 | if ([[RankManager sharedInstance] checkIsOpen]) 1086 | { 1087 | [RankManager sharedInstance].statusLabel.text = @"find OPEN"; 1088 | [[RankManager sharedInstance] writeLog:@"find OPEN"]; 1089 | tabbarvc.selectedIndex = 0; 1090 | return; 1091 | } 1092 | if([[RankManager sharedInstance] checkIsCloud]) 1093 | { 1094 | [self.navigationController popViewControllerAnimated:YES]; 1095 | [[RankManager sharedInstance] completeDownload]; 1096 | } 1097 | else 1098 | { 1099 | [self performSelector:@selector(doBackToSearchList) withObject:nil afterDelay:1.0f]; 1100 | [[RankManager sharedInstance] performSelector:@selector(begainSearch) withObject:nil afterDelay:2]; 1101 | } 1102 | } 1103 | else 1104 | { 1105 | NSLog(@"SKUIStorePageSectionsViewController viewDidAppear doBackAndSearch keywodIndex %ld",(long)[RankManager sharedInstance].keywodIndex); 1106 | [self performSelector:@selector(doBackToSearchList) withObject:nil afterDelay:1.0f]; 1107 | [[RankManager sharedInstance] performSelector:@selector(begainSearch) withObject:nil afterDelay:2]; 1108 | } 1109 | } 1110 | } 1111 | 1112 | // -(void)_endAllPendingActiveImpression 1113 | // { 1114 | // %orig; 1115 | // NSLog(@"SKUIStorePageSectionsViewController _endAllPendingActiveImpression"); 1116 | // [[RankManager sharedInstance] writeLog:@"_endAllPendingActiveImpression"]; 1117 | // if ([RankManager sharedInstance].bSelectedReview) 1118 | // { 1119 | // [self performSelector:@selector(doTouchWriteReview) withObject:nil afterDelay:5]; 1120 | // } 1121 | // } 1122 | %end 1123 | 1124 | %hook SKUIItemOfferButton 1125 | - (void)setProgress:(double)arg1 animated:(_Bool)arg2 1126 | { 1127 | // %orig(arg1,arg2); 1128 | // [RankManager sharedInstance].statusLabel.text = [NSString stringWithFormat:@"rank:%i progress %f",rankIndex,arg1]; 1129 | // if (arg1 > 0) 1130 | // { 1131 | // [RankManager sharedInstance].progress = arg1; 1132 | // [RankManager sharedInstance].bInDownloading = YES; 1133 | // } 1134 | // if (arg1 > 0.2 && ![RankManager sharedInstance].bDownloadSuccess) 1135 | // { 1136 | // NSLog(@"---------setProgress > 0.2 pause download"); 1137 | // [RankManager sharedInstance].bDownloadSuccess = YES; 1138 | // [self.delegate performSelector:@selector(_buttonAction:) withObject:self afterDelay:0]; 1139 | // // [[RankManager sharedInstance] performSelector:@selector(completeDownload) withObject:nil afterDelay:2]; 1140 | // if ([RankManager sharedInstance].currentapp.workType == 0) 1141 | // { 1142 | // [RankManager sharedInstance].bInDownloading = NO; 1143 | // [[RankManager sharedInstance] performSelector:@selector(completeDownload) withObject:nil afterDelay:2]; 1144 | // } 1145 | // else if ([RankManager sharedInstance].currentapp.workType == 1 || [RankManager sharedInstance].currentapp.workType == 2) 1146 | // { 1147 | // [[RankManager sharedInstance] performSelector:@selector(doReview) withObject:nil afterDelay:2]; 1148 | // } 1149 | // } 1150 | 1151 | %orig(arg1,arg2); 1152 | [RankManager sharedInstance].statusLabel.text = [NSString stringWithFormat:@"rank:%i progress %f",rankIndex,arg1]; 1153 | if (arg1 >= 1 && [RankManager sharedInstance].progress != arg1) 1154 | { 1155 | [RankManager sharedInstance].bInDownloading = NO; 1156 | [[RankManager sharedInstance] performSelector:@selector(completeDownload) withObject:nil afterDelay:3]; 1157 | } 1158 | if (arg1 > 0) 1159 | { 1160 | [RankManager sharedInstance].progress = arg1; 1161 | if (arg1 < 0.8) 1162 | { 1163 | [RankManager sharedInstance].bInDownloading = YES; 1164 | } 1165 | } 1166 | } 1167 | %end 1168 | 1169 | %hook SKUIAccountButtonsViewController 1170 | - (void)viewDidAppear:(bool)arg1 1171 | { 1172 | [RankManager sharedInstance].accountVC = self; 1173 | %orig(arg1); 1174 | } 1175 | %end 1176 | 1177 | %hook SKUITrendingSearchDocumentViewController 1178 | - (void)viewDidAppear:(bool)arg1 1179 | { 1180 | %orig(arg1); 1181 | [RankManager sharedInstance].naviVC = [self navigationController]; 1182 | UINavigationBar *bar = [[self navigationController] navigationBar]; 1183 | NSArray *barsview = [bar subviews]; 1184 | for (UIView *view in barsview) { 1185 | if ([view isKindOfClass:[UISearchBar class]]) { 1186 | UISearchBar *bar = (UISearchBar *)view; 1187 | [RankManager sharedInstance].searchBar = bar; 1188 | break; 1189 | } 1190 | } 1191 | } 1192 | %end 1193 | 1194 | %hook SKUISearchFieldController 1195 | - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar 1196 | { 1197 | if ([RankManager sharedInstance].keywodIndex >= [RankManager sharedInstance].currentapp.moreKeywords.count) 1198 | { 1199 | searchBar.text = [RankManager sharedInstance].currentapp.searchTerms; 1200 | } 1201 | else 1202 | { 1203 | NSString *keyword = [[RankManager sharedInstance].currentapp.moreKeywords objectAtIndex:[RankManager sharedInstance].keywodIndex]; 1204 | searchBar.text = keyword; 1205 | } 1206 | %orig(searchBar); 1207 | } 1208 | %end 1209 | 1210 | 1211 | // %hook SKUISearchFieldController 1212 | // //common 1213 | // - (instancetype)init 1214 | // { 1215 | // [RankManager sharedInstance].searchVC = self; 1216 | // [[RankManager sharedInstance] writeLog:@"SKUISearchFieldController init"]; 1217 | // return %orig; 1218 | // } 1219 | 1220 | // - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar 1221 | // { 1222 | // if ([RankManager sharedInstance].keywodIndex >= [RankManager sharedInstance].currentapp.moreKeywords.count) 1223 | // { 1224 | // // searchBar.text = [RankManager sharedInstance].currentapp.searchTerms; 1225 | // searchBar.text = @"photo color"; 1226 | // } 1227 | // else 1228 | // { 1229 | // // NSString *keyword = [[RankManager sharedInstance].currentapp.moreKeywords objectAtIndex:[RankManager sharedInstance].keywodIndex]; 1230 | // // searchBar.text = keyword; 1231 | // searchBar.text = @"photo color"; 1232 | // } 1233 | // %orig(searchBar); 1234 | // } 1235 | 1236 | // -(id)initWithContentsController:(id)arg1 1237 | // { 1238 | // [[RankManager sharedInstance] writeLog:@"SKUISearchFieldController initWithContentsController"]; 1239 | // [RankManager sharedInstance].searchVC = self; 1240 | // return %orig(arg1); 1241 | // } 1242 | 1243 | // -(void)setDisplaysSearchBarInNavigationBar:(BOOL)arg1 1244 | // { 1245 | // %orig(arg1); 1246 | // [[RankManager sharedInstance] writeLog:@"SKUISearchFieldController setDisplaysSearchBarInNavigationBar"]; 1247 | // [RankManager sharedInstance].searchVC = self; 1248 | // } 1249 | 1250 | // -(BOOL)displaysSearchBarInNavigationBar 1251 | // { 1252 | // [RankManager sharedInstance].searchVC = self; 1253 | // [[RankManager sharedInstance] writeLog:@"SKUISearchFieldController displaysSearchBarInNavigationBar"]; 1254 | // return %orig; 1255 | // } 1256 | 1257 | // -(void)_loadResultsForSearchRequest:(id)arg1 1258 | // { 1259 | // if (arg1 != nil) 1260 | // { 1261 | // [RankManager sharedInstance].bSendRequest = YES; 1262 | // } 1263 | // %orig(arg1); 1264 | // [[RankManager sharedInstance] writeLog:[NSString stringWithFormat:@"SKUISearchFieldController _loadResultsForSearchRequest %@",arg1]]; 1265 | // } 1266 | 1267 | // -(void)searchDisplayController:(id)arg1 didLoadSearchResultsTableView:(id)arg2 1268 | // { 1269 | // if ([RankManager sharedInstance].bSendRequest) 1270 | // { 1271 | // [NSObject cancelPreviousPerformRequestsWithTarget:[RankManager sharedInstance] selector:@selector(searchListDoTotalApp) object:nil]; 1272 | // [[RankManager sharedInstance] performSelector:@selector(searchListDoTotalApp) withObject:nil afterDelay:5]; 1273 | // } 1274 | // [[RankManager sharedInstance] writeLog:@"SKUISearchFieldController didLoadSearchResultsTableView"]; 1275 | // %orig(arg1,arg2); 1276 | // } 1277 | 1278 | // //ios 10 1279 | // -(id)initWithContentsController:(id)arg1 clientContext:(id)arg2 1280 | // { 1281 | // [[RankManager sharedInstance] writeLog:@"SKUISearchFieldController initWithContentsController clientContext"]; 1282 | // [RankManager sharedInstance].searchVC = self; 1283 | // return %orig(arg1,arg2); 1284 | // } 1285 | 1286 | // -(void)updateSearchResultsForSearchController:(id)arg1 1287 | // { 1288 | // [[RankManager sharedInstance] writeLog:@"SKUISearchFieldController updateSearchResultsForSearchController"]; 1289 | // %orig(arg1); 1290 | // } 1291 | 1292 | // %end 1293 | 1294 | 1295 | %hook SKUITabBarController 1296 | %new 1297 | - (void)checkLoadSuccess 1298 | { 1299 | if (![RankManager sharedInstance].bLoadFeaturePage) 1300 | { 1301 | NSString *autoPath = @"/var/mobile/Media/AppRank/auto.txt"; 1302 | NSString *startString = @"done"; 1303 | [startString writeToFile:autoPath atomically:YES encoding:NSUTF8StringEncoding error:nil]; 1304 | NSString *logString = @"120s featured page load failed"; 1305 | [[RankManager sharedInstance] writeLog:logString]; 1306 | exit(0); 1307 | } 1308 | } 1309 | - (void)viewDidAppear:(bool)arg1 1310 | { 1311 | %orig(arg1); 1312 | NSLog(@"------SKUITabBarController viewDidAppear"); 1313 | self.selectedIndex = 0; 1314 | [RankManager sharedInstance].tabBarVc = self; 1315 | [self performSelector:@selector(checkLoadSuccess) withObject:nil afterDelay:120]; 1316 | } 1317 | %end 1318 | 1319 | void RateSubmitEvent(CFNotificationCenterRef center, 1320 | void *observer, 1321 | CFStringRef name, 1322 | const void *object, 1323 | CFDictionaryRef userInfo) 1324 | { 1325 | [NSObject cancelPreviousPerformRequestsWithTarget:[RankManager sharedInstance] selector:@selector(completeReview) object:nil]; 1326 | [[RankManager sharedInstance] performSelector:@selector(completeReview) withObject:nil afterDelay:30]; 1327 | NSLog(@"-----------------------------RateSubmitEvent------------------------------"); 1328 | } 1329 | 1330 | void PurchasedEvent(CFNotificationCenterRef center, 1331 | void *observer, 1332 | CFStringRef name, 1333 | const void *object, 1334 | CFDictionaryRef userInfo) 1335 | { 1336 | [NSObject cancelPreviousPerformRequestsWithTarget:[RankManager sharedInstance] selector:@selector(checkProgressStatues) object:nil]; 1337 | [[RankManager sharedInstance] completeDownload]; 1338 | NSLog(@"-----------------------------PurchasedEvent------------------------------"); 1339 | } 1340 | 1341 | void ReviewDownloadEvent(CFNotificationCenterRef center, 1342 | void *observer, 1343 | CFStringRef name, 1344 | const void *object, 1345 | CFDictionaryRef userInfo) 1346 | { 1347 | [NSObject cancelPreviousPerformRequestsWithTarget:[RankManager sharedInstance] selector:@selector(completeReview) object:nil]; 1348 | [[RankManager sharedInstance] performSelector:@selector(doDownload) withObject:nil afterDelay:4]; 1349 | NSLog(@"-----------------------------ReviewDownloadEvent------------------------------"); 1350 | } 1351 | 1352 | void ChangeNickNameEvent(CFNotificationCenterRef center, 1353 | void *observer, 1354 | CFStringRef name, 1355 | const void *object, 1356 | CFDictionaryRef userInfo) 1357 | { 1358 | [NSObject cancelPreviousPerformRequestsWithTarget:[RankManager sharedInstance] selector:@selector(completeReview) object:nil]; 1359 | if ([RankManager sharedInstance].currentRate == nil) 1360 | { 1361 | NSDictionary *ratedic = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Media/AppRank/currentrate.plist"]; 1362 | [RankManager sharedInstance].currentRate = [RateModel itemWithDictionary:ratedic]; 1363 | } 1364 | [RankManager sharedInstance].currentRate.nickname = [[RankManager sharedInstance] newNickName]; 1365 | NSDictionary *dic = [[RankManager sharedInstance].currentRate toDictionary]; 1366 | [dic writeToFile:@"/var/mobile/Media/AppRank/currentrate.plist" atomically:YES]; 1367 | [[RankManager sharedInstance] writeLog:[NSString stringWithFormat:@"ChangeNickNameEvent %@",dic]]; 1368 | [[RankManager sharedInstance] performSelector:@selector(doTouchWriteReview) withObject:nil afterDelay:5]; 1369 | NSLog(@"-----------------------------ChangeNickNameEvent------------------------------"); 1370 | } 1371 | 1372 | %hook ASAppDelegate 1373 | %new 1374 | - (void)btnSkipClicked:(id)sender 1375 | { 1376 | NSString *logString = [NSString stringWithFormat:@"%@ skip download",[RankManager sharedInstance].currentAccount.appleid]; 1377 | [[RankManager sharedInstance] writeLog:logString]; 1378 | if (![RankManager sharedInstance].bCheckProgress) 1379 | { 1380 | [RankManager sharedInstance].bSkip = YES; 1381 | } 1382 | } 1383 | 1384 | - (_Bool)application:(id)arg1 didFinishLaunchingWithOptions:(id)arg2 { 1385 | CFNotificationCenterAddObserver( 1386 | CFNotificationCenterGetDarwinNotifyCenter(), 1387 | NULL, 1388 | RateSubmitEvent, 1389 | (CFStringRef)@"com.lotogram.ratesubmitclicked", 1390 | NULL, 1391 | CFNotificationSuspensionBehaviorCoalesce); 1392 | 1393 | CFNotificationCenterAddObserver( 1394 | CFNotificationCenterGetDarwinNotifyCenter(), 1395 | NULL, 1396 | ReviewDownloadEvent, 1397 | (CFStringRef)@"com.lotogram.downloadapptoreview", 1398 | NULL, 1399 | CFNotificationSuspensionBehaviorCoalesce); 1400 | 1401 | CFNotificationCenterAddObserver( 1402 | CFNotificationCenterGetDarwinNotifyCenter(), 1403 | NULL, 1404 | ChangeNickNameEvent, 1405 | (CFStringRef)@"com.lotogram.changenickname", 1406 | NULL, 1407 | CFNotificationSuspensionBehaviorCoalesce); 1408 | 1409 | CFNotificationCenterAddObserver( 1410 | CFNotificationCenterGetDarwinNotifyCenter(), 1411 | NULL, 1412 | PurchasedEvent, 1413 | (CFStringRef)@"com.lotogram.springboard_purchased_tips", 1414 | NULL, 1415 | CFNotificationSuspensionBehaviorCoalesce); 1416 | 1417 | BOOL didfinish = %orig(arg1,arg2); 1418 | UIWindow* window = [UIApplication sharedApplication].keyWindow; 1419 | [window makeKeyAndVisible]; 1420 | CGRect frame = [UIScreen mainScreen].bounds; 1421 | frame.origin.y = frame.size.height - 100; 1422 | frame.size.height = 50; 1423 | UIView *polygonView = [[UIView alloc] initWithFrame: frame]; 1424 | polygonView.backgroundColor = [UIColor redColor]; 1425 | [window addSubview:polygonView]; 1426 | 1427 | UILabel *statusLabel = [[UILabel alloc] initWithFrame:CGRectMake(80, 10, 320, 30)]; 1428 | statusLabel.font = [UIFont systemFontOfSize:12]; 1429 | [polygonView addSubview:statusLabel]; 1430 | 1431 | UIButton *skipBtn = [[UIButton alloc] init]; 1432 | skipBtn.frame = CGRectMake(0, 0, 80, 50); 1433 | [skipBtn setTitle:@"Skip" forState:UIControlStateNormal]; 1434 | [skipBtn addTarget:self action:@selector(btnSkipClicked:) forControlEvents:UIControlEventTouchUpInside]; 1435 | [polygonView addSubview:skipBtn]; 1436 | 1437 | [RankManager sharedInstance].statusLabel = statusLabel; 1438 | [RankManager sharedInstance].tabBarVc = nil; 1439 | [RankManager sharedInstance].searchBar = nil; 1440 | [RankManager sharedInstance].naviVC = nil; 1441 | [RankManager sharedInstance].appleIDButton = nil; 1442 | [RankManager sharedInstance].accountVC = nil; 1443 | [RankManager sharedInstance].currentVC = nil; 1444 | [RankManager sharedInstance].bDownloadSuccess = NO; 1445 | [RankManager sharedInstance].bInDownloading = NO; 1446 | //notify_post("com.lotogram.appstoredeleteapp"); 1447 | // [[RankManager sharedInstance] getSearchText]; 1448 | return didfinish; 1449 | } 1450 | 1451 | %end 1452 | 1453 | %hook SSAuthenticationContext 1454 | -(BOOL)canCreateNewAccount 1455 | { 1456 | return NO; 1457 | } 1458 | %end 1459 | 1460 | // %hook SSDownloadMetadata 1461 | // -(id)init 1462 | // { 1463 | // return %orig; 1464 | // } 1465 | // -(BOOL)isRedownloadDownload 1466 | // { 1467 | // return NO; 1468 | // } 1469 | // -(void)setRedownloadDownload:(BOOL)arg1 1470 | // { 1471 | // %orig(NO); 1472 | // } 1473 | // %end 1474 | 1475 | // %hook SSPurchase 1476 | // -(void)setUsesLocalRedownloadParametersIfPossible:(BOOL)arg1 1477 | // { 1478 | // %orig(NO); 1479 | // } 1480 | // -(BOOL)usesLocalRedownloadParametersIfPossible 1481 | // { 1482 | // return NO; 1483 | // } 1484 | // -(NSString *)buyParameters 1485 | // { 1486 | // NSString *para = %orig; 1487 | // return para; 1488 | // } 1489 | // -(void)setBuyParameters:(NSString *)arg1 1490 | // { 1491 | // NSArray *temps = [arg1 componentsSeparatedByString:@"&"]; 1492 | // NSString *searchString = nil; 1493 | // for (NSString *para in temps) { 1494 | // if ([para rangeOfString:@"mtSearchTerm"].location != NSNotFound) { 1495 | // searchString = para; 1496 | // break; 1497 | // } 1498 | // } 1499 | // NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Media/AppRank/applist.plist"]; 1500 | // NSString *searchterms = [dic objectForKey:@"searchterms"]; 1501 | // NSArray *moreKeywords = [dic objectForKey:@"morekeywords"]; 1502 | // NSMutableArray *keyWords = [NSMutableArray arrayWithArray:moreKeywords]; 1503 | // [keyWords insertObject:searchterms atIndex:0]; 1504 | // // NSArray *moreKeywords = @[@"reflection",@"zoom app",@"photo brush",@"types",@"pattern"]; 1505 | // NSString *newSeatchTerm = @""; 1506 | // for (NSString *keyword in keyWords) { 1507 | // if (newSeatchTerm.length == 0) { 1508 | // newSeatchTerm = [newSeatchTerm stringByAppendingString:@"mtSearchTerm="]; 1509 | // newSeatchTerm = [newSeatchTerm stringByAppendingString:keyword]; 1510 | // } 1511 | // else 1512 | // { 1513 | // newSeatchTerm = [newSeatchTerm stringByAppendingString:@","]; 1514 | // newSeatchTerm = [newSeatchTerm stringByAppendingString:keyword]; 1515 | // } 1516 | // } 1517 | // if (searchString != nil) 1518 | // { 1519 | // NSString *paras = [arg1 stringByReplacingOccurrencesOfString:searchString withString:@"mtSearchTerm=pink"]; 1520 | // %orig(paras); 1521 | // } 1522 | // else 1523 | // %orig(arg1); 1524 | // } 1525 | // %end 1526 | %end 1527 | 1528 | %ctor { 1529 | NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.lotogram.lotosettings.plist"]; 1530 | NSInteger work = [dic[@"work"] integerValue]; 1531 | if (work == 1) 1532 | { 1533 | %init(WorkAppRank); 1534 | printf("---------work apprank-----------"); 1535 | } 1536 | else 1537 | { 1538 | printf("---------work other-----------"); 1539 | } 1540 | } -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.superlake.apprank 2 | Name: AppRank 3 | Depends: mobilesubstrate 4 | Version: 0.0.1 5 | Architecture: iphoneos-arm 6 | Description: Give high ranking of App 7 | Maintainer: Shawn 8 | Author: Shawn 9 | Section: Tweaks 10 | -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1711+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1711+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1712+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1712+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1713+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1713+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1714+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1714+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1715+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1715+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1716+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1716+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1717+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1717+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1718+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1718+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1719+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1719+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1720+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1720+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1721+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1721+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1722+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1722+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1723+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1723+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1724+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1724+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1725+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1725+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1726+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1726+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1727+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1727+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1728+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1728+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1729+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1729+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1730+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1730+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1731+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1731+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1732+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1732+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1733+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1733+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1734+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1734+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1735+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1735+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1736+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1736+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1737+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1737+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1738+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1738+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1739+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1739+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1740+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1740+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1741+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1741+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1742+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1742+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1743+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1743+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1744+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1744+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1745+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1745+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1746+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1746+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1747+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1747+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1748+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1748+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1749+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1749+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1750+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1750+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1751+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1751+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1752+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1752+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1753+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1753+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1754+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1754+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1755+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1755+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1756+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1756+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1757+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1757+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1758+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1758+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1759+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1759+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1760+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1760+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1761+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1761+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1762+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1762+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1763+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1763+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1764+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1764+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1765+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1765+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1766+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1766+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1767+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1767+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1768+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1768+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1769+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1769+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1770+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1770+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1771+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1771+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1772+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1772+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1773+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1773+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1774+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1774+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1775+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1775+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1776+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1776+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1777+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1777+debug_iphoneos-arm.deb -------------------------------------------------------------------------------- /packages/com.superlake.apprank_0.0.1-1778+debug_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yecoco/YCStoreRank/90921a72e3b57ecaafb63e69b943bb30fa0a0bfa/packages/com.superlake.apprank_0.0.1-1778+debug_iphoneos-arm.deb --------------------------------------------------------------------------------