I am creating an iwatch application to display the value on the watch when I click on a table in the iphone application.
I would like to receive a notification about user sharing changes. It is divided between watchkitapp and iphone app, so when a user makes any changes to the phone, I should get a notification. I did the following
When the user performs some actions in the application by phone
NSUserDefaults *shared = [[NSUserDefaults alloc] initWithSuiteName:@"group.app"];</br> id object = [self.plantsArray objectAtIndex:[self.plantsTable indexPathForSelectedRow].row];</br> [shared setObject:object forKey:@"data"];</br> [shared synchronize];
registered in watchkit extension for notification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(print) name:NSUserDefaultsDidChangeNotification object:nil];
But, unfortunately, I do not receive any notifications, does anyone know some solution
ios apple-watch usergroups
Manuraphy
source share