From b3c64f7514c35fb71fe6bac24a02734914353b82 Mon Sep 17 00:00:00 2001 From: Andrew Naylor Date: Tue, 25 Aug 2015 02:43:15 +0800 Subject: [PATCH] List updates in a simpler form --- mas-cli/Commands/ListUpdates.swift | 5 ++++- mas-cli/Headers/StoreFoundation/CKUpdate.h | 6 +----- mas-cli/mas-cli-Bridging-Header.h | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mas-cli/Commands/ListUpdates.swift b/mas-cli/Commands/ListUpdates.swift index e4c6eeb..c40aded 100644 --- a/mas-cli/Commands/ListUpdates.swift +++ b/mas-cli/Commands/ListUpdates.swift @@ -14,7 +14,10 @@ struct ListUpdatesCommand: CommandType { switch mode { case .Arguments: let updateController = CKUpdateController.sharedUpdateController() - print(updateController.availableUpdates()) + let updates = updateController.availableUpdates() as! [CKUpdate] + for update in updates { + println("\(update.itemIdentifier) \(update.title) \(update.actionParams)") + } default: break } diff --git a/mas-cli/Headers/StoreFoundation/CKUpdate.h b/mas-cli/Headers/StoreFoundation/CKUpdate.h index 524b573..4618b13 100644 --- a/mas-cli/Headers/StoreFoundation/CKUpdate.h +++ b/mas-cli/Headers/StoreFoundation/CKUpdate.h @@ -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 NSDate, NSDictionary, NSMutableDictionary, NSNumber, NSString, SSPurchase; @interface CKUpdate : NSObject @@ -19,7 +15,7 @@ + (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/mas-cli/mas-cli-Bridging-Header.h b/mas-cli/mas-cli-Bridging-Header.h index da87de7..58225b8 100644 --- a/mas-cli/mas-cli-Bridging-Header.h +++ b/mas-cli/mas-cli-Bridging-Header.h @@ -18,6 +18,7 @@ #import "CKDownloadQueueClient.h" #import "CKPurchaseController.h" #import "CKSoftwareMap.h" +#import "CKUpdate.h" #import "CKUpdateController.h" #import "SSDownload.h"