On Sun, Jun 5, 2016, at 01:14 AM, Chris Ridd wrote: > > > On 4 Jun 2016, at 23:02, Daryle Walker <dary...@mac.com> wrote: > > > >> On Jun 4, 2016, at 12:18 PM, Peter Hudson <peter.hud...@me.com> wrote: > >> > >> Hi Mike > >> > >> You're right - I want the behaviour of a package. Do you happen to know > >> how I can achieve it? I had presumed it might be some mix of flag > >> setting at system level. If for example i set the extension on an > >> NSFileWrapper to .bundle i get some of what I need - but I cant find out > >> how to get an icon of my choosing associated with it. > > > > You’ll have to work at it; it won’t be completely transparent to your users > > to experience nor you to program. > > > > The “.bundle” extension is already in use for system plug-ins. You have to > > come up with a new extension. For instance, if you’re already using “.xyz” > > for you single-file format, you could use “.xyz-pkg” for your package > > format. > > Are you sure that’s true? Apps like OmniGraffle have a flat file format > *and* a bundle format, both using the .graffle extension. In OmniGraffle > Pro's document inspector you can switch between formats.
At one point OmniGraffle dropped the flat file/package inspector precisely because using the same extension for both confused Launch Services. But there was so much wrong with OmniGraffle’s UTI declarations at the time; fixing them might have resolved the issue and led to the return of the format switch. If you’re going to try to share the same filename extension for packages and flat files, it is doubly important that you have *two* UTIs, and that teach UTI declare conformance to exactly *one or the other* of the “physical” hierarchies. That means your document package UTI *must not* conform to your flat-file UTI, because then it would conform to both the package and flat-file physical hierarchies, and LS will get confused about which UTI should be used for flat files. --Kyle Sluder > > If you have the app or a demo you can investigate its Info.plist. > > Chris _______________________________________________ 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