Creating a Today widget and I am using UserDefaults(suiteName:) to persist some data. In the main application I am using UserDefaults.standard(). T
Also make sure you add App Groups to the correct Configuration (Debug, Release). If you add App Groups in Debug for your application target and try to use it in Release config for your extension, then it wont work.
If you add in Debug config (for app target), then use it in debug config (for extension target)