[AltServer] Adds method to fetch installed apps on devices

This commit is contained in:
Riley Testut
2021-06-04 12:31:54 -07:00
parent 1616ca1c34
commit d07bd33e06
4 changed files with 154 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
//
// InstalledApp.swift
// AltServer
//
// Created by Riley Testut on 5/25/21.
// Copyright © 2021 Riley Testut. All rights reserved.
//
import Foundation
@objc(ALTInstalledApp) @objcMembers
class InstalledApp: NSObject, MenuDisplayable
{
let name: String
let bundleIdentifier: String
let executableName: String
init?(dictionary: [String: Any])
{
guard let name = dictionary[kCFBundleNameKey as String] as? String,
let bundleIdentifier = dictionary[kCFBundleIdentifierKey as String] as? String,
let executableName = dictionary[kCFBundleExecutableKey as String] as? String
else { return nil }
self.name = name
self.bundleIdentifier = bundleIdentifier
self.executableName = executableName
}
}