Skip to content

Support iPadOS (iPad) & iOS (iPhone) apps #321

@dbrookman

Description

@dbrookman

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 Support bundle IDs everywhere app IDs are currently used #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:

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions