On Sep 25, 2009, at 02:25:30, Mike Abdullah wrote:

I would read up on UTIs. Get the type of each file and see if it conforms to what you require.

I have what I hope is a reasonably informative post here:
http://www.mikeabdullah.net/utis_diagram/

Note how there is a com.apple.plugin type. If you're using a custom format for your plug-ins (and you should), make your app declare a com.foo.app.plugin type for them, which conforms to com.apple.plugin.

On Sep 25, 2009, at 08:12:41, Jens Alfke wrote:

Yup, as long as you declare the extension properly in your Info.plist and indicate that it's a bundle.


I confess, that after reading the docs, I'm not at all sure I'm doing things right. Here's what I've got (for my app called "Foo"):

    <key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeDescription</key>
            <string>Foo PlugIn</string>
            <key>UTTypeConformsTo</key>
            <array>
                <string>com.apple.plugin</string>
            </array>
            <key>UTTypeIdentifier</key>
            <string>com.latencyzero.foo.plugin</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>public.filename-extension</key>
                <string>fooplugin</string>
            </dict>
        </dict>
    </array>

    <key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeExtensions</key>
            <array>
                <string>.fooplugin</string>
            </array>
            <key>CFBundleTypeName</key>
            <string>PlugIn</string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>com.latencyzero.foo.plugin</string>
            </array>
            <key>LSTypeIsPackage</key>
            <false/>
            <key>NSPersistentStoreTypeKey</key>
            <string>XML</string>
        </dict>


The CFBundleDocumentTypes was created using the Target->Properties- >Document Types editor.

Questions:

1) Do I need to put the UTI in my plugin's Info.plist, or just the app's, or both?
2) Is there a MIME type for my plugin? OSType? Class?
3) If I don't specify an icon, will it get the default plugin icon?
4) How do I indicate that the type is a bundle (Jens)?
5) Do I need to import UTIs anywhere?

On Sep 25, 2009, at 08:52:40, Sean McBride wrote:

Of course that requires that your Info.plist be present for Launch
Services to consult.  So while you should absolutely do as Jens says,
you should additionally set the bundle bit for packages you create. See
'man SetFile'.  SetFile -a B /path/to/package.

I guess this would this be part of a script run after the plugin build?

Thanks!

--
Rick


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to