I have an application that needs to check for Facebook and Twitter account stored in iOS Settings. I can fetch both successfully. My question is how can I check if the user has deleted the account and inserted a new one in iOS Settings. If the user goes back to the app, it needs to check the new account stored by the user.
This is the app Im trying to pattern my app into.
Watch for "ACAccountStoreDidChangeNotification". eg.
- (void)viewDidLoad
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAccounts:) name:ACAccountStoreDidChangeNotification object:nil];
}
- (void)refreshAccounts:(NSNotification *)note
{
NSLog(@"Refreshing Accounts");
//whatever code you want
}