Skip to content

Commit

Permalink
Merge pull request #228 from mas-cli/list-10.14.4
Browse files Browse the repository at this point in the history
πŸ›πŸ’© Fix for list command on 10.14.4
  • Loading branch information
phatblat authored Mar 31, 2019
2 parents 262daca + f413be3 commit dedd62c
Show file tree
Hide file tree
Showing 28 changed files with 146 additions and 181 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- πŸ› Fix for list command on macOS 10.14.4 #228
- 🐟 Command completions for fish shell #214
thanks, [@ylectric](https://github.com/ylectric)!
- 🎨 SwiftFormat #215
Expand Down
6 changes: 5 additions & 1 deletion MasKit/Commands/List.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ public struct ListCommand: CommandProtocol {
return .success(())
}
for product in products {
print("\(product.itemIdentifier) \(product.appName) (\(product.bundleVersion))")
var appName = product.appName
if appName == "" {
appName = product.bundleIdentifier
}
print("\(product.itemIdentifier) \(appName) (\(product.bundleVersion))")
}
return .success(())
}
Expand Down
1 change: 1 addition & 0 deletions MasKit/Models/SoftwareProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/// Protocol describing the members of CKSoftwareProduct used throughout MasKit.
public protocol SoftwareProduct {
var appName: String { get }
var bundleIdentifier: String { get set }
var bundlePath: String { get set }
var bundleVersion: String { get set }
var itemIdentifier: NSNumber { get set }
Expand Down
1 change: 1 addition & 0 deletions MasKitTests/Commands/UninstallCommandSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class UninstallCommandSpec: QuickSpec {
let appId = 12345
let app = SoftwareProductMock(
appName: "Some App",
bundleIdentifier: "com.some.app",
bundlePath: "/tmp/Some.app",
bundleVersion: "1.0",
itemIdentifier: NSNumber(value: appId)
Expand Down
1 change: 1 addition & 0 deletions MasKitTests/Models/SoftwareProductMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

struct SoftwareProductMock: SoftwareProduct {
var appName: String
var bundleIdentifier: String
var bundlePath: String
var bundleVersion: String
var itemIdentifier: NSNumber
Expand Down
34 changes: 12 additions & 22 deletions PrivateFrameworks/CommerceKit/CKAccountStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,54 @@
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

@import Cocoa;

//#import "NSObject.h"
//#import "CKServiceInterface.h"

//#import "ISStoreURLOperationDelegate.h"
@import Foundation;

@class CKDemoAccount, CKStoreAccount, CKStoreClient, ISStoreAccount, NSArray;

@class NSString;

NS_ASSUME_NONNULL_BEGIN

@interface CKAccountStore : NSObject
{

// CKStoreClient *_storeClient;

CKStoreClient *_storeClient;
}

+ (CKAccountStore *)sharedAccountStore;
+ (instancetype)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) BOOL primaryAccountIsPresentAndSignedIn;
@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;
@property(readonly) BOOL primaryAccountIsPresentAndSignedIn;
@property(readonly) CKStoreAccount *primaryStoreAccount;
@property(readonly) CKDemoAccount *demoAccount;
@property(readonly) BOOL isDemoModeEnabled;
Expand Down
30 changes: 15 additions & 15 deletions PrivateFrameworks/CommerceKit/CKPurchaseController.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
//

#import "CKServiceInterface.h"
//#import <StoreFoundation/SSPurchase.h>
@import StoreFoundation;

@class NSArray, NSMutableArray, NSNumber;

@class SSPurchaseResponse;

NS_ASSUME_NONNULL_BEGIN

typedef void (^SSPurchaseCompletion)(SSPurchase * _Nullable purchase, BOOL completed, NSError * _Nullable error, SSPurchaseResponse * _Nullable response);
Expand All @@ -23,23 +19,27 @@ typedef void (^SSPurchaseCompletion)(SSPurchase * _Nullable purchase, BOOL compl
NSArray *_adoptionEligibleItems;
NSNumber *_adoptionServerStatus;
NSNumber *_adoptionErrorNumber;
// CDUnknownBlockType _dialogHandler;

// CDUnknownBlockType _dialogHandler;
}

+ (void)setNeedsSilentMachineAuthorization:(BOOL)arg1;
+ (CKPurchaseController *)sharedPurchaseController;

+ (instancetype)sharedPurchaseController;

//@property(copy) CDUnknownBlockType dialogHandler; // @synthesize dialogHandler=_dialogHandler;
//- (void).cxx_destruct;
//- (BOOL)adoptionCompletedForBundleID:(id)arg1;
//- (void)_performVPPReceiptRenewal;
//- (void)checkServerDownloadQueue;
//- (id)purchaseInProgressForProductID:(id)arg1;
//- (id)purchasesInProgress;
//- (void)cancelPurchaseWithProductID:(id)arg1;
//- (void)resumeDownloadForPurchasedProductID:(id)arg1;
//- (void)startPurchases:(NSArray<SSPurchase *> *)purchases shouldStartDownloads:(BOOL)downloads eventHandler:(CDUnknownBlockType)arg3;
//- (void)startPurchases:(NSArray<SSPurchase *> *)purchases withOptions:(unsigned long long)arg2 completionHandler:(CDUnknownBlockType)arg3;

- (BOOL)adoptionCompletedForBundleID:(id)arg1;
- (void)_performVPPReceiptRenewal;
- (void)checkServerDownloadQueue;
- (id)purchaseInProgressForProductID:(id)arg1;
- (id)purchasesInProgress;
- (void)cancelPurchaseWithProductID:(id)arg1;
- (void)resumeDownloadForPurchasedProductID:(id)arg1;

//- (void)startPurchases:(id)arg1 shouldStartDownloads:(BOOL)arg2 eventHandler:(CDUnknownBlockType)arg3;
//- (void)startPurchases:(id)arg1 withOptions:(unsigned long long)arg2 completionHandler:(CDUnknownBlockType)arg3;

- (void)performPurchase:(SSPurchase *)purchase withOptions:(unsigned long long)arg2 completionHandler:(SSPurchaseCompletion _Nullable)completionHandler;

Expand Down
2 changes: 0 additions & 2 deletions PrivateFrameworks/CommerceKit/CKServiceInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

@import StoreFoundation;
//#import <StoreFoundation/ISServiceProxy.h>
#import "ISServiceProxy.h"

@interface CKServiceInterface : ISServiceProxy
Expand Down
10 changes: 6 additions & 4 deletions PrivateFrameworks/CommerceKit/CKSoftwareMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#import "CKServiceInterface.h"

@import StoreFoundation;

@class CKSoftwareMapObserver, NSMutableDictionary;

NS_ASSUME_NONNULL_BEGIN
Expand All @@ -19,12 +17,16 @@ NS_ASSUME_NONNULL_BEGIN
}

+ (instancetype)sharedSoftwareMap;

@property(retain, nonatomic) CKSoftwareMapObserver *sharedObserver; // @synthesize sharedObserver=_sharedObserver;
@property(retain, nonatomic) NSMutableDictionary *productsObservers; // @synthesize productsObservers=_productsObservers;

// - (void).cxx_destruct;
//- (void).cxx_destruct;

// Added 10.14.4
//- (void)startAdoptionEligibilityCheckWithReplyBlock:(CDUnknownBlockType)arg1;

// Added 10.14.4
- (id)adopt:(id)arg1;
- (id)adoptableBundleIdentifiers;

- (BOOL)adoptionCompletedForBundleID:(id)arg1 adoptingDSID:(out _Nullable id * _Nullable)arg2 appleID:(out _Nullable id * _Nullable)arg3;
Expand Down
19 changes: 8 additions & 11 deletions PrivateFrameworks/CommerceKit/CKUpdateController.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

// #import <CommerceKit/CKServiceInterface.h>
#import "CKServiceInterface.h"

@class CKUpdateControllerClient, NSMutableDictionary;

@class CKUpdate;

NS_ASSUME_NONNULL_BEGIN

@interface CKUpdateController : CKServiceInterface
Expand All @@ -33,8 +30,8 @@ NS_ASSUME_NONNULL_BEGIN
@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;
Expand Down Expand Up @@ -73,18 +70,18 @@ NS_ASSUME_NONNULL_BEGIN
- (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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//

@import StoreFoundation;
//#import <StoreFoundation/ISURLOperationDelegate.h>

#import "ISURLOperationDelegate.h"

@class ISStoreURLOperation, NSNumber, NSString;
Expand Down
18 changes: 10 additions & 8 deletions PrivateFrameworks/StoreFoundation/CKSoftwareProduct.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
//

@import Foundation;
// #import <Foundation/NSZone.h>

//#import "NSObject.h"
//#import "NSCopying.h"
//#import "NSSecureCoding.h"

@class NSDate, NSNumber, NSString, NSValue;

Expand All @@ -23,8 +18,12 @@ NS_ASSUME_NONNULL_BEGIN
BOOL _isMachineLicensed;
BOOL _isLegacyApp;
BOOL _metadataChangeIsExpected;
// Added 10.14.4
BOOL _metadataChangeHasAlreadyOccurred;
NSString *_accountOpaqueDSID;
NSString *_accountIdentifier;
// Added 10.14.4
NSString *_appName;
NSString *_bundleIdentifier;
NSString *_bundleVersion;
NSString *_bundlePath;
Expand All @@ -51,6 +50,8 @@ NS_ASSUME_NONNULL_BEGIN
@property(copy, nullable) NSNumber *expectedStoreVersion; // @synthesize expectedStoreVersion=_expectedStoreVersion;
@property(copy, nullable) NSString *expectedBundleVersion; // @synthesize expectedBundleVersion=_expectedBundleVersion;

// Added 10.14.4
@property BOOL metadataChangeHasAlreadyOccurred; // @synthesize metadataChangeHasAlreadyOccurred=_metadataChangeHasAlreadyOccurred;
@property BOOL metadataChangeIsExpected; // @synthesize metadataChangeIsExpected=_metadataChangeIsExpected;
@property long long source; // @synthesize source=_source;
@property BOOL isLegacyApp; // @synthesize isLegacyApp=_isLegacyApp;
Expand All @@ -64,7 +65,6 @@ NS_ASSUME_NONNULL_BEGIN
@property BOOL vppLicenseRevoked; // @synthesize vppLicenseRevoked=_vppLicenseRevoked;
@property BOOL isVPPLicensed; // @synthesize isVPPLicensed=_isVPPLicensed;
@property BOOL installed; // @synthesize installed=_installed;

@property(retain) NSValue *mdItemRef; // @synthesize mdItemRef=_mdItemRef;
@property(retain) NSDate *purchaseDate; // @synthesize purchaseDate=_purchaseDate;
@property(retain) NSNumber *versionIdentifier; // @synthesize versionIdentifier=_versionIdentifier;
Expand All @@ -74,15 +74,17 @@ NS_ASSUME_NONNULL_BEGIN
@property(retain) NSString *bundlePath; // @synthesize bundlePath=_bundlePath;
@property(retain) NSString *bundleVersion; // @synthesize bundleVersion=_bundleVersion;
@property(retain) NSString *bundleIdentifier; // @synthesize bundleIdentifier=_bundleIdentifier;

@property(retain, nonnull) NSString *appName; // @synthesize appName=_appName;

@property(retain) NSString *accountIdentifier; // @synthesize accountIdentifier=_accountIdentifier;
@property(retain) NSString *accountOpaqueDSID; // @synthesize accountOpaqueDSID=_accountOpaqueDSID;

// - (void).cxx_destruct;
//- (void).cxx_destruct;

- (instancetype)copyWithZone:(nullable NSZone *)zone;
- (nullable instancetype)initWithCoder:(nonnull NSCoder *)coder;
- (void)encodeWithCoder:(nonnull NSCoder *)coder;
@property(readonly, nonnull) NSString *appName;
- (nonnull NSString *)description;
@property(readonly, nullable) NSString *sourceString;

Expand Down
6 changes: 2 additions & 4 deletions PrivateFrameworks/StoreFoundation/CKUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

// #import "NSObject.h"

// #import "NSSecureCoding.h"
@import Foundation;

@class NSDate, NSDictionary, NSMutableDictionary, NSNumber, NSString, SSPurchase;

Expand All @@ -22,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@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;
Expand Down
6 changes: 2 additions & 4 deletions PrivateFrameworks/StoreFoundation/ISAuthenticationContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//

// #import "NSObject.h"

// #import "NSSecureCoding.h"
@import Foundation;

@class NSDictionary, NSNumber, NSString;

Expand Down Expand Up @@ -50,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
@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;
Expand Down
6 changes: 1 addition & 5 deletions PrivateFrameworks/StoreFoundation/ISAuthenticationResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
// 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
Expand Down Expand Up @@ -35,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
@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;
Expand Down
Loading

0 comments on commit dedd62c

Please sign in to comment.