Something is extremely screwy.

I've rebuilt the lsregister, I've rebooted in safe mode, tried everything that 
I can find hints about on the 'net.

In my app, I log the results from +readableTypes and they all look fine. 
Experimenting, these seem only to be derived from the document types I declare, 
they are unaffected by the UTIs. It's still unclear to me what a document-based 
app does with UTIs when opening a file, whether it looks at local informaiton 
only, or goes out to the ls database - I suspect it must be the latter since 
the local info appears to be correct and consistent.

I deleted the UTIs altogether to start over, and now I get a logged warning 
from NSDocumentController about being unable to get a type from the file 
extension, and that I should declare at least one EXPORT UTI. I add that back 
in and the warning shuts up.

My Open dialog now shows files available for the two additional (non-native) 
types I can open, but greys out my native type.

I add back in all the import and export UTIs that I had before. Same thing - my 
native type is unavailable, the extra types are readable and open OK.

I installed the 3rd party pref pane RCDefaultApp to try and make it a bit 
easier to examine the ls register database. It seems to have all the expected 
mappings for my file type, the UTI and my app's bundle ID. Comparing to other 
apps, it appears to be no different, and yet I'm still unable to open my native 
files.

one small clue might be that during this deleting and recreating my UTIs and 
document types, I changed the description of my document, however the Finder 
and RCDefaultApp displays the OLD name I had used, even after forcing a rebuild 
of the register. This suggests that the OS is caching the register and the 
rebuild commands (namely 
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
 -kill -r -domain local -domain user). Info on the net suggests that a reboot 
in safe mode should do something about that, but after doing so I see no 
improvement.

I don't know, but it seems to bethat my system is screwed up in some way that 
the usual lsregister rebuild isn't clearing. If that's the case then this 
screw-up occurred using Xcode 6.0.1's UTI editor plus launching my app, nothing 
especially skanky on my part.

I think my question must be now: how do I get rid of the cached register and 
rebuild it properly?

--Graham







On 16 Oct 2014, at 3:11 pm, Graham Cox <graham....@bigpond.com> wrote:

> 
> On 16 Oct 2014, at 2:19 pm, Kyle Sluder <k...@ksluder.com> wrote:
> 
>> Is there another app on your system declaring that file extension for its 
>> own UTI? You can dump the database with lsregister(1).
> 
> 
> No, I used lsregister -dump and my app is the only one.


_______________________________________________

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