Friday 15 May 2015

OSX Yosemite: Launch Services has build path to application rather than run path -



OSX Yosemite: Launch Services has build path to application rather than run path -

i think problem specific yosemite because didn't have issues in mavericks (or mount lion before that)...

i have application wrote registers helper app run @ startup using smloginitemsetenabled. i'm not having problems here; works fine.

smloginitemsetenabled works taking bundle identifier (such "com.mycompany.myapp"), finding path bundle via launch services, , running @ startup.

the problem when "archive" project, archive build output automatically registered bundle's path in launch services. on yosemite, if re-create bundle /applications , run it, launch services still point build path. because app sandboxed, osx reject run helper during boot.

for example:

$ osascript -e 'tell application "finder" set targetapppath (application file id "com.mycompany.myapp") string' macintosh hd:users:myuser:library:developer:xcode:archives:2014-10-30:myapp 10-30-14, 9.57 am.xcarchive:products:applications:myapp.app $ osascript -e 'tell application "finder" set targetapppath (application file id "com.mycompany.myapphelper") string' macintosh hd:users:myuser:library:developer:xcode:archives:2014-10-30:myapp 10-30-14, 9.57 am.xcarchive:products:applications:myapp.app:contents:library:loginitems:myapphelper.app

despite fact i've copied bundle /applications , i'm running location, launch services still pointing build path.

in mavericks , mount lion, ran similar issue if lastly time ran app in debug mode via "play" button in xcode because launch services have path pointing debug build directory. built archive , copied /applications , ran there, fine. seems yosemite update launch services database if bundle's version has changed, , doesn't happen copying bundle 1 place another.

does have ideas? there way forcefulness launch services update path bundle, either in code or via command line?

osx osx-yosemite launch-services

No comments:

Post a Comment