From b9f1383034a27f8f2970be97451eef97aa1a1130 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 20 Feb 2018 19:27:32 -0700 Subject: [PATCH 01/13] Update path to private headers --- script/update_headers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/update_headers b/script/update_headers index 7780e4de6..3a66a0c3f 100755 --- a/script/update_headers +++ b/script/update_headers @@ -16,7 +16,7 @@ check_class_dump() { extract_private_framework_headers() { local framework_name="$1"; shift - local directory="mas-cli/PrivateHeaders/${framework_name}" + local directory="App/PrivateHeaders/${framework_name}" mkdir -p "$directory" class-dump -Ho "$directory" "/System/Library/PrivateFrameworks/${framework_name}.framework" } From 0039e523299443d5d6d7d46b447eb0701ade07fc Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 21 Feb 2018 09:18:47 -0700 Subject: [PATCH 02/13] Update private headers from macOS High Sierra 10.13.3 (17D2047) --- App/AppStore/ISStoreAccount.swift | 48 ++++++++++++------- .../CommerceKit/CKAccountStore.h | 32 +++++++++---- .../CommerceKit/CKDownloadQueue.h | 8 +++- .../CommerceKit/CKPurchaseController.h | 14 ++++-- .../CommerceKit/CKServiceInterface.h | 2 +- .../CommerceKit/CKSoftwareMap.h | 13 +++-- .../CommerceKit/CKUpdateController.h | 23 ++++++++- .../StoreFoundation/CKSoftwareProduct.h | 4 +- .../ISAccountService-Protocol.h | 48 ++++++++----------- .../ISAuthenticationResponse.h | 13 +++++ .../StoreFoundation/ISServiceProxy.h | 5 ++ .../StoreFoundation/ISStoreAccount.h | 6 +++ .../StoreFoundation/ISStoreClient.h | 4 ++ .../StoreFoundation/SSDownload.h | 1 + .../StoreFoundation/SSPurchase.h | 7 ++- App/mas-cli-Bridging-Header.h | 1 + 16 files changed, 161 insertions(+), 68 deletions(-) create mode 100644 App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h diff --git a/App/AppStore/ISStoreAccount.swift b/App/AppStore/ISStoreAccount.swift index b610350a2..c833fd211 100644 --- a/App/AppStore/ISStoreAccount.swift +++ b/App/AppStore/ISStoreAccount.swift @@ -23,30 +23,46 @@ extension ISStoreAccount { let client = ISStoreClient(storeClientType: 0) accountService.setStoreClient(client) - let context = ISAuthenticationContext(accountID: 0)! - context.appleIDOverride = username - - if systemDialog { - context.appleIDOverride = username - } else { - context.demoMode = true - context.demoAccountName = username - context.demoAccountPassword = password - context.demoAutologinMode = true - } - +// let context = ISAuthenticationContext(accountID: 0)! +// context.appleIDOverride = username +// +// if systemDialog { +// context.appleIDOverride = username +// } else { +// context.demoMode = true +// context.demoAccountName = username +// context.demoAccountPassword = password +// context.demoAutologinMode = true +// } + let group = DispatchGroup() group.enter() - - accountService.signIn(with: context) { success, _account, _error in - if success { + + accountService.account(withAppleID: username) { (storeAccount: ISStoreAccount?) in + if let _account = storeAccount { + _account.password = password +// accountService.add(_account) + accountService.addAccount(authenticationResponse: ISAuthenticationResponse, makePrimary: true) { (storeAccount: ISStoreAccount?) + if let _account = storeAccount { + account = _account + } + } account = _account } else { - error = .signInFailed(error: _error as NSError?) + // TODO: Handle failed AppleID lookup } group.leave() } +// accountService.signIn(with: context) { success, _account, _error in +// if success { +// account = _account +// } else { +// error = .signInFailed(error: _error as NSError?) +// } +// group.leave() +// } + if systemDialog { group.wait() } else { diff --git a/App/PrivateHeaders/CommerceKit/CKAccountStore.h b/App/PrivateHeaders/CommerceKit/CKAccountStore.h index 37fdc3406..fc793aa98 100644 --- a/App/PrivateHeaders/CommerceKit/CKAccountStore.h +++ b/App/PrivateHeaders/CommerceKit/CKAccountStore.h @@ -8,30 +8,46 @@ #import "ISStoreURLOperationDelegate-Protocol.h" -@class ISStoreAccount, NSArray, NSString; +@class CKDemoAccount, CKStoreAccount, CKStoreClient, ISStoreAccount, NSArray, NSString; @interface CKAccountStore : CKServiceInterface { +// CKStoreClient *_storeClient; } + (CKAccountStore *)sharedAccountStore; -- (void)removePrimaryAccountObserver:(id)arg1; -//- (id)addPrimaryAccountObserverWithBlock:(CDUnknownBlockType)arg1; ++ (id)accountStoreForStoreClient:(id)arg1; +@property(readonly) CKStoreClient *storeClient; // @synthesize storeClient=_storeClient; +//- (void).cxx_destruct; +//- (void)getTouchIDStateForAccount:(id)arg1 completionBlock:(CDUnknownBlockType)arg2; +//- (void)setTouchIDStateForAccount:(id)arg1 state:(long long)arg2 completionBlock:(CDUnknownBlockType)arg3; //- (void)updatePasswordSettings:(id)arg1 completionBlock:(CDUnknownBlockType)arg2; //- (void)getPasswordSettingsWithCompletionBlock:(CDUnknownBlockType)arg1; //- (void)getEligibilityForService:(long long)arg1 completionBlock:(CDUnknownBlockType)arg2; - (id)eligibilityForService:(long long)arg1; -- (void)signOut; - (void)viewAccount; -- (void)signIn; //- (void)signInWithSuggestedAppleID:(id)arg1 allowChangeOfAppleID:(BOOL)arg2 completionHandler:(CDUnknownBlockType)arg3; +- (void)signIn; - (void)addAccount:(id)arg1; +@property(readonly) NSArray *accounts; - (id)accountWithAppleID:(id)arg1; - (id)accountForDSID:(id)arg1; -@property(readonly) BOOL primaryAccountIsPresentAndSignedIn; @property(readonly) ISStoreAccount *primaryAccount; -@property(readonly) NSArray *accounts; -- (id)init; +- (void)removePrimaryAccountObserver:(id)arg1; +//- (id)addPrimaryAccountObserverWithBlock:(CDUnknownBlockType)arg1; +- (id)initWithStoreClient:(id)arg1; +- (void)removeAccountObserver:(id)arg1; +- (id)addAccountObserver:(id)arg1; +//- (void)signOutWithCompletionHandler:(CDUnknownBlockType)arg1; +- (void)signOut; +- (id)storeAccountForAppleID:(id)arg1; +- (id)storeAccountForDSID:(id)arg1; +@property(readonly) BOOL primaryAccountIsPresentAndSignedIn; +@property(readonly) CKStoreAccount *primaryStoreAccount; +@property(readonly) CKDemoAccount *demoAccount; +@property(readonly) BOOL isDemoModeEnabled; +@property(readonly) NSArray *knownAccounts; +- (id)_initWithStoreClient:(id)arg1; @end diff --git a/App/PrivateHeaders/CommerceKit/CKDownloadQueue.h b/App/PrivateHeaders/CommerceKit/CKDownloadQueue.h index 3784b83d0..d170f25f8 100644 --- a/App/PrivateHeaders/CommerceKit/CKDownloadQueue.h +++ b/App/PrivateHeaders/CommerceKit/CKDownloadQueue.h @@ -8,21 +8,26 @@ @class NSArray, NSLock, NSMutableDictionary, CKDownloadQueueClient; @protocol CKDownloadQueueObserver; +@class CKDownloadQueueClient, NSArray, NSLock, NSMutableDictionary; @interface CKDownloadQueue : CKServiceInterface { NSMutableDictionary *_downloadsByItemID; NSLock *_downloadsLock; + NSMutableDictionary *_downloadQueueObservers; + CKDownloadQueueClient *_sharedObserver; } + (CKDownloadQueue *)sharedDownloadQueue; +@property(retain, nonatomic) CKDownloadQueueClient *sharedObserver; // @synthesize sharedObserver=_sharedObserver; +@property(retain, nonatomic) NSMutableDictionary *downloadQueueObservers; // @synthesize downloadQueueObservers=_downloadQueueObservers; //- (void).cxx_destruct; - (BOOL)cacheReceiptDataForDownload:(id)arg1; - (void)checkStoreDownloadQueueForAccount:(id)arg1; -- (void)recoverAvailableDiskSpace; - (void)lockedApplicationTriedToLaunchAtPath:(id)arg1; - (void)unlockApplicationsWithBundleIdentifier:(id)arg1; - (void)lockApplicationsForBundleID:(id)arg1; +- (void)performedIconAnimationForDownloadWithIdentifier:(unsigned long long)arg1; //- (void)fetchIconForItemIdentifier:(unsigned long long)arg1 atURL:(id)arg2 replyBlock:(CDUnknownBlockType)arg3; - (void)removeDownloadWithItemIdentifier:(unsigned long long)arg1; - (void)cancelDownload:(id)arg1 promptToConfirm:(BOOL)arg2 askToDelete:(BOOL)arg3; @@ -35,6 +40,7 @@ - (id)addObserver:(id)arg1; - (id)addObserver:(id)arg1 forDownloadTypes:(long long)arg2; //- (id)addObserverForDownloadTypes:(long long)arg1 withBlock:(CDUnknownBlockType)arg2; +- (void)connectionWasInterrupted; - (id)initWithStoreClient:(id)arg1; @end diff --git a/App/PrivateHeaders/CommerceKit/CKPurchaseController.h b/App/PrivateHeaders/CommerceKit/CKPurchaseController.h index 0dfba607d..2bd89aedf 100644 --- a/App/PrivateHeaders/CommerceKit/CKPurchaseController.h +++ b/App/PrivateHeaders/CommerceKit/CKPurchaseController.h @@ -8,6 +8,11 @@ #import @class SSPurchaseResponse; +@class NSArray, NSMutableArray, NSNumber; + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^SSPurchaseCompletion)(SSPurchase * _Nullable purchase, BOOL completed, NSError * _Nullable error, SSPurchaseResponse * _Nullable response); @interface CKPurchaseController : CKServiceInterface { @@ -20,10 +25,9 @@ } + (void)setNeedsSilentMachineAuthorization:(BOOL)arg1; -+ (CKPurchaseController *)sharedPurchaseController; -- (void)performPurchase:(SSPurchase *)purchase withOptions:(NSUInteger)options completionHandler:(void(^)(SSPurchase *, BOOL, NSError*, SSPurchaseResponse *))completionHandler; - ++ (CKPurchaseController * _Nonnull)sharedPurchaseController; //@property(copy) CDUnknownBlockType dialogHandler; // @synthesize dialogHandler=_dialogHandler; +//- (void).cxx_destruct; //- (BOOL)adoptionCompletedForBundleID:(id)arg1; //- (void)_performVPPReceiptRenewal; //- (void)checkServerDownloadQueue; @@ -32,7 +36,9 @@ //- (void)cancelPurchaseWithProductID:(id)arg1; //- (void)resumeDownloadForPurchasedProductID:(id)arg1; //- (void)startPurchases:(NSArray *)purchases shouldStartDownloads:(BOOL)downloads eventHandler:(CDUnknownBlockType)arg3; -//- (void)checkInstallRequirementsAtURL:(id)arg1 productID:(id)arg2 completionHandler:(CDUnknownBlockType)arg3; +//- (void)startPurchases:(NSArray *)purchases withOptions:(unsigned long long)arg2 completionHandler:(CDUnknownBlockType)arg3; +- (void)performPurchase:(SSPurchase * _Nonnull)purchase withOptions:(unsigned long long)arg2 completionHandler:(SSPurchaseCompletion _Nullable)completionHandler; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/CommerceKit/CKServiceInterface.h b/App/PrivateHeaders/CommerceKit/CKServiceInterface.h index 501dadd8f..14a263943 100644 --- a/App/PrivateHeaders/CommerceKit/CKServiceInterface.h +++ b/App/PrivateHeaders/CommerceKit/CKServiceInterface.h @@ -4,7 +4,7 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // -#import +#import "ISServiceProxy.h" @interface CKServiceInterface : ISServiceProxy { diff --git a/App/PrivateHeaders/CommerceKit/CKSoftwareMap.h b/App/PrivateHeaders/CommerceKit/CKSoftwareMap.h index 74bb401fb..c24be71f4 100644 --- a/App/PrivateHeaders/CommerceKit/CKSoftwareMap.h +++ b/App/PrivateHeaders/CommerceKit/CKSoftwareMap.h @@ -9,15 +9,19 @@ NS_ASSUME_NONNULL_BEGIN @class NSLock, NSMutableArray; +@class CKSoftwareMapObserver, NSMutableDictionary; @interface CKSoftwareMap : CKServiceInterface { - NSMutableArray *_observers; - NSLock *_observersLock; + NSMutableDictionary *_productsObservers; + CKSoftwareMapObserver *_sharedObserver; } + (CKSoftwareMap *)sharedSoftwareMap; -- (id)adaptableBundleIdentifiers; +@property(retain, nonatomic) CKSoftwareMapObserver *sharedObserver; // @synthesize sharedObserver=_sharedObserver; +@property(retain, nonatomic) NSMutableDictionary *productsObservers; // @synthesize productsObservers=_productsObservers; +//- (void).cxx_destruct; +- (id)adoptableBundleIdentifiers; - (BOOL)adoptionCompletedForBundleID:(id)arg1 adoptingDSID:(out _Nullable id * _Nonnull)arg2 appleID:(out _Nullable id * _Nonnull)arg3; - (id)updateRequestBodyData:(char *)arg1 includeInstalledApps:(BOOL)arg2 includeBundledApps:(BOOL)arg3 conditionally:(BOOL)arg4 hadUnadoptedApps:(out char *)arg5; - (id)iconForApplicationWithBundeID:(id)arg1; @@ -28,8 +32,9 @@ NS_ASSUME_NONNULL_BEGIN - (NSArray* __nullable)allProducts; - (CKSoftwareProduct *)productForItemIdentifier:(unsigned long long)arg1; - (nullable CKSoftwareProduct *)productForBundleIdentifier:(NSString *)arg1; -- (void)removeProductsObserver:(id)arg1; +- (void)removeProductsObserverForToken:(id)arg1; //- (id)addProductsObserver:(CDUnknownBlockType)arg1 queue:(id)arg2; +- (void)connectionWasInterrupted; - (id)initWithStoreClient:(id)arg1; @end diff --git a/App/PrivateHeaders/CommerceKit/CKUpdateController.h b/App/PrivateHeaders/CommerceKit/CKUpdateController.h index c938d675f..cb11cff91 100644 --- a/App/PrivateHeaders/CommerceKit/CKUpdateController.h +++ b/App/PrivateHeaders/CommerceKit/CKUpdateController.h @@ -7,16 +7,29 @@ #import "CKServiceInterface.h" @class CKUpdate; +@class CKUpdateControllerClient, NSMutableDictionary; NS_ASSUME_NONNULL_BEGIN @interface CKUpdateController : CKServiceInterface { + BOOL _shouldNotAttemptInstallationAfterFailureDialog; // CDUnknownBlockType _dialogHandler; + NSMutableDictionary *_availableUpdatesObservers; + NSMutableDictionary *_updateScanObservers; + NSMutableDictionary *_updateProgressObservers; + CKUpdateControllerClient *_sharedObserver; } + (CKUpdateController * _Nullable)sharedUpdateController; +@property(retain, nonatomic) CKUpdateControllerClient *sharedObserver; // @synthesize sharedObserver=_sharedObserver; +@property(retain, nonatomic) NSMutableDictionary *updateProgressObservers; // @synthesize updateProgressObservers=_updateProgressObservers; +@property(retain, nonatomic) NSMutableDictionary *updateScanObservers; // @synthesize updateScanObservers=_updateScanObservers; +@property(retain, nonatomic) NSMutableDictionary *availableUpdatesObservers; // @synthesize availableUpdatesObservers=_availableUpdatesObservers; +@property BOOL shouldNotAttemptInstallationAfterFailureDialog; // @synthesize shouldNotAttemptInstallationAfterFailureDialog=_shouldNotAttemptInstallationAfterFailureDialog; //@property(copy) CDUnknownBlockType dialogHandler; // @synthesize dialogHandler=_dialogHandler; //- (void).cxx_destruct; +- (void)didInteractivelyPurchaseItemIdentifier:(unsigned long long)arg1 success:(BOOL)arg2; +- (BOOL)willInteractivelyPurchaseItemIdentifier:(unsigned long long)arg1; - (void)promptUserToOptInForAutoUpdateWithShowNotification:(BOOL)arg1; - (BOOL)shouldPromptForAutoUpdateOptIn; - (BOOL)isAutoUpdatedEnabled; @@ -26,9 +39,9 @@ NS_ASSUME_NONNULL_BEGIN - (int)catalogTrustLevel; - (id)catalogHostName; - (void)stopObservingOSUpdateProgressWithCallback:(id)arg1; -//- (id)observerOSUpdateProgressWithProgressHandler:(CDUnknownBlockType)arg1; +//- (id)observeOSUpdateProgressWithProgressHandler:(CDUnknownBlockType)arg1; - (void)stopObservingOSUpdateScansWithCallback:(id)arg1; -//- (id)observerOSUpdateScansWithProgressHandler:(CDUnknownBlockType)arg1; +//- (id)observeOSUpdateScansWithProgressHandler:(CDUnknownBlockType)arg1; - (void)startOSUpdateScanWithForceFullScan:(BOOL)arg1 reportProgressImmediately:(BOOL)arg2 launchedFromNotification:(BOOL)arg3 userHasSeenAllUpdates:(BOOL)arg4 checkForOtherUpdates:(BOOL)arg5; - (void)unhideAllOSUpdates; - (void)hideOSUpdatesWithProductKeys:(id)arg1; @@ -42,10 +55,14 @@ NS_ASSUME_NONNULL_BEGIN - (id)osUpdatesToBeInstalledLater; - (id)osUpdatesToBeInstalledAfterLogout; - (void)cancelUpdatesToBeInstalledLater; +//- (void)queueOSUpdatesForLaterInstall:(id)arg1 withMode:(long long)arg2 completionHandler:(CDUnknownBlockType)arg3; - (void)installAvailableUpdatesLaterWithMode:(long long)arg1; - (BOOL)shouldOfferDoItLater; +//- (void)updatesWithTags:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; - (void)installAllAvailableUpdates; +//- (void)startAppInstallWithTags:(id)arg1 fallbackPurchase:(id)arg2 completionHandler:(CDUnknownBlockType)arg3; //- (void)startAppUpdates:(id)arg1 andOSUpdates:(id)arg2 withDelegate:(id)arg3 completionHandler:(CDUnknownBlockType)arg4; +//- (void)_checkForBookUpdatesWithCompletionHandler:(CDUnknownBlockType)arg1; //- (void)checkForUpdatesWithUserHasSeenUpdates:(BOOL)arg1 completionHandler:(CDUnknownBlockType)arg2; - (void)removeAvailableUpdatesObserver:(id)arg1; //- (id)addAvailableUpdatesObserverWithBlock:(CDUnknownBlockType)arg1; @@ -53,6 +70,8 @@ NS_ASSUME_NONNULL_BEGIN - (id)incompatibleUpdates; - (nullable CKUpdate *)availableUpdateWithItemIdentifier:(unsigned long long)arg1; - (NSArray*)availableUpdates; +- (void)connectionWasInterrupted; +- (id)initWithStoreClient:(id)arg1; - (id)init; @end diff --git a/App/PrivateHeaders/StoreFoundation/CKSoftwareProduct.h b/App/PrivateHeaders/StoreFoundation/CKSoftwareProduct.h index dc689e118..f56f132ee 100644 --- a/App/PrivateHeaders/StoreFoundation/CKSoftwareProduct.h +++ b/App/PrivateHeaders/StoreFoundation/CKSoftwareProduct.h @@ -25,6 +25,7 @@ NSNumber *_itemIdentifier; NSNumber *_storeFrontIdentifier; NSNumber *_versionIdentifier; + NSDate *_purchaseDate; NSValue *_mdItemRef; NSString *_vppLicenseOrganizationName; NSDate *_vppLicenseExpirationDate; @@ -35,7 +36,7 @@ NSNumber *_expectedStoreVersion; } -+ (nullable instancetype)productAtPath:(nonnull NSString *)arg1; ++ (nullable instancetype)createSoftwareProductForAppAtPath:(nonnull NSString *)arg1; + (nullable instancetype)productPathToUpgradeForBundleIdentifier:(nonnull NSString *)bundleIdentifier versionNumberString:(nonnull NSString *)versionNumber; + (BOOL)supportsSecureCoding; @property(copy, nullable) NSNumber *expectedStoreVersion; // @synthesize expectedStoreVersion=_expectedStoreVersion; @@ -52,6 +53,7 @@ @property BOOL isVPPLicensed; // @synthesize isVPPLicensed=_isVPPLicensed; @property BOOL installed; // @synthesize installed=_installed; @property(retain, nullable) NSValue *mdItemRef; // @synthesize mdItemRef=_mdItemRef; +@property(retain, nullable) NSDate *purchaseDate; // @synthesize purchaseDate=_purchaseDate; @property(retain, nullable) NSNumber *versionIdentifier; // @synthesize versionIdentifier=_versionIdentifier; @property(retain, nullable) NSNumber *storeFrontIdentifier; // @synthesize storeFrontIdentifier=_storeFrontIdentifier; @property(retain, nonnull) NSNumber *itemIdentifier; // @synthesize itemIdentifier=_itemIdentifier; diff --git a/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h b/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h index 3086f3f96..10ea81b96 100644 --- a/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h +++ b/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h @@ -4,23 +4,16 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // -@class ISAuthenticationContext, ISAuthenticationResponse, ISStoreAccount, NSDictionary, NSNumber, NSString, NSURL; +@class ISAuthenticationContext, ISAuthenticationResponse, ISStoreAccount, NSDictionary, NSNumber, NSString, NSURL, NSURLResponse; @protocol ISAccountService -//- (void)completeSetupWithResponse:(NSDictionary *)arg1 withReply:(void (^)(BOOL, NSError *))arg2; -//- (void)handlePushNotificationMessage:(NSDictionary *)arg1; -//- (void)isRegisteredForAccount:(NSNumber *)arg1 andMask:(long long)arg2 withReply:(void (^)(BOOL, NSError *, BOOL))arg3; -//- (void)disableAutoDownloadWithReply:(void (^)(BOOL, NSError *))arg1; -//- (void)enableAutoDownloadForEnvironmentNamed:(NSString *)arg1 withReply:(void (^)(BOOL, NSError *))arg2; -//- (void)getEnabledMediaTypesWithReply:(void (^)(BOOL, NSError *, long long))arg1; -//- (void)registerDeviceTokenForEnvironmentNamed:(NSString *)arg1 withReply:(void (^)(BOOL, NSError *))arg2; -//- (void)recommendedAppleIDForAccountSignIn:(void (^)(NSString *))arg1; -//- (void)iCloudDSIDReplyBlock:(void (^)(NSString *))arg1; -//- (void)setStoreFrontID:(NSString *)arg1; -//- (void)storeFrontWithReplyBlock:(void (^)(NSString *))arg1; -//- (void)shouldSendGUIDWithRequestForURL:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; -//- (void)consumeCookiesWithHTTPHeaders:(NSDictionary *)arg1 fromURL:(NSURL *)arg2; -//- (void)httpHeadersForURL:(NSURL *)arg1 forDSID:(NSNumber *)arg2 includeADIHeaders:(BOOL)arg3 withReplyBlock:(void (^)(NSDictionary *))arg4; +- (void)recommendedAppleIDForAccountSignIn:(void (^)(NSString *))arg1; +- (void)iCloudDSIDReplyBlock:(void (^)(NSString *))arg1; +- (void)setStoreFrontID:(NSString *)arg1; +- (void)storeFrontWithReplyBlock:(void (^)(NSString *))arg1; +- (void)shouldSendGUIDWithRequestForURL:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; +- (void)processURLResponse:(NSURLResponse *)arg1; +- (void)httpHeadersForURL:(NSURL *)arg1 forDSID:(NSNumber *)arg2 includeADIHeaders:(BOOL)arg3 withReplyBlock:(void (^)(NSDictionary *))arg4; //- (void)removeURLBagObserver:(id )arg1; //- (void)addURLBagObserver:(id )arg1; //- (void)dictionaryWithReplyBlock:(void (^)(NSDictionary *))arg1; @@ -31,23 +24,20 @@ //- (void)needsSilentADIActionForURL:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; //- (void)urlIsTrustedByURLBag:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; //- (void)valueForURLBagKey:(NSString *)arg1 withReplyBlock:(void (^)(id))arg2; -//- (void)updatePasswordSettings:(NSDictionary *)arg1 replyBlock:(void (^)(BOOL, NSError *))arg2; -//- (void)getPasswordSettingsWithReplyBlock:(void (^)(NSDictionary *, NSError *))arg1; -//- (void)getEligibilityForService:(NSNumber *)arg1 replyBlock:(void (^)(NSNumber *, NSError *))arg2; -//- (void)eligibilityForService:(NSNumber *)arg1 replyBlock:(void (^)(NSNumber *))arg2; -//- (void)retailStoreDemoModeReplyBlock:(void (^)(BOOL, NSString *, NSString *, BOOL))arg1; +- (void)getTouchIDPreferenceWithReplyBlock:(void (^)(BOOL, ISStoreAccount *, NSError *))arg1; +- (void)updateTouchIDSettingsForDSID:(NSNumber *)arg1 replyBlock:(void (^)(BOOL, NSError *))arg2; +- (void)setTouchIDState:(long long)arg1 forDSID:(NSNumber *)arg2 replyBlock:(void (^)(BOOL, NSError *))arg3; +- (void)generateTouchIDHeadersForDSID:(NSNumber *)arg1 challenge:(NSString *)arg2 caller:(id)arg3 replyBlock:(void (^)(NSDictionary *, NSError *))arg4; +- (void)retailStoreDemoModeReplyBlock:(void (^)(BOOL, NSString *, NSString *, BOOL))arg1; //- (void)removeAccountStoreObserver:(id )arg1; //- (void)addAccountStoreObserver:(id )arg1; //- (void)parseCreditStringForProtocol:(NSDictionary *)arg1; - (void)signOut; -- (void)signInWithContext:(ISAuthenticationContext * __nonnull)arg1 replyBlock:(void (^ __nonnull)(BOOL, ISStoreAccount * __nullable, NSError * __nullable))arg2; -//- (void)addAccount:(ISStoreAccount *)arg1; -//- (void)addAccountWithAuthenticationResponse:(ISAuthenticationResponse *)arg1 makePrimary:(BOOL)arg2 replyBlock:(void (^)(ISStoreAccount *))arg3; -//- (void)accountWithAppleID:(NSString *)arg1 replyBlock:(void (^)(ISStoreAccount *))arg2; -//- (void)accountWithDSID:(NSNumber *)arg1 replyBlock:(void (^)(ISStoreAccount *))arg2; -//- (void)primaryAccountWithReplyBlock:(void (^)(ISStoreAccount *))arg1; -//- (void)authIsExpiredWithReplyBlock:(void (^)(BOOL))arg1; -//- (void)strongTokenForAccount:(ISStoreAccount *)arg1 withReplyBlock:(void (^)(NSString *))arg2; -//- (void)accountsWithReplyBlock:(void (^)(NSArray *))arg1; +- (void)addAccount:(ISStoreAccount *)arg1; +- (void)addAccountWithAuthenticationResponse:(ISAuthenticationResponse *)arg1 makePrimary:(BOOL)arg2 replyBlock:(void (^)(ISStoreAccount *))arg3; +- (void)accountWithAppleID:(NSString *)arg1 replyBlock:(void (^)(ISStoreAccount *))arg2; +- (void)accountWithDSID:(NSNumber *)arg1 replyBlock:(void (^)(ISStoreAccount *))arg2; +- (void)primaryAccountWithReplyBlock:(void (^)(ISStoreAccount *))arg1; +- (void)authIsExpiredWithReplyBlock:(void (^)(BOOL))arg1; @end diff --git a/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h b/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h new file mode 100644 index 000000000..06244c428 --- /dev/null +++ b/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h @@ -0,0 +1,13 @@ +// +// ISAuthenticationResponse.h +// mas-cli +// +// Created by Ben Chatelain on 2/25/18. +// Copyright © 2018 Andrew Naylor. All rights reserved. +// + +#ifndef ISAuthenticationResponse_h +#define ISAuthenticationResponse_h + + +#endif /* ISAuthenticationResponse_h */ diff --git a/App/PrivateHeaders/StoreFoundation/ISServiceProxy.h b/App/PrivateHeaders/StoreFoundation/ISServiceProxy.h index 8dd5a5e62..08678cd92 100644 --- a/App/PrivateHeaders/StoreFoundation/ISServiceProxy.h +++ b/App/PrivateHeaders/StoreFoundation/ISServiceProxy.h @@ -9,6 +9,7 @@ @class ISStoreClient, NSLock, NSMutableDictionary, Protocol; @protocol ISAccountService; +@class ISStoreClient, Protocol; @interface ISServiceProxy : NSObject { @@ -21,7 +22,9 @@ typedef void (^ISErrorHandler)(NSError * __nonnull error); + (ISServiceProxy * __nonnull)genericSharedProxy; ++ (void)initialize; @property(retain, nonatomic) ISStoreClient * __nullable storeClient; // @synthesize storeClient=_storeClient; +//- (void).cxx_destruct; //- (void)uiServiceSynchronousBlock:(CDUnknownBlockType)arg1; //@property(readonly, nonatomic) id uiService; //- (id)uiServiceWithErrorHandler:(CDUnknownBlockType)arg1; @@ -40,6 +43,8 @@ typedef void (^ISErrorHandler)(NSError * __nonnull error); //- (void)accountServiceSynchronousBlock:(void (^ __nonnull)(id __nonnull))arg1; @property(readonly, nonatomic) id __nonnull accountService; //- (id __nonnull)accountServiceWithErrorHandler:(ISErrorHandler __nonnull)arg1; +- (void)connectionWasInterrupted; +- (void)registerForInterrptionNotification; //- (void)performSynchronousBlock:(CDUnknownBlockType)arg1 withServiceName:(id)arg2 protocol:(id)arg3 isMachService:(BOOL)arg4 interfaceClassName:(id)arg5; //- (id)objectProxyForServiceName:(id)arg1 protocol:(id)arg2 interfaceClassName:(id)arg3 isMachService:(BOOL)arg4 errorHandler:(CDUnknownBlockType)arg5; //- (id)connectionWithServiceName:(id)arg1 protocol:(id)arg2 isMachService:(BOOL)arg3; diff --git a/App/PrivateHeaders/StoreFoundation/ISStoreAccount.h b/App/PrivateHeaders/StoreFoundation/ISStoreAccount.h index cba764bc4..af0162b4e 100644 --- a/App/PrivateHeaders/StoreFoundation/ISStoreAccount.h +++ b/App/PrivateHeaders/StoreFoundation/ISStoreAccount.h @@ -10,7 +10,9 @@ { NSTimer *_tokenInvalidTimer; BOOL _isSignedIn; + BOOL _isManagedStudent; BOOL _primary; + long long _touchIDState; NSNumber *_dsID; NSString *_identifier; long long _kind; @@ -32,6 +34,7 @@ @property long long URLBagType; // @synthesize URLBagType=_URLBagType; @property(copy) NSString *token; // @synthesize token=_token; @property(copy) NSString *password; // @synthesize password=_password; +@property BOOL isManagedStudent; // @synthesize isManagedStudent=_isManagedStudent; @property BOOL isSignedIn; // @synthesize isSignedIn=_isSignedIn; @property(retain) NSString *storeFront; // @synthesize storeFront=_storeFront; @property(copy) NSString *creditString; // @synthesize creditString=_creditString; @@ -39,6 +42,9 @@ @property(copy) NSString *identifier; // @synthesize identifier=_identifier; @property(copy) NSNumber *dsID; // @synthesize dsID=_dsID; //- (void).cxx_destruct; +- (long long)getTouchIDState; +@property long long touchIDState; // @synthesize touchIDState=_touchIDState; +- (void)resetTouchIDState; - (void)mergeValuesFromAuthenticationResponse:(id)arg1; - (BOOL)hasValidStrongToken; - (double)strongTokenValidForSecond; diff --git a/App/PrivateHeaders/StoreFoundation/ISStoreClient.h b/App/PrivateHeaders/StoreFoundation/ISStoreClient.h index 9d8c7d5f2..7fdf5baf1 100644 --- a/App/PrivateHeaders/StoreFoundation/ISStoreClient.h +++ b/App/PrivateHeaders/StoreFoundation/ISStoreClient.h @@ -10,6 +10,7 @@ { BOOL __alwaysUseSandboxEnvironment; BOOL _isDaemon; + int _pid; unsigned long long _frameworkVersion; NSString *_identifier; long long _clientType; @@ -39,6 +40,7 @@ + (BOOL)supportsSecureCoding; @property BOOL isDaemon; // @synthesize isDaemon=_isDaemon; @property(copy) NSString *agentListenerName; // @synthesize agentListenerName=_agentListenerName; +@property(readonly) int pid; // @synthesize pid=_pid; @property(copy) NSString *displayUIHostID; // @synthesize displayUIHostID=_displayUIHostID; @property(copy) NSDictionary *daap; // @synthesize daap=_daap; @property(copy) NSString *appPath; // @synthesize appPath=_appPath; @@ -63,12 +65,14 @@ @property(copy) NSString *identifier; // @synthesize identifier=_identifier; @property unsigned long long frameworkVersion; // @synthesize frameworkVersion=_frameworkVersion; //- (void).cxx_destruct; +- (id)callerIdentity; - (BOOL)isEqualToStoreClient:(id)arg1; - (void)_cacheKnownClient:(id)arg1; - (id)initWithCoder:(id)arg1; - (void)encodeWithCoder:(id)arg1; - (id)initWithApplicationPath:(id)arg1; - (id)initWithStoreClientType:(long long)arg1; +- (id)init; @end diff --git a/App/PrivateHeaders/StoreFoundation/SSDownload.h b/App/PrivateHeaders/StoreFoundation/SSDownload.h index c89fa4167..9852de66b 100644 --- a/App/PrivateHeaders/StoreFoundation/SSDownload.h +++ b/App/PrivateHeaders/StoreFoundation/SSDownload.h @@ -52,6 +52,7 @@ - (void)encodeWithCoder:(id)arg1; - (BOOL)isEqual:(id)arg1; - (id)initWithAssets:(id)arg1 metadata:(id)arg2; +- (id)init; - (void)resume; - (void)pause; - (void)cancel; diff --git a/App/PrivateHeaders/StoreFoundation/SSPurchase.h b/App/PrivateHeaders/StoreFoundation/SSPurchase.h index 8036a3e01..24995b53b 100644 --- a/App/PrivateHeaders/StoreFoundation/SSPurchase.h +++ b/App/PrivateHeaders/StoreFoundation/SSPurchase.h @@ -22,25 +22,29 @@ BOOL _isVPP; BOOL _shouldBeInstalledAfterLogout; BOOL _isCancelled; + BOOL _isDSIDLessPurchase; NSString *_sortableAccountIdentifier; unsigned long long _itemIdentifier; // CDUnknownBlockType _authFallbackHandler; ISOperation *_purchaseOperation; NSDictionary *_responseDialog; + NSDictionary *_dsidLessOptions; } + (id)purchasesGroupedByAccountIdentifierWithPurchases:(id)arg1; + (BOOL)supportsSecureCoding; + (id)purchaseWithBuyParameters:(id)arg1; +@property(retain) NSDictionary *dsidLessOptions; // @synthesize dsidLessOptions=_dsidLessOptions; +@property BOOL isDSIDLessPurchase; // @synthesize isDSIDLessPurchase=_isDSIDLessPurchase; @property(copy) NSDictionary *responseDialog; // @synthesize responseDialog=_responseDialog; @property __weak ISOperation *purchaseOperation; // @synthesize purchaseOperation=_purchaseOperation; @property BOOL isCancelled; // @synthesize isCancelled=_isCancelled; //@property(copy) CDUnknownBlockType authFallbackHandler; // @synthesize authFallbackHandler=_authFallbackHandler; @property unsigned long long itemIdentifier; // @synthesize itemIdentifier=_itemIdentifier; @property BOOL shouldBeInstalledAfterLogout; // @synthesize shouldBeInstalledAfterLogout=_shouldBeInstalledAfterLogout; +@property BOOL checkPreflightAterPurchase; // @synthesize checkPreflightAterPurchase=_checkPreflightAterPurchase; @property(readonly, nonatomic) NSString *sortableAccountIdentifier; // @synthesize sortableAccountIdentifier=_sortableAccountIdentifier; @property(retain, nonatomic) NSString *parentalControls; // @synthesize parentalControls=_parentalControls; -@property BOOL checkPreflightAterPurchase; // @synthesize checkPreflightAterPurchase=_checkPreflightAterPurchase; @property(retain, nonatomic) NSData *receiptData; // @synthesize receiptData=_receiptData; @property(nonatomic) long long purchaseType; // @synthesize purchaseType=_purchaseType; @property BOOL isVPP; // @synthesize isVPP=_isVPP; @@ -54,7 +58,6 @@ - (BOOL)purchaseDSIDMatchesPrimaryAccount; @property(readonly) BOOL needsAuthentication; // @dynamic needsAuthentication; @property BOOL isRecoveryPurchase; // @dynamic isRecoveryPurchase; -@property(readonly) BOOL isDSIDLessPurchase; - (id)productID; @property(readonly, nonatomic) NSString *uniqueIdentifier; - (id)_sortableAccountIdentifier; diff --git a/App/mas-cli-Bridging-Header.h b/App/mas-cli-Bridging-Header.h index e169f8814..7f1487d3b 100644 --- a/App/mas-cli-Bridging-Header.h +++ b/App/mas-cli-Bridging-Header.h @@ -29,6 +29,7 @@ #import #import #import +#import "ISAccountService-Protocol.h" #import @protocol CKDownloadQueueObserver From c4d8f8e744874c8ea19c313af7d074b9be13c368 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Tue, 20 Mar 2018 19:37:50 -0600 Subject: [PATCH 03/13] Add ISAuthenticationResponse.h --- .../ISAuthenticationResponse.h | 38 +++++++++++++++---- App/mas-cli-Bridging-Header.h | 1 + mas-cli.xcodeproj/project.pbxproj | 2 + 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h b/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h index 06244c428..db7316d18 100644 --- a/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h +++ b/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h @@ -1,13 +1,37 @@ // -// ISAuthenticationResponse.h -// mas-cli +// Generated by class-dump 3.5 (64 bit). // -// Created by Ben Chatelain on 2/25/18. -// Copyright © 2018 Andrew Naylor. All rights reserved. +// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // -#ifndef ISAuthenticationResponse_h -#define ISAuthenticationResponse_h +@class NSNumber, NSString; +@interface ISAuthenticationResponse : NSObject +{ + NSString *_token; + unsigned long long _urlBagType; + NSString *_storeFront; + BOOL _isManagedStudent; + unsigned long long _URLBagType; + NSString *_accountIdentifier; + long long _accountKind; + NSString *_creditString; + NSNumber *_dsID; +} -#endif /* ISAuthenticationResponse_h */ ++ (BOOL)supportsSecureCoding; +@property(readonly) BOOL isManagedStudent; // @synthesize isManagedStudent=_isManagedStudent; +@property(readonly) NSString *storeFront; // @synthesize storeFront=_storeFront; +@property(readonly) NSString *token; // @synthesize token=_token; +@property(readonly) NSNumber *dsID; // @synthesize dsID=_dsID; +@property(readonly) NSString *creditString; // @synthesize creditString=_creditString; +@property(readonly) long long accountKind; // @synthesize accountKind=_accountKind; +@property(readonly) NSString *accountIdentifier; // @synthesize accountIdentifier=_accountIdentifier; +@property unsigned long long URLBagType; // @synthesize URLBagType=_URLBagType; +//- (void).cxx_destruct; +- (BOOL)_loadFromDictionary:(id)arg1; +- (id)initWithCoder:(id)arg1; +- (void)encodeWithCoder:(id)arg1; +- (id)initWithDictionary:(id)arg1; + +@end diff --git a/App/mas-cli-Bridging-Header.h b/App/mas-cli-Bridging-Header.h index 7f1487d3b..3c81ce4fc 100644 --- a/App/mas-cli-Bridging-Header.h +++ b/App/mas-cli-Bridging-Header.h @@ -27,6 +27,7 @@ #import #import #import +#import #import #import #import "ISAccountService-Protocol.h" diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 9a261ecb5..dc0fca262 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -118,6 +118,7 @@ F865880A2030F6DE0093DE57 /* MASErrorTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MASErrorTestCase.swift; sourceTree = ""; }; F876BB4A20ED717800EB9FD1 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; FC1AE3BA07E7DEC5CED36469 /* Pods-mas-tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-mas-tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-mas-tests/Pods-mas-tests.debug.xcconfig"; sourceTree = ""; }; + F876300720438AF2003D370B /* ISAuthenticationResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ISAuthenticationResponse.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -238,6 +239,7 @@ ED1EF94E1BA6BBBF0075453C /* CKUpdate.h */, EDC90B621C6FF50B0019E396 /* ISAccountService-Protocol.h */, EDE2964F1C700B0300554778 /* ISAuthenticationContext.h */, + F876300720438AF2003D370B /* ISAuthenticationResponse.h */, ED1EF94F1BA6BBBF0075453C /* ISOperationDelegate-Protocol.h */, ED1EF9501BA6BBBF0075453C /* ISServiceProxy.h */, EDE296501C700B0300554778 /* ISServiceRemoteObject-Protocol.h */, From f46b7e145b1922534a103cb3b392733dd4f67135 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Thu, 5 Apr 2018 21:29:15 -0600 Subject: [PATCH 04/13] =?UTF-8?q?=F0=9F=93=A6=20Update=20private=20headers?= =?UTF-8?q?=20from=2010.13.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added nonnull markers --- App/AppStore/Downloader.swift | 6 +- App/AppStore/ISStoreAccount.swift | 2 +- App/AppStore/PurchaseDownloadObserver.swift | 13 +--- .../CommerceKit/CKAccountStore.h | 42 ++++++++--- .../CommerceKit/CKDownloadQueue.h | 24 ++++-- .../CommerceKit/CKPurchaseController.h | 10 ++- .../CommerceKit/CKSoftwareMap.h | 25 +++++-- .../CommerceKit/CKUpdateController.h | 43 ++++++++--- .../ISStoreURLOperationDelegate-Protocol.h | 7 +- .../StoreFoundation/CKSoftwareProduct.h | 43 +++++++---- App/PrivateHeaders/StoreFoundation/CKUpdate.h | 8 +- .../ISAccountService-Protocol.h | 42 +++++++---- .../StoreFoundation/ISAuthenticationContext.h | 11 ++- .../ISAuthenticationResponse.h | 16 +++- .../ISOperationDelegate-Protocol.h | 5 ++ .../StoreFoundation/ISServiceProxy.h | 75 +++++++++++-------- .../ISServiceRemoteObject-Protocol.h | 6 ++ .../StoreFoundation/ISStoreAccount.h | 11 ++- .../StoreFoundation/ISStoreClient.h | 11 ++- .../ISURLOperationDelegate-Protocol.h | 5 ++ .../StoreFoundation/SSDownload.h | 8 +- .../StoreFoundation/SSDownloadMetadata.h | 52 ++++++++++--- .../StoreFoundation/SSDownloadPhase.h | 14 +++- .../StoreFoundation/SSDownloadStatus.h | 11 ++- .../StoreFoundation/SSPurchase.h | 26 +++++-- .../StoreFoundation/SSPurchaseResponse.h | 11 ++- mas-cli.xcodeproj/project.pbxproj | 4 +- 27 files changed, 387 insertions(+), 144 deletions(-) diff --git a/App/AppStore/Downloader.swift b/App/AppStore/Downloader.swift index c269309f8..63efa86c4 100644 --- a/App/AppStore/Downloader.swift +++ b/App/AppStore/Downloader.swift @@ -16,7 +16,7 @@ func download(_ adamId: UInt64) -> MASError? { let purchase = SSPurchase(adamId: adamId, account: account) var purchaseError: MASError? - var observerIdentifier: Any? = nil + var observerIdentifier: CKDownloadQueueObserver? = nil group.enter() purchase.perform { purchase, _, error, response in @@ -39,7 +39,7 @@ func download(_ adamId: UInt64) -> MASError? { } let downloadQueue = CKDownloadQueue.shared() - observerIdentifier = downloadQueue?.add(observer) + observerIdentifier = downloadQueue.add(observer) } else { print("No downloads") @@ -51,7 +51,7 @@ func download(_ adamId: UInt64) -> MASError? { let _ = group.wait(timeout: .distantFuture) if let observerIdentifier = observerIdentifier { - CKDownloadQueue.shared().removeObserver(observerIdentifier) + CKDownloadQueue.shared().remove(observerIdentifier) } return purchaseError diff --git a/App/AppStore/ISStoreAccount.swift b/App/AppStore/ISStoreAccount.swift index c833fd211..ec8f5fd97 100644 --- a/App/AppStore/ISStoreAccount.swift +++ b/App/AppStore/ISStoreAccount.swift @@ -19,7 +19,7 @@ extension ISStoreAccount { var account: ISStoreAccount? = nil var error: MASError? = nil - let accountService = ISServiceProxy.genericShared().accountService + let accountService: ISAccountService = ISServiceProxy.genericShared().accountService let client = ISStoreClient(storeClientType: 0) accountService.setStoreClient(client) diff --git a/App/AppStore/PurchaseDownloadObserver.swift b/App/AppStore/PurchaseDownloadObserver.swift index 23c7d4579..ea7813543 100644 --- a/App/AppStore/PurchaseDownloadObserver.swift +++ b/App/AppStore/PurchaseDownloadObserver.swift @@ -24,8 +24,8 @@ if status.isFailed || status.isCancelled { queue.removeDownload(withItemIdentifier: download.metadata.itemIdentifier) } - else if let state = status.progressState { - progress(state) + else { + progress(status.progressState) } } @@ -90,13 +90,8 @@ func progress(_ state: ProgressState) { } extension SSDownloadStatus { - var progressState: ProgressState? { - if let phase = activePhase { - return ProgressState(percentComplete: percentComplete, phase: phase.phaseDescription) - } - else { - return nil - } + var progressState: ProgressState { + return ProgressState(percentComplete: percentComplete, phase: activePhase.phaseDescription) } } diff --git a/App/PrivateHeaders/CommerceKit/CKAccountStore.h b/App/PrivateHeaders/CommerceKit/CKAccountStore.h index fc793aa98..cb58d0a93 100644 --- a/App/PrivateHeaders/CommerceKit/CKAccountStore.h +++ b/App/PrivateHeaders/CommerceKit/CKAccountStore.h @@ -4,41 +4,58 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // -#import +// #import "NSObject.h" #import "ISStoreURLOperationDelegate-Protocol.h" +#import + +@class CKDemoAccount, CKStoreAccount, CKStoreClient, ISStoreAccount, NSArray; + +@class NSString; -@class CKDemoAccount, CKStoreAccount, CKStoreClient, ISStoreAccount, NSArray, NSString; +NS_ASSUME_NONNULL_BEGIN -@interface CKAccountStore : CKServiceInterface +@interface CKAccountStore : NSObject { -// CKStoreClient *_storeClient; + + // CKStoreClient *_storeClient; + } + (CKAccountStore *)sharedAccountStore; + + (id)accountStoreForStoreClient:(id)arg1; @property(readonly) CKStoreClient *storeClient; // @synthesize storeClient=_storeClient; -//- (void).cxx_destruct; -//- (void)getTouchIDStateForAccount:(id)arg1 completionBlock:(CDUnknownBlockType)arg2; -//- (void)setTouchIDStateForAccount:(id)arg1 state:(long long)arg2 completionBlock:(CDUnknownBlockType)arg3; -//- (void)updatePasswordSettings:(id)arg1 completionBlock:(CDUnknownBlockType)arg2; -//- (void)getPasswordSettingsWithCompletionBlock:(CDUnknownBlockType)arg1; -//- (void)getEligibilityForService:(long long)arg1 completionBlock:(CDUnknownBlockType)arg2; + +// - (void).cxx_destruct; +// - (void)getTouchIDStateForAccount:(id)arg1 completionBlock:(CDUnknownBlockType)arg2; +// - (void)setTouchIDStateForAccount:(id)arg1 state:(long long)arg2 completionBlock:(CDUnknownBlockType)arg3; +// - (void)updatePasswordSettings:(id)arg1 completionBlock:(CDUnknownBlockType)arg2; +// - (void)getPasswordSettingsWithCompletionBlock:(CDUnknownBlockType)arg1; +// - (void)getEligibilityForService:(long long)arg1 completionBlock:(CDUnknownBlockType)arg2; + - (id)eligibilityForService:(long long)arg1; - (void)viewAccount; + //- (void)signInWithSuggestedAppleID:(id)arg1 allowChangeOfAppleID:(BOOL)arg2 completionHandler:(CDUnknownBlockType)arg3; + - (void)signIn; + - (void)addAccount:(id)arg1; @property(readonly) NSArray *accounts; - (id)accountWithAppleID:(id)arg1; - (id)accountForDSID:(id)arg1; @property(readonly) ISStoreAccount *primaryAccount; - (void)removePrimaryAccountObserver:(id)arg1; -//- (id)addPrimaryAccountObserverWithBlock:(CDUnknownBlockType)arg1; + +// - (id)addPrimaryAccountObserverWithBlock:(CDUnknownBlockType)arg1; + - (id)initWithStoreClient:(id)arg1; - (void)removeAccountObserver:(id)arg1; - (id)addAccountObserver:(id)arg1; -//- (void)signOutWithCompletionHandler:(CDUnknownBlockType)arg1; + +// - (void)signOutWithCompletionHandler:(CDUnknownBlockType)arg1; + - (void)signOut; - (id)storeAccountForAppleID:(id)arg1; - (id)storeAccountForDSID:(id)arg1; @@ -51,3 +68,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/CommerceKit/CKDownloadQueue.h b/App/PrivateHeaders/CommerceKit/CKDownloadQueue.h index d170f25f8..9b7d31ade 100644 --- a/App/PrivateHeaders/CommerceKit/CKDownloadQueue.h +++ b/App/PrivateHeaders/CommerceKit/CKDownloadQueue.h @@ -6,10 +6,12 @@ #import -@class NSArray, NSLock, NSMutableDictionary, CKDownloadQueueClient; -@protocol CKDownloadQueueObserver; @class CKDownloadQueueClient, NSArray, NSLock, NSMutableDictionary; +@protocol CKDownloadQueueObserver; + +NS_ASSUME_NONNULL_BEGIN + @interface CKDownloadQueue : CKServiceInterface { NSMutableDictionary *_downloadsByItemID; @@ -18,17 +20,22 @@ CKDownloadQueueClient *_sharedObserver; } -+ (CKDownloadQueue *)sharedDownloadQueue; ++ (instancetype)sharedDownloadQueue; + @property(retain, nonatomic) CKDownloadQueueClient *sharedObserver; // @synthesize sharedObserver=_sharedObserver; @property(retain, nonatomic) NSMutableDictionary *downloadQueueObservers; // @synthesize downloadQueueObservers=_downloadQueueObservers; + //- (void).cxx_destruct; + - (BOOL)cacheReceiptDataForDownload:(id)arg1; - (void)checkStoreDownloadQueueForAccount:(id)arg1; - (void)lockedApplicationTriedToLaunchAtPath:(id)arg1; - (void)unlockApplicationsWithBundleIdentifier:(id)arg1; - (void)lockApplicationsForBundleID:(id)arg1; - (void)performedIconAnimationForDownloadWithIdentifier:(unsigned long long)arg1; + //- (void)fetchIconForItemIdentifier:(unsigned long long)arg1 atURL:(id)arg2 replyBlock:(CDUnknownBlockType)arg3; + - (void)removeDownloadWithItemIdentifier:(unsigned long long)arg1; - (void)cancelDownload:(id)arg1 promptToConfirm:(BOOL)arg2 askToDelete:(BOOL)arg3; - (void)resumeDownloadWithItemIdentifier:(unsigned long long)arg1; @@ -36,12 +43,15 @@ - (void)addDownload:(id)arg1; - (id)downloadForItemIdentifier:(unsigned long long)arg1; @property(readonly, nonatomic) NSArray *downloads; // @dynamic downloads; -- (void)removeObserver:(id)arg1; -- (id)addObserver:(id)arg1; -- (id)addObserver:(id)arg1 forDownloadTypes:(long long)arg2; -//- (id)addObserverForDownloadTypes:(long long)arg1 withBlock:(CDUnknownBlockType)arg2; +- (void)removeObserver:(id)arg1; +- (id)addObserver:(id)arg1; +- (id)addObserver:(id)arg1 forDownloadTypes:(long long)arg2; + +// - (id)addObserverForDownloadTypes:(long long)arg1 withBlock:(CDUnknownBlockType)arg2; + - (void)connectionWasInterrupted; - (id)initWithStoreClient:(id)arg1; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/CommerceKit/CKPurchaseController.h b/App/PrivateHeaders/CommerceKit/CKPurchaseController.h index 2bd89aedf..5d946ac8b 100644 --- a/App/PrivateHeaders/CommerceKit/CKPurchaseController.h +++ b/App/PrivateHeaders/CommerceKit/CKPurchaseController.h @@ -5,11 +5,13 @@ // #import + #import -@class SSPurchaseResponse; @class NSArray, NSMutableArray, NSNumber; +@class SSPurchaseResponse; + NS_ASSUME_NONNULL_BEGIN typedef void (^SSPurchaseCompletion)(SSPurchase * _Nullable purchase, BOOL completed, NSError * _Nullable error, SSPurchaseResponse * _Nullable response); @@ -25,7 +27,8 @@ typedef void (^SSPurchaseCompletion)(SSPurchase * _Nullable purchase, BOOL compl } + (void)setNeedsSilentMachineAuthorization:(BOOL)arg1; -+ (CKPurchaseController * _Nonnull)sharedPurchaseController; ++ (CKPurchaseController *)sharedPurchaseController; + //@property(copy) CDUnknownBlockType dialogHandler; // @synthesize dialogHandler=_dialogHandler; //- (void).cxx_destruct; //- (BOOL)adoptionCompletedForBundleID:(id)arg1; @@ -37,7 +40,8 @@ typedef void (^SSPurchaseCompletion)(SSPurchase * _Nullable purchase, BOOL compl //- (void)resumeDownloadForPurchasedProductID:(id)arg1; //- (void)startPurchases:(NSArray *)purchases shouldStartDownloads:(BOOL)downloads eventHandler:(CDUnknownBlockType)arg3; //- (void)startPurchases:(NSArray *)purchases withOptions:(unsigned long long)arg2 completionHandler:(CDUnknownBlockType)arg3; -- (void)performPurchase:(SSPurchase * _Nonnull)purchase withOptions:(unsigned long long)arg2 completionHandler:(SSPurchaseCompletion _Nullable)completionHandler; + +- (void)performPurchase:(SSPurchase *)purchase withOptions:(unsigned long long)arg2 completionHandler:(SSPurchaseCompletion _Nullable)completionHandler; @end diff --git a/App/PrivateHeaders/CommerceKit/CKSoftwareMap.h b/App/PrivateHeaders/CommerceKit/CKSoftwareMap.h index c24be71f4..4bf9ff086 100644 --- a/App/PrivateHeaders/CommerceKit/CKSoftwareMap.h +++ b/App/PrivateHeaders/CommerceKit/CKSoftwareMap.h @@ -5,37 +5,48 @@ // #import + #import -NS_ASSUME_NONNULL_BEGIN -@class NSLock, NSMutableArray; @class CKSoftwareMapObserver, NSMutableDictionary; +NS_ASSUME_NONNULL_BEGIN + @interface CKSoftwareMap : CKServiceInterface { NSMutableDictionary *_productsObservers; CKSoftwareMapObserver *_sharedObserver; } -+ (CKSoftwareMap *)sharedSoftwareMap; ++ (instancetype)sharedSoftwareMap; + @property(retain, nonatomic) CKSoftwareMapObserver *sharedObserver; // @synthesize sharedObserver=_sharedObserver; @property(retain, nonatomic) NSMutableDictionary *productsObservers; // @synthesize productsObservers=_productsObservers; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + - (id)adoptableBundleIdentifiers; -- (BOOL)adoptionCompletedForBundleID:(id)arg1 adoptingDSID:(out _Nullable id * _Nonnull)arg2 appleID:(out _Nullable id * _Nonnull)arg3; + +- (BOOL)adoptionCompletedForBundleID:(id)arg1 adoptingDSID:(out _Nullable id * _Nullable)arg2 appleID:(out _Nullable id * _Nullable)arg3; + - (id)updateRequestBodyData:(char *)arg1 includeInstalledApps:(BOOL)arg2 includeBundledApps:(BOOL)arg3 conditionally:(BOOL)arg4 hadUnadoptedApps:(out char *)arg5; - (id)iconForApplicationWithBundeID:(id)arg1; - (id)bundleInfoFromBundleAtPath:(id)arg1; - (BOOL)isTrialVersionOfBundleIdentifier:(id)arg1; - (id)receiptFromBundleAtPath:(id)arg1; - (id)productForPath:(id)arg1; + - (NSArray* __nullable)allProducts; - (CKSoftwareProduct *)productForItemIdentifier:(unsigned long long)arg1; - (nullable CKSoftwareProduct *)productForBundleIdentifier:(NSString *)arg1; + - (void)removeProductsObserverForToken:(id)arg1; -//- (id)addProductsObserver:(CDUnknownBlockType)arg1 queue:(id)arg2; + +// - (id)addProductsObserver:(CDUnknownBlockType)arg1 queue:(id)arg2; + - (void)connectionWasInterrupted; -- (id)initWithStoreClient:(id)arg1; + +- (instancetype)initWithStoreClient:(id)arg1; @end diff --git a/App/PrivateHeaders/CommerceKit/CKUpdateController.h b/App/PrivateHeaders/CommerceKit/CKUpdateController.h index cb11cff91..32e5a19bf 100644 --- a/App/PrivateHeaders/CommerceKit/CKUpdateController.h +++ b/App/PrivateHeaders/CommerceKit/CKUpdateController.h @@ -4,16 +4,21 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import #import "CKServiceInterface.h" -@class CKUpdate; @class CKUpdateControllerClient, NSMutableDictionary; +@class CKUpdate; + NS_ASSUME_NONNULL_BEGIN + @interface CKUpdateController : CKServiceInterface { BOOL _shouldNotAttemptInstallationAfterFailureDialog; -// CDUnknownBlockType _dialogHandler; + + // CDUnknownBlockType _dialogHandler; + NSMutableDictionary *_availableUpdatesObservers; NSMutableDictionary *_updateScanObservers; NSMutableDictionary *_updateProgressObservers; @@ -21,13 +26,16 @@ NS_ASSUME_NONNULL_BEGIN } + (CKUpdateController * _Nullable)sharedUpdateController; + @property(retain, nonatomic) CKUpdateControllerClient *sharedObserver; // @synthesize sharedObserver=_sharedObserver; @property(retain, nonatomic) NSMutableDictionary *updateProgressObservers; // @synthesize updateProgressObservers=_updateProgressObservers; @property(retain, nonatomic) NSMutableDictionary *updateScanObservers; // @synthesize updateScanObservers=_updateScanObservers; @property(retain, nonatomic) NSMutableDictionary *availableUpdatesObservers; // @synthesize availableUpdatesObservers=_availableUpdatesObservers; @property BOOL shouldNotAttemptInstallationAfterFailureDialog; // @synthesize shouldNotAttemptInstallationAfterFailureDialog=_shouldNotAttemptInstallationAfterFailureDialog; -//@property(copy) CDUnknownBlockType dialogHandler; // @synthesize dialogHandler=_dialogHandler; -//- (void).cxx_destruct; + +// @property(copy) CDUnknownBlockType dialogHandler; // @synthesize dialogHandler=_dialogHandler; +// - (void).cxx_destruct; + - (void)didInteractivelyPurchaseItemIdentifier:(unsigned long long)arg1 success:(BOOL)arg2; - (BOOL)willInteractivelyPurchaseItemIdentifier:(unsigned long long)arg1; - (void)promptUserToOptInForAutoUpdateWithShowNotification:(BOOL)arg1; @@ -39,9 +47,13 @@ NS_ASSUME_NONNULL_BEGIN - (int)catalogTrustLevel; - (id)catalogHostName; - (void)stopObservingOSUpdateProgressWithCallback:(id)arg1; + //- (id)observeOSUpdateProgressWithProgressHandler:(CDUnknownBlockType)arg1; + - (void)stopObservingOSUpdateScansWithCallback:(id)arg1; + //- (id)observeOSUpdateScansWithProgressHandler:(CDUnknownBlockType)arg1; + - (void)startOSUpdateScanWithForceFullScan:(BOOL)arg1 reportProgressImmediately:(BOOL)arg2 launchedFromNotification:(BOOL)arg3 userHasSeenAllUpdates:(BOOL)arg4 checkForOtherUpdates:(BOOL)arg5; - (void)unhideAllOSUpdates; - (void)hideOSUpdatesWithProductKeys:(id)arg1; @@ -55,24 +67,35 @@ NS_ASSUME_NONNULL_BEGIN - (id)osUpdatesToBeInstalledLater; - (id)osUpdatesToBeInstalledAfterLogout; - (void)cancelUpdatesToBeInstalledLater; + //- (void)queueOSUpdatesForLaterInstall:(id)arg1 withMode:(long long)arg2 completionHandler:(CDUnknownBlockType)arg3; + - (void)installAvailableUpdatesLaterWithMode:(long long)arg1; - (BOOL)shouldOfferDoItLater; -//- (void)updatesWithTags:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; + +// - (void)updatesWithTags:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; + - (void)installAllAvailableUpdates; -//- (void)startAppInstallWithTags:(id)arg1 fallbackPurchase:(id)arg2 completionHandler:(CDUnknownBlockType)arg3; -//- (void)startAppUpdates:(id)arg1 andOSUpdates:(id)arg2 withDelegate:(id)arg3 completionHandler:(CDUnknownBlockType)arg4; -//- (void)_checkForBookUpdatesWithCompletionHandler:(CDUnknownBlockType)arg1; -//- (void)checkForUpdatesWithUserHasSeenUpdates:(BOOL)arg1 completionHandler:(CDUnknownBlockType)arg2; + +// - (void)startAppInstallWithTags:(id)arg1 fallbackPurchase:(id)arg2 completionHandler:(CDUnknownBlockType)arg3; +// - (void)startAppUpdates:(id)arg1 andOSUpdates:(id)arg2 withDelegate:(id)arg3 completionHandler:(CDUnknownBlockType)arg4; +// - (void)_checkForBookUpdatesWithCompletionHandler:(CDUnknownBlockType)arg1; +// - (void)checkForUpdatesWithUserHasSeenUpdates:(BOOL)arg1 completionHandler:(CDUnknownBlockType)arg2; + - (void)removeAvailableUpdatesObserver:(id)arg1; -//- (id)addAvailableUpdatesObserverWithBlock:(CDUnknownBlockType)arg1; + +// - (id)addAvailableUpdatesObserverWithBlock:(CDUnknownBlockType)arg1; + - (unsigned long long)availableUpdatesBadgeCount; - (id)incompatibleUpdates; + - (nullable CKUpdate *)availableUpdateWithItemIdentifier:(unsigned long long)arg1; - (NSArray*)availableUpdates; + - (void)connectionWasInterrupted; - (id)initWithStoreClient:(id)arg1; - (id)init; @end + NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/CommerceKit/ISStoreURLOperationDelegate-Protocol.h b/App/PrivateHeaders/CommerceKit/ISStoreURLOperationDelegate-Protocol.h index 37ac2c733..c23102b84 100644 --- a/App/PrivateHeaders/CommerceKit/ISStoreURLOperationDelegate-Protocol.h +++ b/App/PrivateHeaders/CommerceKit/ISStoreURLOperationDelegate-Protocol.h @@ -4,10 +4,14 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // -#import +//#import "ISURLOperationDelegate.h" + +#import "ISURLOperationDelegate-Protocol.h" @class ISStoreURLOperation, NSNumber, NSString; +NS_ASSUME_NONNULL_BEGIN + @protocol ISStoreURLOperationDelegate @optional @@ -15,3 +19,4 @@ - (void)operation:(ISStoreURLOperation *)arg1 didAuthenticateWithDSID:(NSNumber *)arg2; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/CKSoftwareProduct.h b/App/PrivateHeaders/StoreFoundation/CKSoftwareProduct.h index f56f132ee..7377cd2ae 100644 --- a/App/PrivateHeaders/StoreFoundation/CKSoftwareProduct.h +++ b/App/PrivateHeaders/StoreFoundation/CKSoftwareProduct.h @@ -4,10 +4,16 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // -#import +// #import + +//#import "NSObject.h" +//#import "NSCopying.h" +//#import "NSSecureCoding.h" @class NSDate, NSNumber, NSString, NSValue; +NS_ASSUME_NONNULL_BEGIN + @interface CKSoftwareProduct : NSObject { BOOL _installed; @@ -38,33 +44,41 @@ + (nullable instancetype)createSoftwareProductForAppAtPath:(nonnull NSString *)arg1; + (nullable instancetype)productPathToUpgradeForBundleIdentifier:(nonnull NSString *)bundleIdentifier versionNumberString:(nonnull NSString *)versionNumber; + + (BOOL)supportsSecureCoding; + @property(copy, nullable) NSNumber *expectedStoreVersion; // @synthesize expectedStoreVersion=_expectedStoreVersion; @property(copy, nullable) NSString *expectedBundleVersion; // @synthesize expectedBundleVersion=_expectedBundleVersion; + @property BOOL metadataChangeIsExpected; // @synthesize metadataChangeIsExpected=_metadataChangeIsExpected; @property long long source; // @synthesize source=_source; @property BOOL isLegacyApp; // @synthesize isLegacyApp=_isLegacyApp; @property BOOL isMachineLicensed; // @synthesize isMachineLicensed=_isMachineLicensed; + @property(retain, nullable) NSString *vppLicenseCancellationReason; // @synthesize vppLicenseCancellationReason=_vppLicenseCancellationReason; @property(retain, nullable) NSDate *vppLicenseRenewalDate; // @synthesize vppLicenseRenewalDate=_vppLicenseRenewalDate; @property(retain, nullable) NSDate *vppLicenseExpirationDate; // @synthesize vppLicenseExpirationDate=_vppLicenseExpirationDate; @property(retain, nullable) NSString *vppLicenseOrganizationName; // @synthesize vppLicenseOrganizationName=_vppLicenseOrganizationName; + @property BOOL vppLicenseRevoked; // @synthesize vppLicenseRevoked=_vppLicenseRevoked; @property BOOL isVPPLicensed; // @synthesize isVPPLicensed=_isVPPLicensed; @property BOOL installed; // @synthesize installed=_installed; -@property(retain, nullable) NSValue *mdItemRef; // @synthesize mdItemRef=_mdItemRef; -@property(retain, nullable) NSDate *purchaseDate; // @synthesize purchaseDate=_purchaseDate; -@property(retain, nullable) NSNumber *versionIdentifier; // @synthesize versionIdentifier=_versionIdentifier; -@property(retain, nullable) NSNumber *storeFrontIdentifier; // @synthesize storeFrontIdentifier=_storeFrontIdentifier; -@property(retain, nonnull) NSNumber *itemIdentifier; // @synthesize itemIdentifier=_itemIdentifier; -@property(retain, nullable) NSString *receiptType; // @synthesize receiptType=_receiptType; -@property(retain, nullable) NSString *bundlePath; // @synthesize bundlePath=_bundlePath; -@property(retain, nonnull) NSString *bundleVersion; // @synthesize bundleVersion=_bundleVersion; -@property(retain, nullable) NSString *bundleIdentifier; // @synthesize bundleIdentifier=_bundleIdentifier; -@property(retain, nullable) NSString *accountIdentifier; // @synthesize accountIdentifier=_accountIdentifier; -@property(retain, nullable) NSString *accountOpaqueDSID; // @synthesize accountOpaqueDSID=_accountOpaqueDSID; -//- (void).cxx_destruct; -- (nonnull instancetype)copyWithZone:(nullable NSZone *)zone; + +@property(retain) NSValue *mdItemRef; // @synthesize mdItemRef=_mdItemRef; +@property(retain) NSDate *purchaseDate; // @synthesize purchaseDate=_purchaseDate; +@property(retain) NSNumber *versionIdentifier; // @synthesize versionIdentifier=_versionIdentifier; +@property(retain) NSNumber *storeFrontIdentifier; // @synthesize storeFrontIdentifier=_storeFrontIdentifier; +@property(retain) NSNumber *itemIdentifier; // @synthesize itemIdentifier=_itemIdentifier; +@property(retain) NSString *receiptType; // @synthesize receiptType=_receiptType; +@property(retain) NSString *bundlePath; // @synthesize bundlePath=_bundlePath; +@property(retain) NSString *bundleVersion; // @synthesize bundleVersion=_bundleVersion; +@property(retain) NSString *bundleIdentifier; // @synthesize bundleIdentifier=_bundleIdentifier; +@property(retain) NSString *accountIdentifier; // @synthesize accountIdentifier=_accountIdentifier; +@property(retain) NSString *accountOpaqueDSID; // @synthesize accountOpaqueDSID=_accountOpaqueDSID; + +// - (void).cxx_destruct; + +- (instancetype)copyWithZone:(nullable NSZone *)zone; - (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder; - (void)encodeWithCoder:(nonnull NSCoder *)coder; @property(readonly, nonnull) NSString *appName; @@ -73,3 +87,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/CKUpdate.h b/App/PrivateHeaders/StoreFoundation/CKUpdate.h index 009f5fcec..a544c4bc6 100644 --- a/App/PrivateHeaders/StoreFoundation/CKUpdate.h +++ b/App/PrivateHeaders/StoreFoundation/CKUpdate.h @@ -4,6 +4,10 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSSecureCoding.h" + @class NSDate, NSDictionary, NSMutableDictionary, NSNumber, NSString, SSPurchase; NS_ASSUME_NONNULL_BEGIN @@ -17,7 +21,9 @@ NS_ASSUME_NONNULL_BEGIN + (BOOL)supportsSecureCoding; @property(nonatomic) long long softwareUpdateState; // @synthesize softwareUpdateState=_softwareUpdateState; @property(readonly) NSDictionary *dictionary; // @synthesize dictionary=_dictionary; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + @property(readonly, nonatomic) NSString *autoUpdateAbortReason; @property(nonatomic) BOOL hasBeenSeenByUser; @property(readonly, nonatomic) BOOL didFailToAutoInstall; diff --git a/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h b/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h index 10ea81b96..c05f2cfdf 100644 --- a/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h +++ b/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h @@ -4,7 +4,14 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // -@class ISAuthenticationContext, ISAuthenticationResponse, ISStoreAccount, NSDictionary, NSNumber, NSString, NSURL, NSURLResponse; +// #import "ISServiceRemoteObject.h" + +@class ISAuthenticationResponse, ISStoreAccount, NSDictionary, NSNumber, NSString, NSURL, NSURLRequest, NSURLResponse; + +@class ISAuthenticationContext; +@class NSURLRequest; + +NS_ASSUME_NONNULL_BEGIN @protocol ISAccountService - (void)recommendedAppleIDForAccountSignIn:(void (^)(NSString *))arg1; @@ -12,26 +19,30 @@ - (void)setStoreFrontID:(NSString *)arg1; - (void)storeFrontWithReplyBlock:(void (^)(NSString *))arg1; - (void)shouldSendGUIDWithRequestForURL:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; -- (void)processURLResponse:(NSURLResponse *)arg1; +- (void)processURLResponse:(NSURLResponse *)arg1 forRequest:(NSURLRequest *)arg2; - (void)httpHeadersForURL:(NSURL *)arg1 forDSID:(NSNumber *)arg2 includeADIHeaders:(BOOL)arg3 withReplyBlock:(void (^)(NSDictionary *))arg4; -//- (void)removeURLBagObserver:(id )arg1; -//- (void)addURLBagObserver:(id )arg1; -//- (void)dictionaryWithReplyBlock:(void (^)(NSDictionary *))arg1; -//- (void)isValidWithReplyBlock:(void (^)(BOOL))arg1; -//- (void)regexWithKey:(NSString *)arg1 matchesString:(NSString *)arg2 replyBlock:(void (^)(BOOL))arg3; -//- (void)invalidateAllBags; -//- (void)loadURLBagWithType:(unsigned long long)arg1 replyBlock:(void (^)(BOOL, BOOL, NSError *))arg2; -//- (void)needsSilentADIActionForURL:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; -//- (void)urlIsTrustedByURLBag:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; -//- (void)valueForURLBagKey:(NSString *)arg1 withReplyBlock:(void (^)(id))arg2; + +// - (void)removeURLBagObserver:(id )arg1; +// - (void)addURLBagObserver:(id )arg1; +// - (void)dictionaryWithReplyBlock:(void (^)(NSDictionary *))arg1; +// - (void)isValidWithReplyBlock:(void (^)(BOOL))arg1; +// - (void)regexWithKey:(NSString *)arg1 matchesString:(NSString *)arg2 replyBlock:(void (^)(BOOL))arg3; +// - (void)invalidateAllBags; +// - (void)loadURLBagWithType:(unsigned long long)arg1 replyBlock:(void (^)(BOOL, BOOL, NSError *))arg2; +// - (void)needsSilentADIActionForURL:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; +// - (void)urlIsTrustedByURLBag:(NSURL *)arg1 withReplyBlock:(void (^)(BOOL))arg2; +// - (void)valueForURLBagKey:(NSString *)arg1 withReplyBlock:(void (^)(id))arg2; + - (void)getTouchIDPreferenceWithReplyBlock:(void (^)(BOOL, ISStoreAccount *, NSError *))arg1; - (void)updateTouchIDSettingsForDSID:(NSNumber *)arg1 replyBlock:(void (^)(BOOL, NSError *))arg2; - (void)setTouchIDState:(long long)arg1 forDSID:(NSNumber *)arg2 replyBlock:(void (^)(BOOL, NSError *))arg3; - (void)generateTouchIDHeadersForDSID:(NSNumber *)arg1 challenge:(NSString *)arg2 caller:(id)arg3 replyBlock:(void (^)(NSDictionary *, NSError *))arg4; - (void)retailStoreDemoModeReplyBlock:(void (^)(BOOL, NSString *, NSString *, BOOL))arg1; -//- (void)removeAccountStoreObserver:(id )arg1; -//- (void)addAccountStoreObserver:(id )arg1; -//- (void)parseCreditStringForProtocol:(NSDictionary *)arg1; + +// - (void)removeAccountStoreObserver:(id )arg1; +// - (void)addAccountStoreObserver:(id )arg1; +// - (void)parseCreditStringForProtocol:(NSDictionary *)arg1; + - (void)signOut; - (void)addAccount:(ISStoreAccount *)arg1; - (void)addAccountWithAuthenticationResponse:(ISAuthenticationResponse *)arg1 makePrimary:(BOOL)arg2 replyBlock:(void (^)(ISStoreAccount *))arg3; @@ -41,3 +52,4 @@ - (void)authIsExpiredWithReplyBlock:(void (^)(BOOL))arg1; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/ISAuthenticationContext.h b/App/PrivateHeaders/StoreFoundation/ISAuthenticationContext.h index 93f4ac8b1..7565ad201 100644 --- a/App/PrivateHeaders/StoreFoundation/ISAuthenticationContext.h +++ b/App/PrivateHeaders/StoreFoundation/ISAuthenticationContext.h @@ -4,8 +4,14 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSSecureCoding.h" + @class NSDictionary, NSNumber, NSString; +NS_ASSUME_NONNULL_BEGIN + @interface ISAuthenticationContext : NSObject { NSNumber *_accountID; @@ -43,7 +49,9 @@ @property long long authenticationStyle; // @synthesize authenticationStyle=_style; @property(retain) NSDictionary *additionalQueryParameters; // @synthesize additionalQueryParameters=_additionalQueryParameters; @property(readonly) NSNumber *accountID; // @synthesize accountID=_accountID; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + - (void)encodeWithCoder:(id)arg1; - (id)initWithCoder:(id)arg1; - (id)initWithAccountID:(id)arg1; @@ -51,3 +59,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h b/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h index db7316d18..a15fc40c3 100644 --- a/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h +++ b/App/PrivateHeaders/StoreFoundation/ISAuthenticationResponse.h @@ -1,11 +1,17 @@ // -// Generated by class-dump 3.5 (64 bit). +// Generated by class-dump 3.5 (64 bit). // -// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. +// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSSecureCoding.h" + @class NSNumber, NSString; +NS_ASSUME_NONNULL_BEGIN + @interface ISAuthenticationResponse : NSObject { NSString *_token; @@ -28,10 +34,14 @@ @property(readonly) long long accountKind; // @synthesize accountKind=_accountKind; @property(readonly) NSString *accountIdentifier; // @synthesize accountIdentifier=_accountIdentifier; @property unsigned long long URLBagType; // @synthesize URLBagType=_URLBagType; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + - (BOOL)_loadFromDictionary:(id)arg1; - (id)initWithCoder:(id)arg1; - (void)encodeWithCoder:(id)arg1; - (id)initWithDictionary:(id)arg1; @end + +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/ISOperationDelegate-Protocol.h b/App/PrivateHeaders/StoreFoundation/ISOperationDelegate-Protocol.h index a8aa28621..e847d143d 100644 --- a/App/PrivateHeaders/StoreFoundation/ISOperationDelegate-Protocol.h +++ b/App/PrivateHeaders/StoreFoundation/ISOperationDelegate-Protocol.h @@ -4,8 +4,12 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + @class ISOperation, NSError, SSOperationProgress; +NS_ASSUME_NONNULL_BEGIN + @protocol ISOperationDelegate @optional @@ -14,3 +18,4 @@ - (void)operation:(ISOperation *)arg1 failedWithError:(NSError *)arg2; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/ISServiceProxy.h b/App/PrivateHeaders/StoreFoundation/ISServiceProxy.h index 08678cd92..4cb8dffa4 100644 --- a/App/PrivateHeaders/StoreFoundation/ISServiceProxy.h +++ b/App/PrivateHeaders/StoreFoundation/ISServiceProxy.h @@ -4,53 +4,64 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + #import -@class ISStoreClient, NSLock, NSMutableDictionary, Protocol; +@class ISStoreClient, Protocol; + +@class NSLock, NSMutableDictionary; @protocol ISAccountService; -@class ISStoreClient, Protocol; + +NS_ASSUME_NONNULL_BEGIN + +typedef void (^ISErrorHandler)(NSError * __nonnull error); @interface ISServiceProxy : NSObject { - NSLock *_serviceConnectionLock; - NSMutableDictionary *_connectionsByServiceName; - NSMutableDictionary *_localInterfacesByServiceName; ISStoreClient *_storeClient; } -typedef void (^ISErrorHandler)(NSError * __nonnull error); - + (ISServiceProxy * __nonnull)genericSharedProxy; + + (void)initialize; -@property(retain, nonatomic) ISStoreClient * __nullable storeClient; // @synthesize storeClient=_storeClient; -//- (void).cxx_destruct; -//- (void)uiServiceSynchronousBlock:(CDUnknownBlockType)arg1; -//@property(readonly, nonatomic) id uiService; -//- (id)uiServiceWithErrorHandler:(CDUnknownBlockType)arg1; -//- (void)inAppServiceSynchronousBlock:(CDUnknownBlockType)arg1; -//@property(readonly, nonatomic) id inAppService; -//- (id)inAppServiceWithErrorHandler:(CDUnknownBlockType)arg1; -//- (void)transactionServiceSynchronousBlock:(CDUnknownBlockType)arg1; -//@property(readonly, nonatomic) id __nullable transactionService; -//- (id __nullable)transactionServiceWithErrorHandler:(ISErrorHandler __nonnull)arg1; -//- (void)assetServiceSynchronousBlock:(CDUnknownBlockType)arg1; -//@property(readonly, nonatomic) id assetService; -//- (id)assetServiceWithErrorHandler:(CDUnknownBlockType)arg1; -//- (void)downloadServiceSynchronousBlock:(CDUnknownBlockType)arg1; -//@property(readonly, nonatomic) id downloadService; -//- (id)downloadServiceWithErrorHandler:(CDUnknownBlockType)arg1; -//- (void)accountServiceSynchronousBlock:(void (^ __nonnull)(id __nonnull))arg1; -@property(readonly, nonatomic) id __nonnull accountService; -//- (id __nonnull)accountServiceWithErrorHandler:(ISErrorHandler __nonnull)arg1; + +@property(retain, nonatomic, nullable) ISStoreClient *storeClient; // @synthesize storeClient=_storeClient; + +// - (void).cxx_destruct; +// - (void)uiServiceSynchronousBlock:(CDUnknownBlockType)arg1; +// @property(readonly, nonatomic) id uiService; +// - (id)uiServiceWithErrorHandler:(CDUnknownBlockType)arg1; +// - (void)inAppServiceSynchronousBlock:(CDUnknownBlockType)arg1; +// @property(readonly, nonatomic) id inAppService; +// - (id)inAppServiceWithErrorHandler:(CDUnknownBlockType)arg1; +// - (void)transactionServiceSynchronousBlock:(CDUnknownBlockType)arg1; +// @property(readonly, nonatomic) id transactionService; +// - (id)transactionServiceWithErrorHandler:(CDUnknownBlockType)arg1; +// - (void)assetServiceSynchronousBlock:(CDUnknownBlockType)arg1; +// @property(readonly, nonatomic) id assetService; +// - (id)assetServiceWithErrorHandler:(CDUnknownBlockType)arg1; +// - (void)downloadServiceSynchronousBlock:(CDUnknownBlockType)arg1; +// @property(readonly, nonatomic) id downloadService; +// - (id)downloadServiceWithErrorHandler:(CDUnknownBlockType)arg1; +// - (void)accountServiceSynchronousBlock:(CDUnknownBlockType)arg1; + +@property(readonly, nonatomic) id accountService; + +// - (id)accountServiceWithErrorHandler:(CDUnknownBlockType)arg1; + - (void)connectionWasInterrupted; - (void)registerForInterrptionNotification; -//- (void)performSynchronousBlock:(CDUnknownBlockType)arg1 withServiceName:(id)arg2 protocol:(id)arg3 isMachService:(BOOL)arg4 interfaceClassName:(id)arg5; -//- (id)objectProxyForServiceName:(id)arg1 protocol:(id)arg2 interfaceClassName:(id)arg3 isMachService:(BOOL)arg4 errorHandler:(CDUnknownBlockType)arg5; -//- (id)connectionWithServiceName:(id)arg1 protocol:(id)arg2 isMachService:(BOOL)arg3; -//@property(readonly, nonatomic) Protocol * __nullable exportedProtocol; -//@property(readonly, nonatomic) __weak id __nullable exportedObject; + +// - (void)performSynchronousBlock:(CDUnknownBlockType)arg1 withServiceName:(id)arg2 protocol:(id)arg3 isMachService:(BOOL)arg4 interfaceClassName:(id)arg5; +// - (id)objectProxyForServiceName:(id)arg1 protocol:(id)arg2 interfaceClassName:(id)arg3 isMachService:(BOOL)arg4 errorHandler:(CDUnknownBlockType)arg5; +// - (id)connectionWithServiceName:(id)arg1 protocol:(id)arg2 isMachService:(BOOL)arg3; +// @property(readonly, nonatomic) Protocol *exportedProtocol; +// @property(readonly, nonatomic) __weak id exportedObject; + - (ISServiceProxy * __nonnull)initWithStoreClient:(ISStoreClient * __nonnull)arg1; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/ISServiceRemoteObject-Protocol.h b/App/PrivateHeaders/StoreFoundation/ISServiceRemoteObject-Protocol.h index b5bb70f62..441d4e87b 100644 --- a/App/PrivateHeaders/StoreFoundation/ISServiceRemoteObject-Protocol.h +++ b/App/PrivateHeaders/StoreFoundation/ISServiceRemoteObject-Protocol.h @@ -4,10 +4,16 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + @class ISStoreClient; + +NS_ASSUME_NONNULL_BEGIN + @protocol ISServiceRemoteObject - (void)startService; - (void)setStoreClient:(ISStoreClient *)arg1; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/ISStoreAccount.h b/App/PrivateHeaders/StoreFoundation/ISStoreAccount.h index af0162b4e..bb05ee221 100644 --- a/App/PrivateHeaders/StoreFoundation/ISStoreAccount.h +++ b/App/PrivateHeaders/StoreFoundation/ISStoreAccount.h @@ -4,8 +4,14 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSSecureCoding.h" + @class NSDate, NSNumber, NSString, NSTimer; +NS_ASSUME_NONNULL_BEGIN + @interface ISStoreAccount : NSObject { NSTimer *_tokenInvalidTimer; @@ -41,7 +47,9 @@ @property long long kind; // @synthesize kind=_kind; @property(copy) NSString *identifier; // @synthesize identifier=_identifier; @property(copy) NSNumber *dsID; // @synthesize dsID=_dsID; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + - (long long)getTouchIDState; @property long long touchIDState; // @synthesize touchIDState=_touchIDState; - (void)resetTouchIDState; @@ -57,3 +65,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/ISStoreClient.h b/App/PrivateHeaders/StoreFoundation/ISStoreClient.h index 7fdf5baf1..8aa3a8c85 100644 --- a/App/PrivateHeaders/StoreFoundation/ISStoreClient.h +++ b/App/PrivateHeaders/StoreFoundation/ISStoreClient.h @@ -4,8 +4,14 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSSecureCoding.h" + @class ISStoreAccount, NSArray, NSDictionary, NSString; +NS_ASSUME_NONNULL_BEGIN + @interface ISStoreClient : NSObject { BOOL __alwaysUseSandboxEnvironment; @@ -64,7 +70,9 @@ @property long long clientType; // @synthesize clientType=_clientType; @property(copy) NSString *identifier; // @synthesize identifier=_identifier; @property unsigned long long frameworkVersion; // @synthesize frameworkVersion=_frameworkVersion; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + - (id)callerIdentity; - (BOOL)isEqualToStoreClient:(id)arg1; - (void)_cacheKnownClient:(id)arg1; @@ -76,3 +84,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/ISURLOperationDelegate-Protocol.h b/App/PrivateHeaders/StoreFoundation/ISURLOperationDelegate-Protocol.h index 155816b5c..5d8cbe3a9 100644 --- a/App/PrivateHeaders/StoreFoundation/ISURLOperationDelegate-Protocol.h +++ b/App/PrivateHeaders/StoreFoundation/ISURLOperationDelegate-Protocol.h @@ -4,10 +4,14 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "ISOperationDelegate.h" + #import "ISOperationDelegate-Protocol.h" @class ISURLOperation, NSMutableURLRequest, NSURLResponse; +NS_ASSUME_NONNULL_BEGIN + @protocol ISURLOperationDelegate @optional @@ -16,3 +20,4 @@ - (void)operation:(ISURLOperation *)arg1 finishedWithOutput:(id)arg2; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/SSDownload.h b/App/PrivateHeaders/StoreFoundation/SSDownload.h index 9852de66b..c86451933 100644 --- a/App/PrivateHeaders/StoreFoundation/SSDownload.h +++ b/App/PrivateHeaders/StoreFoundation/SSDownload.h @@ -4,6 +4,10 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSSecureCoding.h" + @class NSArray, NSNumber, NSString, NSURL, SSDownloadMetadata, SSDownloadStatus; @interface SSDownload : NSObject @@ -38,7 +42,9 @@ @property(retain, nonatomic) SSDownloadStatus *status; // @synthesize status=_status; @property(copy, nonatomic) SSDownloadMetadata *metadata; // @synthesize metadata=_metadata; @property(copy, nonatomic) NSArray *assets; // @synthesize assets=_assets; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + @property BOOL skipInstallPhase; - (void)setUseUniqueDownloadFolder:(BOOL)arg1; @property(copy) NSString *customDownloadPath; diff --git a/App/PrivateHeaders/StoreFoundation/SSDownloadMetadata.h b/App/PrivateHeaders/StoreFoundation/SSDownloadMetadata.h index 681c9ffdc..9080dbe35 100644 --- a/App/PrivateHeaders/StoreFoundation/SSDownloadMetadata.h +++ b/App/PrivateHeaders/StoreFoundation/SSDownloadMetadata.h @@ -3,10 +3,18 @@ // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // + +// #import "NSObject.h" + +// #import "NSCopying.h" +// #import "NSSecureCoding.h" + #import @class NSArray, NSData, NSDictionary, NSLock, NSMutableDictionary, NSNumber, NSString, NSURL; +NS_ASSUME_NONNULL_BEGIN + @interface SSDownloadMetadata : NSObject { NSMutableDictionary *_dictionary; @@ -14,10 +22,12 @@ } + (BOOL)supportsSecureCoding; -//- (void).cxx_destruct; -- (id _Nullable)_valueForFirstAvailableKey:(id _Nonnull)arg1; + +// - (void).cxx_destruct; + +- (id _Nullable)_valueForFirstAvailableKey:(id)arg1; @property(retain, nullable) NSArray *sinfs; -- (void)setValue:(id _Nullable)arg1 forMetadataKey:(id _Nonnull)arg2; +- (void)setValue:(id _Nullable)arg1 forMetadataKey:(id)arg2; @property(retain, nullable) NSString *iapInstallPath; @property(retain, nullable) NSString *fileExtension; @property(retain, nullable) NSString *appleID; @@ -28,46 +38,66 @@ @property(readonly, nullable) NSString *iapContentVersion; @property(readonly, nullable) NSNumber *iapContentSize; @property(readonly, nullable) NSArray *assets; + @property BOOL animationExpected; + @property(retain, nullable) NSString *transactionIdentifier; -@property(retain, nonnull) NSString *title; + +@property(retain) NSString *title; + @property(retain, nullable) NSURL *thumbnailImageURL; @property(retain, nullable) NSString *subtitle; @property(retain, nullable) NSString *ipaInstallPath; + @property BOOL isMDMProvided; + - (void)setUncompressedSize:(NSNumber * _Nonnull)arg1; + - (void)setExtractionCanBeStreamed:(BOOL)arg1; + @property(retain, nullable) NSString *buyParameters; @property(retain, nullable) NSURL *preflightPackageURL; + @property(getter=isRental) BOOL rental; + @property(retain, nullable) NSString *kind; + @property unsigned long long itemIdentifier; + @property(retain, nullable) NSString *genre; @property(retain, nullable) NSNumber *durationInMilliseconds; @property(retain, nullable) NSString *collectionName; @property(retain, nullable) NSString *bundleVersion; @property(retain, nullable) NSString *bundleIdentifier; + @property BOOL artworkIsPrerendered; + @property(readonly, nullable) NSString *bundleShortVersionString; @property(readonly, nullable) NSString *bundleDisplayName; @property(readonly, nullable) NSNumber *uncompressedSize; + @property(readonly) BOOL extractionCanBeStreamed; @property(readonly) BOOL needsSoftwareInstallOperation; + - (id _Nullable)deltaPackages; + @property(readonly, getter=isSample) BOOL sample; + @property(readonly, nullable) NSString *purchaseDate; + @property(readonly) BOOL isExplicitContents; + @property(readonly, nullable) NSNumber *ageRestriction; @property(retain, nullable) NSString *productType; -@property(readonly, nullable) NSNumber *version; @property(readonly, nullable) NSString *applicationIdentifier; -- (nonnull id)copyWithZone:(nullable NSZone *)zone; -- (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder; -- (void)encodeWithCoder:(nonnull NSCoder *)coder; -- (nullable instancetype)initWithDictionary:(nonnull NSDictionary *)dictionary; -- (nullable instancetype)initWithKind:(nonnull NSString *)kind; -- (nonnull instancetype)init; +- (id)copyWithZone:(nullable NSZone *)zone; +- (nullable instancetype)initWithCoder:( NSCoder *)coder; +- (void)encodeWithCoder:(NSCoder *)coder; +- (nullable instancetype)initWithDictionary:(NSDictionary *)dictionary; +- (nullable instancetype)initWithKind:(NSString *)kind; +- (instancetype)init; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/SSDownloadPhase.h b/App/PrivateHeaders/StoreFoundation/SSDownloadPhase.h index 1bb7a630a..1c6598057 100644 --- a/App/PrivateHeaders/StoreFoundation/SSDownloadPhase.h +++ b/App/PrivateHeaders/StoreFoundation/SSDownloadPhase.h @@ -4,15 +4,24 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSCopying.h" +// #import "NSSecureCoding.h" + @class SSOperationProgress; +NS_ASSUME_NONNULL_BEGIN + @interface SSDownloadPhase : NSObject { SSOperationProgress *_operationProgress; } + (BOOL)supportsSecureCoding; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + @property(readonly) SSOperationProgress *operationProgress; @property(readonly) long long totalProgressValue; @property(readonly) long long progressValue; @@ -20,7 +29,7 @@ @property(readonly) long long progressUnits; @property(readonly) long long phaseType; @property(readonly) double estimatedSecondsRemaining; -- (id)copyWithZone:(struct _NSZone *)arg1; +- (id)copyWithZone:(nullable struct _NSZone *)arg1; - (id)initWithCoder:(id)arg1; - (void)encodeWithCoder:(id)arg1; - (id)initWithOperationProgress:(id)arg1; @@ -28,3 +37,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/SSDownloadStatus.h b/App/PrivateHeaders/StoreFoundation/SSDownloadStatus.h index 51e6eeed4..1a6650cb4 100644 --- a/App/PrivateHeaders/StoreFoundation/SSDownloadStatus.h +++ b/App/PrivateHeaders/StoreFoundation/SSDownloadStatus.h @@ -4,8 +4,14 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSSecureCoding.h" + @class NSError, SSDownloadPhase; +NS_ASSUME_NONNULL_BEGIN + @interface SSDownloadStatus : NSObject { SSDownloadPhase *_activePhase; @@ -23,7 +29,9 @@ @property(nonatomic, getter=isFailed) BOOL failed; // @synthesize failed=_failed; @property(retain, nonatomic) NSError *error; // @synthesize error=_error; @property(readonly, nonatomic) SSDownloadPhase *activePhase; // @synthesize activePhase=_activePhase; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + - (void)setOperationProgress:(id)arg1; @property(readonly, nonatomic) long long phaseTimeRemaining; @property(readonly, nonatomic) float phasePercentComplete; @@ -35,3 +43,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/SSPurchase.h b/App/PrivateHeaders/StoreFoundation/SSPurchase.h index 24995b53b..dff73e71e 100644 --- a/App/PrivateHeaders/StoreFoundation/SSPurchase.h +++ b/App/PrivateHeaders/StoreFoundation/SSPurchase.h @@ -4,8 +4,15 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // +// #import "NSObject.h" + +// #import "NSCopying.h" +// #import "NSSecureCoding.h" + @class ISOperation, NSData, NSDictionary, NSNumber, NSString, SSDownloadMetadata; +NS_ASSUME_NONNULL_BEGIN + @interface SSPurchase : NSObject { NSNumber *_accountIdentifier; @@ -25,7 +32,9 @@ BOOL _isDSIDLessPurchase; NSString *_sortableAccountIdentifier; unsigned long long _itemIdentifier; -// CDUnknownBlockType _authFallbackHandler; + + // CDUnknownBlockType _authFallbackHandler; + ISOperation *_purchaseOperation; NSDictionary *_responseDialog; NSDictionary *_dsidLessOptions; @@ -37,9 +46,13 @@ @property(retain) NSDictionary *dsidLessOptions; // @synthesize dsidLessOptions=_dsidLessOptions; @property BOOL isDSIDLessPurchase; // @synthesize isDSIDLessPurchase=_isDSIDLessPurchase; @property(copy) NSDictionary *responseDialog; // @synthesize responseDialog=_responseDialog; -@property __weak ISOperation *purchaseOperation; // @synthesize purchaseOperation=_purchaseOperation; + +@property (nullable) __weak ISOperation *purchaseOperation; // @synthesize purchaseOperation=_purchaseOperation; + @property BOOL isCancelled; // @synthesize isCancelled=_isCancelled; -//@property(copy) CDUnknownBlockType authFallbackHandler; // @synthesize authFallbackHandler=_authFallbackHandler; + +// @property(copy) CDUnknownBlockType authFallbackHandler; // @synthesize authFallbackHandler=_authFallbackHandler; + @property unsigned long long itemIdentifier; // @synthesize itemIdentifier=_itemIdentifier; @property BOOL shouldBeInstalledAfterLogout; // @synthesize shouldBeInstalledAfterLogout=_shouldBeInstalledAfterLogout; @property BOOL checkPreflightAterPurchase; // @synthesize checkPreflightAterPurchase=_checkPreflightAterPurchase; @@ -54,7 +67,9 @@ @property(copy, nonatomic) SSDownloadMetadata *downloadMetadata; // @synthesize downloadMetadata=_downloadMetadata; @property(copy, nonatomic) NSString *buyParameters; // @synthesize buyParameters=_buyParameters; @property(retain, nonatomic) NSNumber *accountIdentifier; // @synthesize accountIdentifier=_accountIdentifier; -//- (void).cxx_destruct; + +// - (void).cxx_destruct; + - (BOOL)purchaseDSIDMatchesPrimaryAccount; @property(readonly) BOOL needsAuthentication; // @dynamic needsAuthentication; @property BOOL isRecoveryPurchase; // @dynamic isRecoveryPurchase; @@ -62,9 +77,10 @@ @property(readonly, nonatomic) NSString *uniqueIdentifier; - (id)_sortableAccountIdentifier; - (id)description; -- (id)copyWithZone:(struct _NSZone *)arg1; +- (id)copyWithZone:(nullable struct _NSZone *)arg1; - (void)encodeWithCoder:(id)arg1; - (id)initWithCoder:(id)arg1; @end +NS_ASSUME_NONNULL_END diff --git a/App/PrivateHeaders/StoreFoundation/SSPurchaseResponse.h b/App/PrivateHeaders/StoreFoundation/SSPurchaseResponse.h index 799c5049c..da70812b7 100644 --- a/App/PrivateHeaders/StoreFoundation/SSPurchaseResponse.h +++ b/App/PrivateHeaders/StoreFoundation/SSPurchaseResponse.h @@ -4,7 +4,15 @@ // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // -@class NSArray, NSDictionary, SSDownload; +// #import "NSObject.h" + +// #import "NSSecureCoding.h" + +@class NSArray, NSDictionary; + +@class SSDownload; + +NS_ASSUME_NONNULL_BEGIN @interface SSPurchaseResponse : NSObject { @@ -24,3 +32,4 @@ @end +NS_ASSUME_NONNULL_END diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index dc0fca262..534c9cf20 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -111,13 +111,13 @@ EDEAA1511B5C576D00F2FC3F /* CKServiceInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CKServiceInterface.h; sourceTree = ""; }; EDEAA1521B5C576D00F2FC3F /* CKSoftwareMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CKSoftwareMap.h; sourceTree = ""; }; EDEAA1551B5C576D00F2FC3F /* CKUpdateController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CKUpdateController.h; sourceTree = ""; }; - EDEAA1661B5C576D00F2FC3F /* ISStoreURLOperationDelegate-Protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ISStoreURLOperationDelegate-Protocol.h"; sourceTree = ""; }; EDEAA17C1B5C579100F2FC3F /* CommerceKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CommerceKit.framework; path = /System/Library/PrivateFrameworks/CommerceKit.framework; sourceTree = ""; }; F8233C87201EBDF000268278 /* mas-tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "mas-tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; F8233C8B201EBDF100268278 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F865880A2030F6DE0093DE57 /* MASErrorTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MASErrorTestCase.swift; sourceTree = ""; }; F876BB4A20ED717800EB9FD1 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; FC1AE3BA07E7DEC5CED36469 /* Pods-mas-tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-mas-tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-mas-tests/Pods-mas-tests.debug.xcconfig"; sourceTree = ""; }; + F86EBF2E2077214100C0976E /* ISStoreURLOperationDelegate-Protocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ISStoreURLOperationDelegate-Protocol.h"; sourceTree = ""; }; F876300720438AF2003D370B /* ISAuthenticationResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ISAuthenticationResponse.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -265,7 +265,7 @@ EDEAA1511B5C576D00F2FC3F /* CKServiceInterface.h */, EDEAA1521B5C576D00F2FC3F /* CKSoftwareMap.h */, EDEAA1551B5C576D00F2FC3F /* CKUpdateController.h */, - EDEAA1661B5C576D00F2FC3F /* ISStoreURLOperationDelegate-Protocol.h */, + F86EBF2E2077214100C0976E /* ISStoreURLOperationDelegate-Protocol.h */, ); path = CommerceKit; sourceTree = ""; From 07dd7c62512ac3da38f671d58e72880ca5ac5ad7 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Thu, 5 Apr 2018 21:36:09 -0600 Subject: [PATCH 05/13] =?UTF-8?q?=F0=9F=90=9B=20Fix=20signout=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Commands/SignOut.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/App/Commands/SignOut.swift b/App/Commands/SignOut.swift index 57f9334c3..34c536b71 100644 --- a/App/Commands/SignOut.swift +++ b/App/Commands/SignOut.swift @@ -15,7 +15,8 @@ struct SignOutCommand: CommandProtocol { let function = "Sign out of the Mac App Store" func run(_ options: Options) -> Result<(), MASError> { - CKAccountStore.shared().signOut() + let accountService: ISAccountService = ISServiceProxy.genericShared().accountService + accountService.signOut() return .success(()) } } From 34760a60ed191c38233736e7d68e94405fe270eb Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 14 Apr 2018 14:06:36 -0600 Subject: [PATCH 06/13] =?UTF-8?q?=F0=9F=91=BD=20Restore=20using=20CKAccoun?= =?UTF-8?q?tService=20to=20sign=20out=20on=2010.12=20and=20below?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Commands/SignOut.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/App/Commands/SignOut.swift b/App/Commands/SignOut.swift index 34c536b71..5164b8209 100644 --- a/App/Commands/SignOut.swift +++ b/App/Commands/SignOut.swift @@ -15,8 +15,16 @@ struct SignOutCommand: CommandProtocol { let function = "Sign out of the Mac App Store" func run(_ options: Options) -> Result<(), MASError> { - let accountService: ISAccountService = ISServiceProxy.genericShared().accountService - accountService.signOut() + if #available(macOS 10.13, *) { + let accountService: ISAccountService = ISServiceProxy.genericShared().accountService + accountService.signOut() + } + else { + // Using CKAccountStore to sign out does nothing on High Sierra + // https://github.com/mas-cli/mas/issues/129 + CKAccountStore.shared().signOut() + } + return .success(()) } } From 76b1098a40c1634053fbe6702fdf658d47cb1201 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Sat, 14 Apr 2018 21:03:19 -0600 Subject: [PATCH 07/13] =?UTF-8?q?=F0=9F=A4=B7=F0=9F=8F=BB=E2=80=8D?= =?UTF-8?q?=E2=99=82=EF=B8=8F=20Attempt=20signin=20using=20CKAccountStore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/AppStore/ISStoreAccount.swift | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/App/AppStore/ISStoreAccount.swift b/App/AppStore/ISStoreAccount.swift index ec8f5fd97..9f0ce6c6d 100644 --- a/App/AppStore/ISStoreAccount.swift +++ b/App/AppStore/ISStoreAccount.swift @@ -10,15 +10,17 @@ extension ISStoreAccount { static var primaryAccountIsPresentAndSignedIn: Bool { return CKAccountStore.shared().primaryAccountIsPresentAndSignedIn } - + static var primaryAccount: ISStoreAccount? { return CKAccountStore.shared().primaryAccount } - + static func signIn(username: String? = nil, password: String? = nil, systemDialog: Bool = false) throws -> ISStoreAccount { + guard let username = username, let password = password else { fatalError() } + var account: ISStoreAccount? = nil var error: MASError? = nil - + let accountService: ISAccountService = ISServiceProxy.genericShared().accountService let client = ISStoreClient(storeClientType: 0) accountService.setStoreClient(client) @@ -40,16 +42,25 @@ extension ISStoreAccount { accountService.account(withAppleID: username) { (storeAccount: ISStoreAccount?) in if let _account = storeAccount { + debugPrint("ISStoreAccount: \(String(describing: _account))") _account.password = password -// accountService.add(_account) - accountService.addAccount(authenticationResponse: ISAuthenticationResponse, makePrimary: true) { (storeAccount: ISStoreAccount?) - if let _account = storeAccount { - account = _account - } - } + accountService.add(_account) +// let response = ISAuthenticationResponse() +// response.accountIdentifier = username +// accountService.addAccount(with: response, makePrimary: true) { (storeAccount: ISStoreAccount?) in +// if let _account = storeAccount { +// account = _account +// } +// } account = _account + + let accountStore = CKAccountStore.shared() + accountStore.addAccount(_account) + accountStore.signIn() + debugPrint("ISStoreAccount: \(String(describing: _account))") } else { // TODO: Handle failed AppleID lookup + print("No account found for username: \(username)") } group.leave() } From 7b2d8c11358a2c884ea31162f749949a25b3872d Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Fri, 10 Aug 2018 18:47:52 -0600 Subject: [PATCH 08/13] =?UTF-8?q?=F0=9F=93=B6=20Sort=20project=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile.lock | 2 +- mas-cli.xcodeproj/project.pbxproj | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index 39f5ae06c..2920f63a5 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -33,6 +33,6 @@ SPEC CHECKSUMS: Quick: 03278013f71aa05fe9ecabc94fbcc6835f1ee76f Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 -PODFILE CHECKSUM: 1395297d6299169db43f34b58e3d82186af28e6a +PODFILE CHECKSUM: 9d67a26b1f9740413adb744e480787451e560442 COCOAPODS: 1.5.3 diff --git a/mas-cli.xcodeproj/project.pbxproj b/mas-cli.xcodeproj/project.pbxproj index 534c9cf20..448d1ac71 100644 --- a/mas-cli.xcodeproj/project.pbxproj +++ b/mas-cli.xcodeproj/project.pbxproj @@ -127,8 +127,8 @@ buildActionMask = 2147483647; files = ( EDEAA17D1B5C579100F2FC3F /* CommerceKit.framework in Frameworks */, - EDEAA0C01B51CE6200F2FC3F /* StoreFoundation.framework in Frameworks */, 4762DDE207E8A2231553B32D /* libPods-mas.a in Frameworks */, + EDEAA0C01B51CE6200F2FC3F /* StoreFoundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -146,10 +146,10 @@ 10DC3EEDF21809022F0EBF72 /* Pods */ = { isa = PBXGroup; children = ( - 09C9EDFF416F0BDAC1E7F77A /* Pods-mas.debug.xcconfig */, - 21AF31A18424A9AC0333ECB1 /* Pods-mas.release.xcconfig */, FC1AE3BA07E7DEC5CED36469 /* Pods-mas-tests.debug.xcconfig */, 5A69175AC7646DE30D1F20C9 /* Pods-mas-tests.release.xcconfig */, + 09C9EDFF416F0BDAC1E7F77A /* Pods-mas.debug.xcconfig */, + 21AF31A18424A9AC0333ECB1 /* Pods-mas.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -160,9 +160,9 @@ ED031A7A1B5127C00097692E /* App */, F8233C88201EBDF100268278 /* AppTests */, EDFC76381B642A2E00D0DBD7 /* Frameworks */, + 10DC3EEDF21809022F0EBF72 /* Pods */, EDEAA0C11B51CEBD00F2FC3F /* PrivateHeaders */, ED031A791B5127C00097692E /* Products */, - 10DC3EEDF21809022F0EBF72 /* Pods */, ); sourceTree = ""; }; @@ -275,9 +275,9 @@ children = ( F876BB4A20ED717800EB9FD1 /* Cocoa.framework */, EDEAA17C1B5C579100F2FC3F /* CommerceKit.framework */, - EDEAA0BF1B51CE6200F2FC3F /* StoreFoundation.framework */, - 29090AA87DC29A23FA933D23 /* libPods-mas.a */, E699853CA22F704500D0F018 /* libPods-mas-tests.a */, + 29090AA87DC29A23FA933D23 /* libPods-mas.a */, + EDEAA0BF1B51CE6200F2FC3F /* StoreFoundation.framework */, ); name = Frameworks; sourceTree = ""; From 912fcb792520370f81e727f468e04b69bba5b56b Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Fri, 10 Aug 2018 19:14:52 -0600 Subject: [PATCH 09/13] =?UTF-8?q?=F0=9F=94=A7=20Switch=20back=20to=20stand?= =?UTF-8?q?ard=20build=20system?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gets rid of warning: Target Quick product libQuick.a cannot link framework XCTest.framework --- .../xcshareddata/WorkspaceSettings.xcsettings | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mas-cli.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mas-cli.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings index 3ddf867a1..0c67376eb 100644 --- a/mas-cli.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ b/mas-cli.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -1,8 +1,5 @@ - - BuildSystemType - Latest - + From d156e737d88dfde7f129a61b17228812d89203cf Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Fri, 10 Aug 2018 20:31:03 -0600 Subject: [PATCH 10/13] =?UTF-8?q?=E2=9B=94=20Disable=20signin=20command=20?= =?UTF-8?q?on=20macOS=2010.13=20and=20greater?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Commands/SignIn.swift | 20 ++++++++++++-------- App/MASError.swift | 26 ++++++++++++++++---------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/App/Commands/SignIn.swift b/App/Commands/SignIn.swift index 40e84e251..c71de8fd7 100644 --- a/App/Commands/SignIn.swift +++ b/App/Commands/SignIn.swift @@ -13,13 +13,17 @@ struct SignInCommand: CommandProtocol { typealias Options = SignInOptions let verb = "signin" let function = "Sign in to the Mac App Store" - + func run(_ options: Options) -> Result<(), MASError> { - + + if #available(macOS 10.13, *) { + return .failure(.signInDisabled) + } + guard ISStoreAccount.primaryAccount == nil else { return .failure(.alreadySignedIn) } - + do { printInfo("Signing in to Apple ID: \(options.username)") @@ -42,17 +46,17 @@ struct SignInCommand: CommandProtocol { struct SignInOptions: OptionsProtocol { let username: String let password: String - - let dialog: Bool - + + let dialog: Bool + typealias ClientError = MASError - + static func create(username: String) -> (_ password: String) -> (_ dialog: Bool) -> SignInOptions { return { password in { dialog in return SignInOptions(username: username, password: password, dialog: dialog) }} } - + static func evaluate(_ m: CommandMode) -> Result> { return create <*> m <| Argument(usage: "Apple ID") diff --git a/App/MASError.swift b/App/MASError.swift index 4eafb4a18..0883a863e 100644 --- a/App/MASError.swift +++ b/App/MASError.swift @@ -10,32 +10,38 @@ import Foundation enum MASError: Error, CustomStringConvertible { case notSignedIn + case signInDisabled case signInFailed(error: NSError?) case alreadySignedIn - + case purchaseFailed(error: NSError?) case downloadFailed(error: NSError?) case noDownloads case cancelled - + case searchFailed case noSearchResultsFound - + var description: String { switch self { case .notSignedIn: return "Not signed in" - + + case .signInDisabled: + return "The 'signin' command has been disabled on this macOS version. " + + "\nFor more info see: " + + "https://github.com/mas-cli/mas/issues/107" + case .signInFailed(let error): if let error = error { return "Sign in failed: \(error.localizedDescription)" } else { return "Sign in failed" } - + case .alreadySignedIn: return "Already signed in" - + case .purchaseFailed(let error): if let error = error { return "Download request failed: \(error.localizedDescription)" @@ -49,16 +55,16 @@ enum MASError: Error, CustomStringConvertible { } else { return "Download failed" } - + case .noDownloads: return "No downloads began" - + case .cancelled: return "Download cancelled" - + case .searchFailed: return "Search failed" - + case .noSearchResultsFound: return "No results found" } From 56fd95fcd399897c71887d4ed45311ba52619d4c Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Fri, 10 Aug 2018 20:31:25 -0600 Subject: [PATCH 11/13] =?UTF-8?q?=F0=9F=9A=A8=20Change=20var=20to=20let=20?= =?UTF-8?q?to=20silence=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/AppStore/ISStoreAccount.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/AppStore/ISStoreAccount.swift b/App/AppStore/ISStoreAccount.swift index 9f0ce6c6d..7cf0fa5e7 100644 --- a/App/AppStore/ISStoreAccount.swift +++ b/App/AppStore/ISStoreAccount.swift @@ -19,7 +19,7 @@ extension ISStoreAccount { guard let username = username, let password = password else { fatalError() } var account: ISStoreAccount? = nil - var error: MASError? = nil + let error: MASError? = nil let accountService: ISAccountService = ISServiceProxy.genericShared().accountService let client = ISStoreClient(storeClientType: 0) From 2c06966c3367b097f47f8bf8efb8060871cf5a1a Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Fri, 10 Aug 2018 20:34:13 -0600 Subject: [PATCH 12/13] =?UTF-8?q?=F0=9F=93=9D=20Update=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e936650..a1d1326ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- ⛔ Disable `signin` command on macOS 10.13 and greater +- 🐛 Fix `signout` command - ➖ CocoaSeeds #155 - ➕🍫 CocoaPods (1.5.3) #155 - 🛠 Xcode 9.4 #153 - 🛠 Xcode 9.3 #141 - 👷🏻‍♀️⚠️ Re-enable Danger #137 -- ✨ Add price to search #62 +- ✨ Add price to `search` command #62 ## [v1.4.1] Stop Littering - 2018-02-18 From 2518736c4c8ced4471b6ddf0e083242127b0891e Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Fri, 10 Aug 2018 21:04:21 -0600 Subject: [PATCH 13/13] =?UTF-8?q?=F0=9F=8F=AA=20Restore=20signIn=20call=20?= =?UTF-8?q?for=2010.12=20and=20below?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/AppStore/ISStoreAccount.swift | 45 ++++++++++--------- .../ISAccountService-Protocol.h | 5 +++ 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/App/AppStore/ISStoreAccount.swift b/App/AppStore/ISStoreAccount.swift index 7cf0fa5e7..52163d908 100644 --- a/App/AppStore/ISStoreAccount.swift +++ b/App/AppStore/ISStoreAccount.swift @@ -19,23 +19,23 @@ extension ISStoreAccount { guard let username = username, let password = password else { fatalError() } var account: ISStoreAccount? = nil - let error: MASError? = nil + var error: MASError? = nil let accountService: ISAccountService = ISServiceProxy.genericShared().accountService let client = ISStoreClient(storeClientType: 0) accountService.setStoreClient(client) - -// let context = ISAuthenticationContext(accountID: 0)! -// context.appleIDOverride = username -// -// if systemDialog { -// context.appleIDOverride = username -// } else { -// context.demoMode = true -// context.demoAccountName = username -// context.demoAccountPassword = password -// context.demoAutologinMode = true -// } + + let context = ISAuthenticationContext(accountID: 0) + context.appleIDOverride = username + + if systemDialog { + context.appleIDOverride = username + } else { + context.demoMode = true + context.demoAccountName = username + context.demoAccountPassword = password + context.demoAutologinMode = true + } let group = DispatchGroup() group.enter() @@ -64,15 +64,16 @@ extension ISStoreAccount { } group.leave() } - -// accountService.signIn(with: context) { success, _account, _error in -// if success { -// account = _account -// } else { -// error = .signInFailed(error: _error as NSError?) -// } -// group.leave() -// } + + // Only works on macOS Sierra and below + accountService.signIn(with: context) { success, _account, _error in + if success { + account = _account + } else { + error = .signInFailed(error: _error as NSError?) + } + group.leave() + } if systemDialog { group.wait() diff --git a/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h b/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h index c05f2cfdf..c2e0463f0 100644 --- a/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h +++ b/App/PrivateHeaders/StoreFoundation/ISAccountService-Protocol.h @@ -44,6 +44,11 @@ NS_ASSUME_NONNULL_BEGIN // - (void)parseCreditStringForProtocol:(NSDictionary *)arg1; - (void)signOut; + +// This method was removed in macOS High Sierra +// https://github.com/mas-cli/mas/issues/107 +- (void)signInWithContext:(ISAuthenticationContext * __nonnull)arg1 replyBlock:(void (^ __nonnull)(BOOL, ISStoreAccount * __nullable, NSError * __nullable))arg2 NS_DEPRECATED_MAC(10_9, 10.12); + - (void)addAccount:(ISStoreAccount *)arg1; - (void)addAccountWithAuthenticationResponse:(ISAuthenticationResponse *)arg1 makePrimary:(BOOL)arg2 replyBlock:(void (^)(ISStoreAccount *))arg3; - (void)accountWithAppleID:(NSString *)arg1 replyBlock:(void (^)(ISStoreAccount *))arg2;