UserDefaults are great. I use them for saving urls (and related data, stored in a Dictionary) from Safari into my app through an AppExtension.
UserDefaults is a lot more powerful than what it first might seem like. Not only can it store more complex values (like dates & dictionaries) and parse command line arguments - it also enables easy sharing of settings & lightweight data between apps in the same App Group 👍