This article was first published on Sia Blog - Medium
A few days ago I had an idea. What if I could have my home server automatically download my photo library from iCloud and sync the changes to Sia using the recently-released SiaSync tool? And what if I could access and browse these files on other devices, like my iPhone or iPad?
First, though, I would need a way to upload and download Sia files from iOS. Although there is a third-party mobile app available for Sia, it is exclusive to Android and requires running a full node on the device. Was there a better way?
I contacted Nebulous core developer Luke Champine to find out. As it turned out, he too was interested in writing mobile apps for Sia using his us project! We quickly began putting together a simple app, with Luke handling the Sia-specific code and us bindings, and myself handling the UI/UX. (We also collaborated on this blog post.) By the end of the weekend, we were giddy with excitement, because we had succeeded in uploading and downloading a file, talking directly to Sia hosts from a real iPhone, without a full node. See for yourself:
So, what’s happening behind the scenes here? What’s up with the QR code, and what is a “Shard Server?” And why does it take so long to upload a tiny image? Read on to learn the answers. If you want to jump straight into the code, though, you can find the GitHub repo for the app here: https://github.com/DangerCZ/SiaUs-iOS
How it Works
We begin by scanning a QR code that contains a Sia file contract. We do not form the contract on the device itself; at least for now, we need to get our contracts from an external source. Check out the us-bindings repository for details on how ...
To keep reading, please go to the original article at:
Sia Blog - Medium