Posts

Post not yet marked as solved
2 Replies
Looks like I get to answer my own questions...Answer to question 1:The missing entry in the Info.plist to solve the "cannot open files of this type" error message is the CFBundleTypeOSTypes entry. I had the others, but not this one. Here's a modified version of my Info.plist with context: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeExtensions</key> <array> <string>*</string> </array> <key>CFBundleTypeMIMETypes</key> <array/> <key>CFBundleTypeName</key> <string>your_specific_name_here</string> <key>CFBundleTypeOSTypes</key> <array> <string>****</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSHandlerRank</key> <string>Owner</string> <key>LSItemContentTypes</key> <array> <string>your.pkg.name.here</string> </array> </dict> </array>Answer to questions 2 & 3:Adding the following handler allowed me to get the file that was being sent via "Open with".on application_openFiles_(sender, droppedItem)--- droppedItem contains the path to the fileend application_openFiles_I stumbled across a really old reference to it and decided to give it a try. It worked! It would have been nice if Apple's documentation had something for application_openFiles_. I would have expected to possibly see it here along with other methods the AppleScript App template inserts by default:https://developer.apple.com/documentation/appkit/nsapplicationdelegate?language=objcIf there's a more recent handler I should be using instead, please provide.