obsidian-vimrc-support icon indicating copy to clipboard operation
obsidian-vimrc-support copied to clipboard

Mobile compatibility

Open kometenstaub opened this issue 2 years ago • 8 comments

We're working on a new mobile build and we've identified an issue with this plugin on iPadOS. Since there are no imports that rely on node or electron, I just set isDesktopOnly to false to use this plugin on mobile with a bluetooth keyboard.

iPadOS shows a native notice when something gets inserted from another app (at least sometimes). Here, the plugin uses the clipboard and seems to trigger this notice on these three events. It says Obsidian pasted from <Safari/Mail/whatever the last app was where text got copied>.

Apart from that, all the functionality seems to work fine.

kometenstaub avatar Jan 10 '22 15:01 kometenstaub

Does the same notice appear when pasting content in Obsidian the regular way (Ctrl+V after something was copied)? Should I just limit the clipboard access to happen when the user explicitly asks it (not sure how but I'll see what CM6 or the Vim adapter offer in this regard)? Disable this functionality altogether?

esm7 avatar Jan 10 '22 18:01 esm7

This only seems to happen when it is done by the app (so not when a user pastes from the clipboard explicitly). https://www.howtogeek.com/692572/why-are-iphone-apps-pasting-from-other-apps/

I think copy-pasting with the vim shortcuts to the system clipboard is still something that should be possible on the iPad. Maybe it shouldn‘t keep the buffer on iOS devices and only copy/paste when the user explicitly executes the commands. 🤔

kometenstaub avatar Jan 10 '22 18:01 kometenstaub

That's definitely preferable, the question is how. In theory I should be able to make a new paste command and map it by default to p, will check if that works the way it should.

esm7 avatar Jan 10 '22 19:01 esm7

Just want to add that the notice is shown for this action:

navigator.clipboard.readText()

https://github.com/esm7/obsidian-vimrc-support/blob/9937ecf51b7452345312e11e24731a8a9eb89bd8/main.ts#L445

This is bridged to a native clipboard API read, which is flagged by iOS as "app reads the clipboard without user explicitly requesting a paste = privacy issue".

lishid avatar Jan 10 '22 19:01 lishid

Has there been any progress on this? Looking forward to being able to use this on iPad!

Signynt avatar May 26 '22 06:05 Signynt

@Signynt See #107.

kometenstaub avatar Jul 01 '22 17:07 kometenstaub

Is there any way to work on iPad as a beta test? I changed isDesktopOnly to false manifest.json on my iCloud vault, but when I open the app on my iPad the plugin doesn't seem to be loaded. Navigating to the plugin in settings says This plugin does not support your device. Am I missing anything, any settings I could change, to get it to work? Or will it only work after the update is ready? Thanks for the great plugin!

Alex23rodriguez avatar Aug 01 '22 19:08 Alex23rodriguez

@Alex23rodriguez

I was able to get this working on my iPad by editing the manifest.json as you mentioned, but I use Obsidian Sync, not iCloud. In order to get it to work fully, I had to mv .obsidian.vimrc obsidian.vimrc, since it didn't seem to sync that file if the name starts with ..

b0o avatar Aug 23 '22 21:08 b0o

Hey, I'm just curious as the talk of mobile is often iPad-focused here: Am I supposed to be able to run this on Android or is that planned at all? As of now I'd really like to be able to run this on my Android-Tablet with a Keyboard attached, but it appears not to be compatible.

Thanks for the good work :)

hpr1999 avatar Oct 18 '22 09:10 hpr1999

Please note that this was merged and supported in the latest version.

esm7 avatar Nov 24 '22 15:11 esm7