Make Obsidian Sync work in background (on Mobile)

I haven’t seen @Gremlin15 's suggestion from the first post addressed anywhere in this thread:

“Expose an intent/activity, which I could then hook into using Tasker. So I would implement my own cron job with Tasker that would just use the hook.”

I’m struggling with sync on Android, and adding the intent would be so useful to be able to initiate a sync ourselves on a schedule.

Nice. And hilarious. The iPhone is 15 years old and we have to resort to these tricks. SMH

+1. This is super important for me as well. I have a number of Shortcuts I run from both iOS and macOS that write directly to my vault files (Inbox tasks, health tracking, quick journal add, etc). Obviously if files are out of sync, this can lead to data loss, which defeats the purpose. iCloud syncing allows for background sync, but the glacial startup and general slowing of Obsidian on iOS made that solution impossible for mobile. I subscribe to Obsidian’s sync, but as noted elsewhere, that requires the mobile app to be running to work. WHY IS THERE NO BACKGROUND APP REFRESH?, as allowed by iOS frameworks. Even is iOS allows for only “a little data” to to be synced in the background as mentioned above (which points to a 6+ year old stackoverflow thread), that’s 99% of use cases. The other 1% of initial setup and large files, I think is ok to require Obsidian to be active. I think both iOS and hopefully the Obsidian mobile and React developers have more tools to use by now, as soooooo many other apps sync perfectly well on iOS.

I think this is critical not just for my workflow, but for so many mobile users, especially when being charged $8/mo to have a functioning sync!

7 Likes

@ces I “solved” this specific issue for myself by launching Obsidian behind the quick add popup input box, so that it has time to sync by the time I’ve finished writing my task or journal entry.

It might be of help to you?

Details (for Android but it will be similar) here: Quick way to add or append notes without opening Obsidian (Android tutorial) - #6 by AlanG

ezgif-4-4cb450d5a5

2 Likes

Just a +1 from me on needing something better from Obsidian Sync on iOS. Any of these three things would help tremendously:

  1. An indicator I don’t have to swipe to see so I know if/when the app is done syncing and up to date.
  2. A way to manually trigger a sync so I can make sure things are synced up when opening / closing.
  3. Better background app refresh. For me, it would just be my daily note I needed updated in the background.

Hopefully we can see some improvements soon. Thanks!

4 Likes

For 1. see and upvote the feature request [Feature] Make Sync icon always visible which includes a snippet to enable that.

2 Likes

But it doesn’t sync when the app is not active even with Obsidian Sync, that is the issue at hand. The consensus seems to be, we’d love to have Obsidian sync in the background as well.

I believe we are saying the same thing.

+1 for me on this subject. A way to manually trigger a sync from a shortcut action would be tremendously useful!

2 Likes

Has there been any official update on background sync since this post in 2022? Has anything changed?

Background sync would solve a huge pain point for working with Obsidian on mobile (particularly when taking quick notes on something).

This should definitely be implemented!

I’d also love this - only just realised that it doesn’t background sync and that it’s a huge pain, especially as there’s no easy way to see whether synchronisation has completed or is out of date.

The Sync status icon is in the right sidebar. If that’s not convenient enough, there’s a feature request you can upvote and a CSS snippet to make it always visible. [Mobile] Make Sync icon always visible

How do I make the right sidebar visible on the iPhone?

Is there any hope that background sync will be added? That would solve the underlying issue.

Swipe from the right edge, or long-press the 3-dot menu button. Unfortunately there is no visible control.

There is not much hope that background sync will be added, as explained earlier in the thread. Make Obsidian Sync work in background (on Mobile) - #12 by ryanjamurphy

1 Like

Ah, OK, that’s helpful to know at least in terms of background sync.

There is not much hope that background sync will be added, as explained earlier in the thread. Make Obsidian Sync work in background (on Mobile) - #12 by ryanjamurphy

Please, please reconsider this. I’m intimately acquainted with the limitations of iOS background operations. The few seconds and few kb it can sync in the background will be a game changer if it’s implemented, especially for people with executive function disabilities.

Judging from this thread, most of the changes people make are very small: adding a single line to a daily note, or checking something off. But to ensure sync completes, we have to hold the app open for several more seconds and watch the sync indicator until it turns green. Most of the time we spend on the change is waiting for sync. Even with iOS’s limitations, background sync will let us move on to our next task, and these tiny changes will still be synced consistently.

For those of us with ADHD, the lack of background sync means having to divert our full attention to the app for each small change, which comes at a high cost for us. But I’m sure everyone, ADHD or no, would love to have reliable sync for small changes without that extra step.

4 Likes

I’m not familiar with the details, but I think it has to do with what Apple allows apps to do in the background. AFAIK, since Obsidian uses Capacitor to build the mobile app, it would need to use web frameworks/services in the background in order to sync things in the background, and Apple currently disallows those frameworks from running in the background (and offers no way for the user to say “it’s cool I accept the risk/battery drain/whatever”).

It would be cool if Apple was less paternalistic about iOS. Alas.

3 Likes

Crap— of course. I knew Obsidian wasn’t native, but that implication didn’t occur to me. Thanks for the detail. I did a little digging just now, and it looks like there’s a plugin that might provide a way around that. It lets Capacitor apps run OS-native background tasks. Do you know if anyone at Obsidian has tried that?

I hope I’m not coming off as a backseat driver. :joy: Obsidian has been a game-changer for me, and this has been the only major hitch. If we know the Capacitor plugin won’t work, I need to see if I can find another creative solution. I have some ideas, but I don’t want to try something that the experts already know won’t work.

2 Likes

The team’s aware of Background Runner but it doesn’t solve all of the issues, regrettably. Open to other ideas as there’s always a chance we haven’t thought of it!

4 Likes