How would one achieve nsuserdefaults/shared preferences?
We have not exposed that to JS yet. But we have a ticket on it.
Here is a start on how you could solve that in Uno, to expose it to JS:
I created a pull request on that repo too, to support Android setSetting.
Thanks to @LeviOlson and @Baggers this is now updated to Foreign Code, and works for Android, iOS and local (just inmemory local, please add issue if anyone needs persistent storage for this on local)