20. February 2021 · Categories: Software

I recently had the problem to easily share files generated by Pythonista on iOS. The easiest way is to show the share sheet with the file afterwards, and this turns out to be trivial, once I figured out the logic.

The trick is that files can be shared as URLs, you just need to convert them first to an absolute path, and then to an URI so that the API understands them properly. Much more comfortable than searching for the generated file and then invoking the share sheet manually.