Since there doesn't yet appear to be any good way to share a UI script and its corresponding .pyui file, I decided to write this small utility: https://github.com/Pythonista-Tools/Pythonista-Tools/blob/master/UI/PackUI.py
Basically it takes both a .py and .pyui file and packages them into a single script, which, when run, will extract both files again.
Originally I planned to make the resulting script be the original program with the .pyui file and an extraction process added, though in the end I decided against it to avoid potential incompatibilities and to allow editing of the .pyui file. It would probably be possible to implement this, so if anyone wants to, feel free to use all of or parts of my code.