iOS Share Extension

I love the iOS share extension. However, though I am running the current version of Joplin on both iOS and iPadOS, it is only showing up on my iPhone (iOS) and not on my iPad (iPadOS). I am totally ignorant as to whether this problem is something unique to my iPad or a more general issue. Please advise!

Okay, so I looked and looked on my iPad and the Joplin share extension was not showing up in any app. Now it is. Sorry for the unnecessary post. :face_with_raised_eyebrow:

Hi there, first of all just wanted to say that I’m loving Joplin and think it’s an awesome project. I’ve left Evernote entirely and feel much more in control of my thoughts now that I can control where and how they are stored.

However, I stumbled on this thread because I was a little disappointed with the iOS share feature since it does not scrape the webpage content when sharing from a safari, only the iOS link which isn’t always very useful.

I did however find a great workaround that works very well at scraping the page contents on iOS. The workaround can be found here:

Using this I’m able to scrape the content using the force select all button that is generated using this shortcut, then I select share and choose the Joplin app and bam, the text is copied over.

My only gripe is that the title is not copied over into the note, but I can live without that.

1 Like

For what it’s worth, I have a work around that performs great for me. Unfortunately, It does require a Linux server to implement. I used the Rest_Uploader app on GitHub which monitors a directory for new files. When it detects a new file, it ocr scans the file, tags it with appropriate tags and moves it into selected notebook on Joplin. On safari I just click ‘+’ button and ‘save to Dropbox’ which is configured to save to a Dropbox directory that Rest_Uploader is monitoring. Shortly thereafter the file shows up with title and tags in my notebook and can be fully searched with full text due to the OCR.

I implemented a similar thing for email to Joplin which was critical to me when moving from Evernote. I just set up a dedicated gmail address that can be accessed by the Joplin-mail-gateway found on git. Whenever I send email to this address, Joplin gateway downloads it via pop3 and sends to Joplin. You can even use Evernote nomenclature for @ notebooks and # for tagging. That’s the great thing about open source is that you can usually find someone who has solved the issue although it’s a bit more work. I think this current setup is better than my previous Evernote though.

2 Likes

Thanks @djangelic !
This trick has worked very well for me.
I tried to optimize it today and built my own ios shortcut.

I'm not sure if sharing it will work:
(updated)
https://www.icloud.com/shortcuts/6beb8ee54b9b4e64a28932b54a2cb6b4

But basically I use the actions "get article", "create markdown from article" and "share as text" (then manually select Joplin as destination).
This gets web page content into Joplin as rich text very quickly.

Since the "Title" is still missing, I used the action "Get details from article" to copy the title to a variable and then to the clipboard.
This way you can manually paste the title as a new note title.

Surely this can be optimized even further :slight_smile:

3 Likes

Wow!! This is great! I'll have to test it out!

I have simplified the shortcut even further.
But it is not yet working on all web pages, I am trying to find out why in exceptional cases, sometimes only empty text ends up in Joplin.
https://www.icloud.com/shortcuts/6beb8ee54b9b4e64a28932b54a2cb6b4

3 Likes

Thanks it’s great !

1 Like

I just tested it and it worked great! Very impressed! This is pretty much exactly what I need. The capture process took a few seconds but I'm sure that can't be helped. Still faster than me trying to copy and paste it myself.

1 Like

I have further optimized the shortcut. The deluxe version now extracts metadata like title, author, date as well as the article image and puts it back together in a form that looks good in Joplin. Besides the article title, the date is now also copied to the clipboard and can be manually pasted as title in the note.

The article is also now automatically retrieved in "Safari Reader" mode. This gives you a clean document, without ads or anything like that.

With some websites, the retrieval via "Safari Reader" does not work (for example with spiegel.de, an important German news website). For this, I have built in a query that checks whether the retrieval worked, if not, the content of the page is copied completely, in raw mode, so to speak, without formatting in the "Reader View".

The article picture is encoded as base64, because the Joplin app currently only accepts text and no files. So the image can be stored permanently in the note and not only linked.

This shortcut already works very well for me as a some kind of web clipper, but it can certainly be further optimized and adapted.

https://www.icloud.com/shortcuts/3ef4f7b15274407dbfcddc2e672514b7 (Preview)

3 Likes

I want to get away from Evernote and Joplin looks very intriguing.
Thank you for the great work all of you are doing.
For regular Note-Taking across different OSs it seems like the ideal fit.

One other major use case for me though is evernote‘s integration
with iOS/iPadOS shortcuts app.
I use this to share from safari my current text selections to store it as a citation including an optional comment and the url. An extended bookmark management so to say.

