raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.24k stars 2.94k forks source link

[Yoink] Setapp Support #13241

Closed JhonnyAxe closed 2 months ago

JhonnyAxe commented 2 months ago

Extension

https://www.raycast.com/koinzhang/yoink

Raycast Version

1.77.3

macOS Version

14.5

Description

Hello, could you make the support of the application when Yoink is installed via Setapp?

Steps To Reproduce

  1. Open the app

Current Behaviour

CleanShot 30 06 2024 at 07 03 40@2x

Expected Behaviour

No response

raycastbot commented 2 months ago

Thank you for opening this issue!

🔔 @koinzhang you might want to have a look.

💡 Author and Contributors commands The author and contributors of `koinzhang/yoink` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopens the issue. - `@raycastbot assign me` Assigns yourself to the issue. - `@raycastbot good first issue` Adds the "Good first issue" label to the issue. - `@raycastbot keep this issue open` Make sure the issue won't go stale and will be kept open by the bot.
koinzhang commented 2 months ago

Hi @JhonnyAxe . Thanks for the feedback, I've submitted a PR https://github.com/raycast/extensions/pull/13393 to fix this issue. But I don't have SetApp, so I haven't tested it (I'm relying on my previous experience fixing this issue), can you test it if it's convenient? Here's the updated code, which you can run locally using the Import Extension command. yoink.zip

JhonnyAxe commented 2 months ago

Hi @JhonnyAxe . Thanks for the feedback, I've submitted a PR #13393 to fix this issue. But I don't have SetApp, so I haven't tested it (I'm relying on my previous experience fixing this issue), can you test it if it's convenient? Here's the updated code, which you can run locally using the Import Extension command. yoink.zip

CleanShot 10 07 2024 at 08 32 11@2x

koinzhang commented 2 months ago

https://developers.raycast.com/basics/create-your-first-extension#build-the-extension

Open your terminal, navigate to your extension directory and run npm install && npm run dev.

Hi @JhonnyAxe, you should build the extension first

JhonnyAxe commented 2 months ago

https://developers.raycast.com/basics/create-your-first-extension#build-the-extension

Open your terminal, navigate to your extension directory and run npm install && npm run dev.

Hi @JhonnyAxe, you should build the extension first

As you can see it just opens the selected files:

CleanShot 10 07 2024 at 09 33 00

koinzhang commented 2 months ago

Let me explain the reason for this phenomenon. Currently, when adding a file, it uses the bundleId to locate the Yoink app, but it seems that the SetApp version of Yoink has a different bundleId than the AppStore version, so it can't find the Yoink app and opens it using the default app!

The bundleId I'm currently using is at.EternalStorms.Yoink, can you take a look at the SetApp version of Yoink to see what the bundleId is?

The solution I've come up with so far is to locate the Yoink app based on the app path, which should solve the problem!

koinzhang commented 2 months ago

mdls /Applications/Setapp/Yoink.app | grep kMDItemCFBundleIdentifier Enter this command in the terminal to see Yoink's bundleId

JhonnyAxe commented 2 months ago

mdls /Applications/Setapp/Yoink.app | grep kMDItemCFBundleIdentifier Enter this command in the terminal to see Yoink's bundleId

kMDItemCFBundleIdentifier = "at.EternalStorms.Yoink-setapp"

koinzhang commented 2 months ago

yoink.zip Yoink did change the bundleId. I've now updated the code to locate Yoink apps directly by app name, no longer based on bundleId, please go ahead and test it.

JhonnyAxe commented 2 months ago

yoink.zip Yoink did change the bundleId. I've now updated the code to locate Yoink apps directly by app name, no longer based on bundleId, please go ahead and test it.

Yes, it works! Will you push the update now?

CleanShot 10 07 2024 at 10 01 16

koinzhang commented 2 months ago

I've submitted the PR #13393, but it takes about 5-10 business days for the PR to merge in, until then you can use the local extension

image
koinzhang commented 2 months ago

Hi @JhonnyAxe The extension has been update, so I will close this issue. If you have any other issues, feel free to give me feedback.

@raycastbot close this issue