Posted on 03-29-2016 07:20 PM
I've begun testing a number of things I've been working on this year for deployment on our image next year. This includes an OS X application which I created which simply runs a shell script to mount the logged in user's network home folder on the Desktop.
I used Appify to create the app, however when I try and launch it via Spotlight it does not appear under Applications even though the app is in the Applications folder. I assume my method of creating the app is what's preventing it from being visible & indexed by Spotlight ...
Does anyone know what the requirement(s) are for Spotlight to index an application so I can add this to piece to the app I've already built so Spotlight can see it and index it?
OS X 10.11.4, almost a complete base OS not including my app/script, and the Spotlight Applications checkbox is checked.
Thanks in advance!
Solved! Go to Solution.
Posted on 04-02-2016 10:33 AM
Added an Info.plist file to the Contents directory in the app with some basic info I gathered from other Info.plist files from installed apps and Spotlight seems to index it and have it appear when searching.
This was ultimately what I used in the Info.plist file if it's helpful to anyone.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>Panther</string>
<key>CFBundleExecutable</key>
<string>Panther</string>
<key>CFBundleName</key>
<string>Panther</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSHasLocalizedDisplayName</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
Posted on 04-02-2016 02:04 PM
You could also look at Platypus to create your app going forward, as it always includes a full Info.plist file. It also has a full GUI that lets you set everything about the application, and several default window and application styles you can choose from when creating the app. So its pretty flexible.
Anything I've ever created using it becomes Spotlight indexable, so there's no issues there.
Posted on 04-02-2016 10:33 AM
Added an Info.plist file to the Contents directory in the app with some basic info I gathered from other Info.plist files from installed apps and Spotlight seems to index it and have it appear when searching.
This was ultimately what I used in the Info.plist file if it's helpful to anyone.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>Panther</string>
<key>CFBundleExecutable</key>
<string>Panther</string>
<key>CFBundleName</key>
<string>Panther</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSHasLocalizedDisplayName</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
Posted on 04-02-2016 02:04 PM
You could also look at Platypus to create your app going forward, as it always includes a full Info.plist file. It also has a full GUI that lets you set everything about the application, and several default window and application styles you can choose from when creating the app. So its pretty flexible.
Anything I've ever created using it becomes Spotlight indexable, so there's no issues there.
Posted on 04-03-2016 01:14 AM
FWIW, AppleScript Apps also have the info.plist.
If Appify is missing the info.plist, I'd suggest logging a bug/issue with them to correct that.
Posted on 04-03-2016 01:06 PM
Thanks for suggesting Platypus @mm2270 it looks a lot closer to what I'm looking for. Good to know for future stuff!
@bentoms my understanding of the Appify python script is to make as thin of an app as possible, so it literally just creates the app wrapper with a Contents folder and an executable for the script. So in this case I don't think a bug report would be appropriate. But thanks for the suggestion.
I originally went with your AppleScript app method for our network mount script this past year, but since our machines are bound to AD, I found a script that @davidacland made (which I modified slightly) which rather than querying AD group membership to determine the network folder to mount does this via the dscl
command and instead of mounting the root network folder mounts the user's home folder.