First post on the Apple Dev forum, so not sure to be at the right place..
Original question was on StackOverFlow (http://stackoverflow.com/questions/38458237/how-to-declare-association-with-hidden-dot-files-from-the-info-plist) but as no answer I take my chance here.
I'm trying to associate some Eclipse specific project files with my application:
- .project
- .cproject
Hence I've put both extensions declaration into the application's Info.plist :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<string>MyAPP.icns</string>
<key>CFBundleTypeName</key>
<string>My App Files</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>my.app.ext.project</string>
<string>my.app.ext.cproject</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Eclipse Project file</string>
<key>UTTypeIdentifier</key>
<string>my.app.ext.project</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>project</string>
<key>public.mime-type</key>
<string>text/plain</string>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Eclipse C-Project file</string>
<key>UTTypeIdentifier</key>
<string>my.app.ext.cproject</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>cproject</string>
<key>public.mime-type</key>
<string>text/plain</string>
</dict>
</dict>
</array>
</dict>
</plist>However this solution works well with XXX.cproject and YYY.project files, but no way with Eclipse files I have to manage. Sounds like OSX, unlike Linux and Windows, doesn't allow association with hidden files.
As my supported file formats are static, is there a possibility to declare association by filename instead of extensions?
By reading types in https://developer.apple.com/library/ios/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html#//apple_ref/doc/uid/TP40009259 I guess that this isn't possible...
Anyway I can't believe that there is no technical approach to associate app with hidden files. So of course any other solutions are welcomed :-)
Hereafter a link to download small snippet app that highlight my problem :