For example, could I create an iOS application where users can upload videos by pinning to IPFS, and, when other users watch the videos, it caches the video on their IPFS node for others to access?
Yes you can, maybe checkout GitHub - ipfs-shipyard/gomobile-ipfs: IPFS and libp2p on Mobile, with Gomobile else just importing
go-ipfs following go-ipfs/docs/examples/go-ipfs-as-a-library at master · ipfs/go-ipfs · GitHub and compiling with
gomobile works mostly fine.
You would need to have other pinning nodes tho, like pinata, some you manually host, …
Thank you! Could you briefly explain why I would need other (manual) pinning nodes? Would mobile applications be unable to request other mobile applications for their cached/pinned content?
Yes but you would need the IPFS node to run continuously to do that.
This is not possible on iOS the system will kicks you out.
And just eats all the battery on android anyway.
You would also need to write a system to update your IPs or relays when the user change from Wifi to LTE and from a celltower to an other.
It’s just not pratical or not a good idea in practice.