mas
mas copied to clipboard
Improve & standardize help output
Improve & standardize help output.
Specifically focus on what Apple IDs are used for each subcommand:
- macOS Apple ID, which is associated with the current macOS user in System Settings/System Preferences. It can be observed:
- In Swift:
(UserDefaults.standard.persistentDomain(forName: "MobileMeAccounts")?["Accounts"] as? [[String: Any]])?.first?["AccountID"]- From command line:
defaults read MobileMeAccounts | plutil -extract "Accounts".0."AccountID" raw -o - - - App Store Apple ID, which is when you login in the App Store app. It can be observed:
- In Swift (in macOs <= 10.12.x):
ISStoreAccount.primaryAccount.identifier- From command line: not sure
Currently, I think that the subcommands, when working, have the following interactions with the macOS & MAS Apple IDs:
- MAS
- account
- signin
- signout
- MAS (requires app in macOS installed app list)
- upgrade
- MAS (requires app not in macOS installed app list)
- install
- lucky
- purchase
- macOS (requires app in macOS installed app list)
- list
- outdated
- uninstall (currently used, but probably not strictly necessary)
- Neither
- help
- home
- info
- open
- reset
- search
- vendor
- version
Also, standardize various variable names to conform to standardized naming in help, documentation, etc.
Will do so after upgrading to Swift Argument Parser, so waiting for #542 to be merged.