w0lfschild / Flashlight

:mag_right: Enhance Spotlight with plugins on macOS
https://www.macenhance.com/flashlight
Other
1.13k stars 56 forks source link

Update for Catalina #65

Closed sandrophoto closed 4 years ago

sandrophoto commented 4 years ago

Hello, sadly this stopped to work after Catalina install :( Is it planned to update Flashlight for Catalina ? I hope so.

Thank you sooo much for this.

w0lfschild commented 4 years ago

Yeah I looked into it a bit. Didn't see any easy fix but I could be misguided.

If someone else manages to fix it I'll gladly merge a PR and push out an update though.

Since this project seems to still be fairly popular I'll throw a $25 bounty on this issue.

xyjigsaw commented 4 years ago

I wanna try it. Wound mind teach me how to import this to Xcode?

w0lfschild commented 4 years ago

@xyjigsaw

I'm afraid that if you don't know how to download and open a project in Xcode it might be a lost cause to bother trying. Regardless here's how to open the project.

On the repo main page click clone or download and download a zip of the project. Then open up Flashlight.xcworkspace

The plugin scheme is called SpotlightSIMBL.

WilixLead commented 4 years ago

It requires any changes in SDK usage or in permission requests or it just related to recompile to latest kernel version? PS: Flashlight still require disabling SIP ?

w0lfschild commented 4 years ago

@WilixLead

Erm wouldn't say it's exactly SDK usage. More like changes have been made to Spotlight that break compatibility. So most likely either class names or implementation of something has changed. This would require some level of reverse engineering and or knowledge of Objective-c

Here's the headers of the latest version of Spotlight: https://github.com/w0lfschild/macOS_headers/tree/master/macOS/CoreServices/Spotlight/2075.4

Yes Flashlight does require SIP be disabled.

I've also posted this bounty on reddit and bumped the reward to $25: https://www.reddit.com/r/TweakBounty/comments/dze7xw/1501015macos_icon_theming/ https://www.reddit.com/r/OSXTweaks/comments/dxcv9j/tweak_bounty/

WilixLead commented 4 years ago

I start research this problem. So I found this line osascript -e 'tell application \"Spotlight\" to inject SIMBL into Snow Leopard' This command return code -2740 in my system. As I understand we need inject SIMBL bundle to Spotlight process but now in throws error. I don't find any other places in Flashlight where this bundle can be loaded. I think we need fix this AppleScript for success injecting.

I am not an macOS or Objective-C developer and don't know AppleScript :) @w0lfschild this problem can be related for old headers for SIMBL subproject? (if yes, I try update headers. But currently, all project builds fine)

PS: Code try to find path /Library/Application Support/SIMBL/Plugins/SpotlightSIMBL.bundle and I don't have this one in my mac, but I think it should be created after SIMBL injecting

w0lfschild commented 4 years ago

@WilixLead

The issue is not loading the bundle. You can use MacForge for that.

WilixLead commented 4 years ago

@WilixLead

The issue is not loading the bundle. You can use MacForge for that.

Has any way for load this bundle without MacForge? For make Flashlight independent from MacForge

w0lfschild commented 4 years ago

@WilixLead

Flashlight has always required a loader. Also as I said above that doesn't have anything to do with it not working on Catalina.

WilixLead commented 4 years ago

@w0lfschild Yea... I already got it. May be you can say few words about how I can connect to injected bundle for debugging? :)

PS: I already inject Flashlight and Spotlight now crush. I try attach debugger to Spotlight after injecting bundle and Spotlight always throws ACCESS error exception. So I just see ASM code.

w0lfschild commented 4 years ago

Resolved in : https://github.com/w0lfschild/Flashlight/pull/66

Update will be out soon.