Hi Quinn,
Thanks for the detailed response. I've done a bit of testing with the related files mechanism and can confirm that when I expose a "rehex-foo" and "rehex-meta" file type, I am able to write a foo.rehex-meta file when writing a foo.rehex-foo file using NSFileCoordinator, however I have not been able to get it to work in any other cases - even foo.rehex-foo.rehex-meta is not allowed when writing a foo.rehex-foo file.
The NSFileCoordinator.coordinateWritingItemAtURL() method invokes my callback even in the cases that won't work, with the original path which it still doesn't allow access to.
For reference, here are the relevant sections of the Info.plist I tested with:
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>net.solemnwarning.rehex-meta</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.json</string>
</array>
<key>UTTypeDescription</key>
<string>Metadata of a file opened in REHex</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>rehex-meta</string>
</array>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>net.solemnwarning.rehex-foo</string>
<key>UTTypeDescription</key>
<string>Test file</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>rehex-foo</string>
</array>
</dict>
</dict>
</array>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>LSItemContentTypes</key>
<array>
<string>net.solemnwarning.rehex-foo</string>
</array>
</dict>
<dict>
<key>NSIsRelatedItemType</key>
<true/>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>net.solemnwarning.rehex-meta</string>
</array>
</dict>
</array>
Topic:
App & System Services
SubTopic:
Core OS
Tags: