Writing files to SMB or other remote shares

I’ve set up a simple test of writing a file to a location using a file bookmark. This works if I’m writing to local iOS storage, but always fails with “Failed writing to disk” even though I’m able to write to the bookmark location using the Files app. I’ve tried SMB, iCloud and Google Drive destinations, but the result is always failure. I’ve tried creating the file bookmark both in the Shortcuts app and within the Scriptable app.

Can anyone confirm they’re able to write (using FileManger.write() or FileManager.writeString()) to any remote location using current versions of iOS? I’m presently on 15.6

Yes, I’ve used SMB to sync Scriptable scripts between iOS and my PC but I’ve given up. Sometimes I also got your error without any apparent reason and other times it just didn’t sync. Because of this I’ve switched to a simple and local websever that only serves the files in a specific folder and accepts uploads to that folder. I’m using the Python package uploadserver as the websever if I’m not mistaken (I’m currently not at home, so can’t check).

Thanks for the response. I’m thinking I’m going to have to write a proper native app if I want to do this reliably (or at all). I’ve wanted an excuse to try my hand at native coding anyway. Still, it would’ve been a big time-saver if I’d been able to use Scriptable for this.