Shortcut takes in the safari webpage‘s data (including the current selection) and allows to create new notes or append the current data to existing notes. The latter is really important as I collect bookmarks for different subjects.

Short version of my wish: Joblin on mobile should expose not only a Share Extension but as well some „Intents Extensions“ (thats the iOS wording for it) for better integration into apples shortcuts. This would allow for creating notes in the background, finding notes based on filter criteria and adding text (markup/richtext/html) to existing/found notes. Before evernote rel 10.x this worked with evernote very well and I do have a current implementation running with bear (but this works for iOS/MacOS only).

Itents/Actions are also available on Android (see e.g. Interacting with Other Apps  |  Android Developers) but that would have to done by someone else.

I did some development on iOS with Swift, SwiftUI and core data lately including adding two simple Intents Extensions to my own app and I‘d love to contribute here with my limited knowledge but have never collaborated on an OS project.

Hence my questions is whether @duncanc4 could support me in getting into the projects iOS part and whether the maintainers (e.g. @laurent) would be willing to accept such change/PR?

I assume that as indicated by @duncanc4 that to do it properly the iOS project would needed to be reconfigured to allow for a shared container in which the database resides being available to both the app and the extension. I would like to avoid the extension to have to call/launch the main app (as is currently done by the Sharing Extension as I understand. This sharing would also respect the main concept of putting intents into extension to have them launch quickly without too much of the apps heavy lifting (including UI etc.).

Would love to get your take in this before I get into it.

1 Like

The iOS part of the project is entirely in React-Native. Outside the share extension I created, there isn't really any other native code, so I'm not for sure what support I could provide.

I think for your purposed feature, the main issue would be migrating the database to a shared container and then how to interact with the database from your intent extension. Since the main app is using the database in React-Native, I think you would either have to write native code to interact with the database, or use React-Native in the extension. It would be possible to use Reactive-Native in the extension, but I don't know if there are performance issues. I guess there is also the issue of how to sync the changes after you update the database. I'd assume you don't want to have to launch the app for the changes to be picked up and synced.

1 Like

Thank you for your input which raises some interesting questions that
I‘d need to wrap my head around before continuing… and I‘ll check what infos I might require for a successful build of the mobile app…

A couple of thoughts though based on @duncanc4 `s input:

  • Alternatively to the Intents Extension there could still be the option to offer the x-callback-url which could be implemented by the main RN application (and some info.plist entries). This mechanism is still used/offered by several app but the issue with that is that the User Experience bounces back and forth between shortcuts, the app being called (by x-callback-url) and the shortcuts being „called back“ based on the x-success-URL… also it requires the full app to load - but with respect to the backend/cloud synching this seems like a benefit.

  • It would be really nice if the mobile app could also initialize and start up the ClipperServer which is available on the desktop app so any code for the URL integration could then be backed by the Data API. @laurent, any technical reason why the ClipperServer could/should be started on mobile?

  • Assuming that the Intents Extension could work on the slqlite db natively it would be ok to sync (to the cloud) the next time the app is used. Here’s why: Joplin prides itself to be „mobile first“ with a sync option and a sync interval of 5 Min and longer - so no realtime anyways. And I‘d also assume that the local use of the app would follow a shortcut access anyways to review and edit the notes anyways.

  • With respect for the local sync though - reloading the DB changes in the main app after and update by the Intents Extension I understand that apple for core data has introduced „Persistent History Tracking“ which allows for the app context to catch up on the changes performed on the database outside the apps thread. I might take a look into the mechanisms that Joplin uses when the databased gets changed by the ClipperServer.

  • Launching the ClipperServer in the Intents Extension would be another way to re-use the Data API at this point. I needed to understand thought the option on how to launch an adäquat javascript environment in the extension

Your thoughts welcome…

Thanks for making this, it looks like exactly what I need! :+1:t3:

I am tearing my hair out finding an alternative to Evernote. I have downloaded all of my notebooks as ENEX files. Joplin seems to import them well, but the iOS app Share extension from Safari only opens Joplin, it doesn't save the webpage. Is this something that is coming soon or do I need to look elsewhere? Thanks much!

Well, it does save the URL as plain text in the body of the note (which you have to give a title manually afterwards).

IMHO Evernote's mobile web clipping capabilities give this app a great advantage over competitors such as OneNote or Joplin. I've deleted my Evernote account some time ago (and haven't looked back once since then;-), but Joplin should really catch up in terms of mobile UX.

I also noticed that with the newest iOS update the iOS share function no longer works. Would be great if this could be fixed asap!

Is there a GitHub issue about it? And if not could you create one please?

done!

1 Like