On Jul 17, 2013, at 21:14 , Peter Teeson <ptee...@icloud.com> wrote:

> However from the Googling I did and the experiments I performed it seems I 
> have to use terminal to
> (1) 
> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
>  -r -domain local -domain user
> 
> (2) re-boot to effectuate new icons 
> 
> as I try them out after I have re-built the app.
> Is this correct and SOP? Or is there a better way?

No, it's not really the correct approach. This is one of those Internet voodoo 
things that's been around for years, and survives because rebuilding the Launch 
Services database does sometimes fix (or appear to fix) the icons being 
displayed.

-- If you change your app's icons and you see the new icons being correctly 
used, there's nothing you need to do.

-- If the new icons don't show up, then you probably have an app bundle 
somewhere that has the old icons, and Launch Services is choosing the bundle 
with the old icons to represent your app.

This sometimes happens when you have built for multiple configurations 
(Build/Release/etc) in the past, and haven't yet caused all of them to be 
rebuilt since you changed the icons. If the icons are displaying wrong, you can 
try cleaning (or just deleting) the derived data folder, which should delete 
any old app bundles.

You might also have put a copy of an old app bundle somewhere else, and that 
may prevent your new icons from showing up.

-- Occasionally, the Launch Services database gets out of sync with what's 
actually in the file system, and so you can't fix it by removing files. In that 
case, you might have to nuke the database with lsregister, but you shouldn't 
expect to have to do this as a regular thing.

Note that if you have multiple bundles with different icon definitions, using 
lsregister isn't necessarily going to solve the problem. In the presence of 
conflicting information, Launch Services doesn't really know which to use.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to