mirror of
https://github.com/mas-cli/mas
synced 2024-11-22 03:23:08 +00:00
Merge pull request #45 from rodionovd/display-app-versions
Display app versions for installed and outdated apps
This commit is contained in:
commit
96d6e5e415
3 changed files with 8 additions and 3 deletions
|
@ -18,7 +18,7 @@ struct ListCommand: CommandType {
|
|||
return .Success(())
|
||||
}
|
||||
for product in products {
|
||||
print("\(product.itemIdentifier) \(product.appName)")
|
||||
print("\(product.itemIdentifier) \(product.appName) (\(product.bundleVersion))")
|
||||
}
|
||||
return .Success(())
|
||||
}
|
||||
|
|
|
@ -14,8 +14,13 @@ struct OutdatedCommand: CommandType {
|
|||
func run(options: Options) -> Result<(), MASError> {
|
||||
let updateController = CKUpdateController.sharedUpdateController()
|
||||
let updates = updateController.availableUpdates()
|
||||
let softwareMap = CKSoftwareMap.sharedSoftwareMap()
|
||||
for update in updates {
|
||||
print("\(update.itemIdentifier) \(update.title) (\(update.bundleVersion))")
|
||||
if let installed = softwareMap.productForBundleIdentifier(update.bundleID) {
|
||||
print("\(update.itemIdentifier) \(update.title) (\(installed.bundleVersion) -> \(update.bundleVersion))")
|
||||
} else {
|
||||
print("\(update.itemIdentifier) \(update.title) (unknown -> \(update.bundleVersion))")
|
||||
}
|
||||
}
|
||||
return .Success(())
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
- (id)productForPath:(id)arg1;
|
||||
- (NSArray<CKSoftwareProduct *>* __nullable)allProducts;
|
||||
- (CKSoftwareProduct *)productForItemIdentifier:(unsigned long long)arg1;
|
||||
- (CKSoftwareProduct *)productForBundleIdentifier:(NSString *)arg1;
|
||||
- (nullable CKSoftwareProduct *)productForBundleIdentifier:(NSString *)arg1;
|
||||
- (void)removeProductsObserver:(id)arg1;
|
||||
//- (id)addProductsObserver:(CDUnknownBlockType)arg1 queue:(id)arg2;
|
||||
- (id)initWithStoreClient:(id)arg1;
|
||||
|
|
Loading…
Reference in a new issue