Sharing UserDefaults between extensions
问题 Creating a Today widget and I am using UserDefaults(suiteName:) to persist some data. In the main application I am using UserDefaults.standard() . This can't be read (or can it?) by the extension which is why I use the suiteName: constructor. Data that user persist to UserDefaults.standard() in the main app needs to be available in the extension. At this time I am persisting to both so that the values can be shared UserDefaults.standard().set:...forKey:... UserDefaults(suiteName:...)().set:..