Package/folder confusion
Package/folder confusion
- Subject: Package/folder confusion
- From: Charles Jenkins <email@hidden>
- Date: Tue, 17 Feb 2015 09:31:14 -0500
I’ve got a goofy issue that’s been with me for a while, but I had more important things to work on.
Months ago, members of this list told me how to set up my project so the document would be stored as a package. I tried it, it worked, and all was great. But at that time I was developing different parts of the app separately and saving them off as I got each bit working—so I’d have a separate working example to come back to later and compare with if I screwed things up.
At some point in my iterations, I think I must’ve confused Yosemite, because my document packages now usually appear in Finder as directories. That has been very convenient for testing and inspecting my file format, since it saves me the step of opening the package, but now I’d like to cure the issue. Mostly because I have a couple of other problems I think may be related: My Recent documents menu isn’t populating, and sometimes after saving, when I open a file inside the package-directory to inspect it, I see the *old* contents. I somehow get an old Version of the file until I Force Quit Finder. (I’m using TextWrangler to inspect my files, and when Finder gets in a mood to serve up old Versions, sometimes TextWrangler blows up even trying to read them. Then after a Force Quit, Finder shows the proper content again and the new file can be read.)
In my target’s Info tab, I have one Document Type: I filled in its Name, Class (the class of my Document window controller), and Extension. I selected Editor as the Role and made sure “Document is distributed as a bundle” is checked.
I also have one Exported UTI: I filled in the same extension as the Document Type, added a Description, and indicated it Conforms To com.apple.package.
I examined the Info.plist file viewing raw keys and values to confirm that LSTypeIsBundle = YES for my document type, and I’ve triple-checked that I typed the extension exactly the same in both places. I also compared against the old version of the app I was working on back when my packages always appeared as packages. I was coding in Swift then and using a different extension name, but the settings are virtually the same.
Now if I use Onyx to rebuild Launch Services, after a reboot my documents show up as packages. But then the second I start debugging my app in Xcode, the documents revert to being plain directories.
Any ideas how to fix this?
—
Charles
_______________________________________________
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