LaunchServices helper application registration path exclusions

Originator:keithbsmiley
Number:rdar://19819280 Date Originated:12-Feb-2015 03:15 PM
Status:Duplicate of 17491721 Resolved:
Product:OS X Product Version:10.10.2
Classification:Serious Bug Reproducible:Always
 
Summary:
During development, LaunchServices grabs the bundle identifier of application helpers and registers their DerivedData folder path as the correct path. This causes issues where you have to clear the LaunchServices cache in order to actually install the application and successfully register the helper application as a login item with SMLoginItemSetEnabled().

Steps to Reproduce:
1. Create an application with an application helper login item
2. Run the application
3. Run `/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump | grep appName` from the terminal
4. Note the helper path is under `~/Library/Developer/Xcode/DerivedData/...`
5. Archive the application and move it to `/Applications`
6. Run the app
7. See that the main bundle path has changed, but the helper has stayed the same.

Expected Results:
LaunchServices should pick up the new helper application's path and prefer it to the derived data path or LaunchServices should exclude certain paths from the database.

Actual Results:
The helper application in the DerivedData directory is registered as the application to launch at login, which opens the corresponding parent application instead of the parent application in `/Applications`.

Notes:
LaunchServices can also pick up applications and their bundle identifiers when they are bundled as Xcode archives and when they are in the trash. Both of these locations create the same problem that is described above.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!