On 17 Oct 2014, at 2:25 am, Kyle Sluder <k...@ksluder.com> wrote:

> I’m assuming this is a snippet extracted from your actual Info.plist.

Yes, when you copy a section of the info.plist it inserts a new header around 
it.


>>   <dict>
>>       <key>UTTypeConformsTo</key>
>>       <array>
>>           <string>public.content</string>
>>       </array>
> 
> You’re not conforming to any physical types. You probably want to conform to 
> public.data as well as public.content.


OK... I hadn't come across the documentation that really spells that out, but I 
added it anyway. This was after some time had passed away from my computer. 
Well, it worked. This was good news, but also suspicious, because I'd earlier 
tried public.data (instead, rather than as well as, public.content) without 
luck. OK, so maybe it does need both.... but now, when I remove the 
public.data, the behaviour does not revert to how it was! It has turned into an 
inverse Heisenbug - it only shows up when you're looking for it, sometimes.

OK, further experiment...

Adding in or removing public.data doesn't have any immediate effect, but seems 
to after a delay of several minutes. It also seems to be affected by whether I 
also have an OSType entry or not - if I do, I also need the public.data, but 
it's hard to tell because of the long delay between the change and the effect 
it has on the system. Presumably the lsregister is only updated by some daemon 
that runs fairly slowly? That's a real problem when you're developing and need 
to see the effect of changes immediately. Shouldn't XCode be forcing the 
register to be valid for the app it's debugging?

> Also, can you provide your CFBundleDocumentTypes array? Most of those keys 
> have been supplanted by the UTI declaration, but you still need that to 
> connect the UTI to an NSDocument subclass.

That looks OK, here's the relevant entry (there are others):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<array>
        <dict>
                <key>CFBundleTypeExtensions</key>
                <array>
                        <string>cxtf</string>
                </array>
                <key>CFBundleTypeIconFile</key>
                <string>crucibledoc</string>
                <key>CFBundleTypeName</key>
                <string>Crucible File</string>
                <key>CFBundleTypeRole</key>
                <string>Editor</string>
                <key>LSItemContentTypes</key>
                <array>
                        <string>net.apptree.crucible.newcrossfile</string>
                </array>
                <key>LSTypeIsPackage</key>
                <integer>0</integer>
                <key>NSDocumentClass</key>
                <string>CRUDocument</string>
        </dict>
        <dict>
</array>
</plist>


I"m grateful for the help, though so far I'm still not certain whether I've 
nailed the problem or not.


--Graham


_______________________________________________

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