Re: Problem getting import UTI recognised
Re: Problem getting import UTI recognised
- Subject: Re: Problem getting import UTI recognised
- From: Graham Cox <email@hidden>
- Date: Thu, 16 Oct 2014 19:04:17 +1100
On 16 Oct 2014, at 5:18 pm, Quincey Morris <email@hidden> wrote:
> I dunno, but I also got into LS database hell once, and it wasn’t fun.
Well, that's actually a help - it means that what I'm experiencing isn't necessarily unique.
> From what I recall, rebuilding the database isn’t really reliable. Whether it lies, or doesn’t do it, or does something more complicated than you expect, I don’t know. Again from what I recall, the only solution was to go on a search and destroy mission locating every lurking copy of the app that remained on the system. Only when I found and destroyed the last one did the associations work properly.
>
> Deleting your derived data folder is a key part of this, but you may find other copies of your app (from previous builds, test sessions, emails, etc) in unexpected places.
>
> The fact that the Finder is mis-reporting the file type suggests to me that there are out-of-date copies of your app somewhere.
This is really bizarre.
I deleted not only every copy of my app, but I deleted the entire project target and made a new one with a new name. I gave it an entirely new bundle identifier, and I changed the file extension and UTI string. This was a lot of work, but the point should be that it has no apparent connection to my previous app, it should look like something completely new, opening different file types. Even if the ls database is corrupted for my old app, surely new entries arising from this should be clean?
It acts exactly the same.
I subclassed NSDocumentController so I can intercept and log some of the internals, and the file types being passed to -beginOpenPanel:forTypes:completionHandler: are correct - all of the document types I declare are there. But the resulting Open panel still greys out my native type. I don't know if this open panel calls back into the document controller as a delegate, but there seem to be no other public methods that I can override to check what's going on - it seems possible that the open panel might be talking directly to launch services outside of the app, so it can still ignore some of the local info even though that seems all in order.
I'm really stumped now; I can't understand what I'm seeing.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden