Possible way to sync IOS to External Vault?

Disclaimer: I am new to obsidian and I do not know if this will work; it’s more of a brainstorming idea that may have already been brought up. I currently have an external vault stored in an SMB share on a NAS. I am aware of a couple of ways you can sync an iOS device to an external vault (Obsidian sync, syncthing and mobius, git, and more), but I am curious if this method would work. I have not yet tested it, and I would like to know if anyone sees any flaws with the idea. Another note is that I do not need to access the same vault on multiple devices at the same time, just one device at a time.

My idea is: would it be possible to make an Apple shortcut work so that whenever you open the Obsidian app, the shortcut goes to the SMB Share location and moves that folder to the Obsidian directory stored on the device? In this instance, I was thinking of moving the entire folder instead of copying, as I do not want to create duplicates. Now that the folder is moved to the Obsidian folder, you should be able to create/delete/edit as you would like. Then, you would create another shortcut so that when the Obsidian app is closed, it moves the files from the Obsidian directory on your phone back to the SMB share. If this does work, then theoretically, this would work using Google Drive.

Again, this is just an idea; I am sure there is some flaw with it somewhere.

This is not an iOS-centric answer, more of a generic response to your suggested procedure. And the main issue is related to What is essentially a move of a folder?

As long as you’re not using the same physical storage device and within the same file system, then a move becomes a copy and delete operation. In other word you want to copy and delete your entire vault for each you time you access it on the other device. I’d consider the risk of doing that reliably versus having a proper synchronisation tool to be very high. It’s just too likely that one some point either the copy and/or delete operation might have a little flaw, and you start loosing data.

With a sync tool, you’ll also have a copy of your vault on another device, in case of device breakdown, and even though it happens you’ll experience sync conflicts rather seldom.

I’ve found that using a sync tool, in addition to being somewhat aware of where and when I use a vault on another device, makes the risk of creating duplicates almost negligible. And if it happens, the proper tool would suggest either to merge or to handle it manually.

And as said before having a duplicate of your vault reduces the chance of losing/damaging your vault, and I would even suggest that you do maintain some schedule for backing up your vault (and having even more “duplicates”) as it’s most likely that you’ve invested quite a lot of time and effort in building it, and you don’t want to lose it.