It looks like App.get(appName).icon() only works if the app is already opened.
I'm trying to build a custom minimal spotlight-like thing for opening apps on top of input modals, and I'd like to be able to show the icon of the app that will be opened with the current search query, but problem is getting this icon seems pretty complicated, because:
Phoenix's native API only works for opened apps.
Anything I can find online tells me to do like defaults read 'Contents/Info.plist' CFBundleIconFile, which will tell me the name of the .icns file in the Resources folder, but that doesn't seem to actually work for every single app, some of them, like /System/Applications/Calendar.app, has an Assets.car thing which presumably contains the icon. And this car format seems not publicly documented.
Presumably on Phoenix's end there are APIs available to figure this out and solve the problem for user's configurations.
If so, I'd propose supporting something like this: App.get('/System/Applications/Calendar.app').icon(), to retrieve the icon for any app, which would be pretty handy.
It looks like
App.get(appName).icon()
only works if the app is already opened.I'm trying to build a custom minimal spotlight-like thing for opening apps on top of input modals, and I'd like to be able to show the icon of the app that will be opened with the current search query, but problem is getting this icon seems pretty complicated, because:
defaults read 'Contents/Info.plist' CFBundleIconFile
, which will tell me the name of the.icns
file in theResources
folder, but that doesn't seem to actually work for every single app, some of them, like/System/Applications/Calendar.app
, has anAssets.car
thing which presumably contains the icon. And thiscar
format seems not publicly documented.Presumably on Phoenix's end there are APIs available to figure this out and solve the problem for user's configurations.
If so, I'd propose supporting something like this:
App.get('/System/Applications/Calendar.app').icon()
, to retrieve the icon for any app, which would be pretty handy.