Hook+Bear+OmniFocus

The situation:

I use Bear for note-taking/idea capture and OmniFocus for task management on both MacOS and iOS. I often find it helpful to put a link to a Bear note in the task so I can refer to it. Pretty standard.

Of course, on MacOS Hook has made this way easier. However, the Hook-generated links don’t work on iOS.

Can I get Hook to generate a link that will work on both MacOS and iOS so I only have to link note to task once?

1 Like

Thanks for asking, Quinn.

When you Copy as Link in OmniFocus, Hook already creates links with the omnifocus:// scheme. Similarly for many apps.

Coincidentally, we are currently in the process of updating Hook to ensure that the scheme of the links it creates is always the apps own scheme. Links to nvalt, bear, evernote, drafts5 , ulysses and x-fantastical2 will have their respective schemes. Basically, as long as the app provides a scheme that it adheres to (i.e., registers and serves), that is what Hook will do.

This will change will be introduced soon, prior to Hook exiting Public Beta. We will provide more information in the release notes and online.

Sorry, I’m not being clear.

When I use “Copy as Link” to copy a link to a Bear note, it creates a link like “hook://bear/51636084-607A-4CAF-A9AF-66020BCF9F55-7538-00004811B5BC8E9E”.

I then paste the link into an OmniFocus task note. The link works great on MacOS, but doesn’t work on iOS.

Whereas, when I use “Copy as Link” in Brave or Safari, say, the link works fine on both MacOS and iOS.

And when I use Bear’s own “Copy Link to Note” command, the link I paste into the OmniFocus task note field works on both MacOS and iOS.

Am I doing something incorrectly, or is there a reason that the Hook-generated link to the Bear note doesn’t work on iOS?

Thanks!

Okay, so it looks like, for whatever reason, the link that gets pasted isn’t 100% consistent in its format:

Sometimes it’s a working link with a title, sometimes it’s a raw Hook link, and other times it’s a working link titled “title-callback”.

You’re asking about this at a good time because we’re just in the middle of an update for Hook which will fix this.

We’re changing Hook to use links like bear://x-callback-url/open-note?id=IDENTIFIER, which should work with both iOS and macOS, instead of hook://bear/IDENTIFIER

The update should be ready soon.

3 Likes

Any word on this particular update? I just tried it again, copying a link to a Bear note with Hook and pasting the link into OmniFocus. The URL is still of the “hook://bear/…” variety.

That was released in June. What version are you using? (Beta versions of Hook should have expired by now.)

Here’s what I get with Copy as Markdown Link from a Bear note created using “Link to New” from this page:

[Hook+Bear+OmniFocus - Discussion & Help - Hook Productivity Forum](bear://x-callback-url/open-note?id=A1F30069-8BDE-49A6-ABCF-D463D7A97395-3390-000027E1A95F015A) .

Could you please try the command on a new Bear note? I’m wondering whether if in some cases when used on an old note it might return the old format. I highly doubt it, but just to check. We put temporary code in during the beta period that updated the Hook database to ensure all prior links conformed to the new format.

I’m using Hook 2552.

PastedGraphic-1.png

With a brand new note, using the “Copy as LInk” command produces "hook://bear/3E8A2B9D-9AF1-441B-ACA4-2316F480ED2B-17808-000038E08DFA773B”

Using “Copy as Markdown Link” produces "New Bear Note

I’ve tried it with several different notes, both old and new and still get the same result.

I am on v1.1 (2581), the latest version on offer using Check for Updates. Invoking Hook while a Bear note is selected, then pressing ⌘C, results in:

bear://x-callback-url/open-note?id=B48B84A3-49C4-4EDF-A226-736E3CBDEFA2-64778-00003FA4D3B187A9

copy as Markdown note:

[#Annals of the Former World](bear://x-callback-url/open-note?id=B48B84A3-49C4-4EDF-A226-736E3CBDEFA2-64778-00003FA4D3B187A9

Perhaps you need to have Hook refresh your scripts?

could you please make sure that you have not overridden the Bear script in Hook > Preferences > Scripts pane. Overridden scripts have a * in left pane. You can remove the override by clicking the - button on bottom left when the script is selected.

Also that you are using the latest Hook integration scripts (version 65).

Ah. Indeed, clearing the asterisk with the – button did indeed solve the issue.

Not sure how the scripts came to be modified as I don’t recall messing around with them, but I have been known to mess around with things and I have been known to forget about it …

I also installed the latest update as well.

Thanks, guys!

1 Like

Maybe you edited the script then put it back again, but even though the script was now the same as the default it had marked not to override it.