mas-cli / mas-cli/mas

Completely support iPadOS (iPad) & iOS (iPhone) apps

Open
#321 25 comments 36 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature investigation
Dominant language
Swift
Stars
12.4k
Forks
299
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Notes

It appears that the data structure in CKSoftwareMap (from CommerceKit, a macOS private framework) that lists the apps installed from the Mac App Store (which is used by mas) doesn't include installed iOS or iPadOS apps.

Spotlight contains some info about installed iOS & iPadOS along with installed macOS apps, but it does not seem to include the ADAM IDs for iOS or iPadOS apps.

We can look for other data sources that contain iOS & iPadOS along with their ADAM IDs (investigating private frameworks depends on #565).

Assuming that there are no other useful data sources, and that the known data sources behave as I suspect from the info I've seen, mas can:

Find installed apps via Spotlight instead of via CKSoftwareMap (done in mas 2.0.0)

  • ADAM IDs:
    • While Spotlight includes some data about iOS & iPadOS apps, it doesn't include ADAM IDs for them (but it does include ADAM IDs for macOS apps from the Mac App Store)
    • Spotlight does, however, include bundle IDs, which are unique per app.
    • Implement #541
    • Encourage users to use bundle IDs instead of ADAM IDs
    • If users use ADAM IDs, use the Apple iTunes Search Web API to lookup bundle IDs from ADAM IDs
  • App names:
    • Spotlight includes all the data that mas currently reads from objects returned from CKSoftwareMap, except it doesn't contain app names; it contains some data that might be similar to app names, but that can be off.
    • To provide missing app names, mas can query the Apple iTunes Search Web API.

The above is ridiculous, but it is the only currently known generic workaround.

Investigate for better sources of installed app data

  • pkgutil --pkg-info-plist <bundle-id>
  • /Applications/<app-dir-name>.app/Contents/_MASReceipt/receipt

See:

  • #648
  • #669

Original Issue

Your Environment

  • mas version: 1.8.0
  • macOS version: 11.2.1 (20D74)
mas Install Method

brew install mas (homebrew-core)

Describe the Bug

mas list, mas search, mas outdated do not show iOS apps that can be installed via the App Store on M1 macs.

To Reproduce

  1. Install an iOS app via the App Store.
  2. Run mas list

Expected Behavior

The installed iOS app should be among the apps listed.

Actual Behavior

The iOS app is not among the apps listed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the installed-app discovery path used by mas list, mas search, and mas outdated, comparing CKSoftwareMap with Spotlight and the receipt sources in pkgutil and /Applications/.app/Contents/_MASReceipt/receipt. Review #541, #648, and #669 for related work; done means identifying a reliable source and supporting iOS and iPadOS apps with the required identifiers and names.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, macos, swift
Domain
cli, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.