Following up with a related second scenario that's part of the same investigation.
Scenario 2: Multiple installations of the same app on disk
Setup: the same bundle identifier installed at more than one path on the same Mac, for example one copy installed via a DMG at /Applications/App.app, and a separate copy installed via the Mac App Store, or a locally built development version at a different path. We understand Launch Services treats these as the same app for identification purposes, and that duplicate registrations are a known, accepted characteristic of Launch Services rather than something the system actively prevents.
Questions:
When a push or local notification arrives for that shared bundle identifier and the user taps it, which installation actually gets launched or brought to the foreground? Is the resolution based on something like most recently registered path, highest CFBundleVersion, most recently launched, or something else in Launch Services?
Is this resolution behavior documented anywhere, or should developers actively avoid this situation entirely, for example by using distinct bundle identifiers per distribution channel, the way some developers already do for App Store versus development builds?
Topic:
App & System Services
SubTopic:
Notifications
Tags: