I think the question could be broken down into two parts: background execution & updating shortcut items dynamically.
IMHO, iOS background execution is still quite limited, like: executing finite-length tasks, or only specific app types are allowed to run in the background for longer time. Reachability doesn't really fit long running background task case.
As you mentioned, updating shortcut items dynamically is pretty easy (as below):
// replace updateShortcutItemMethod and EventYouAreInterestedIn accordingly
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(<updateShortcutItemMethod>) name:<EventYouAreInterestedIn> object:nil];
- (void)updateShortcutItemWithType:(NSString *)type title:(NSString *)title subtitle:(NSString *)subtitle icon:(NSString *)icon
{
NSMutableArray *shortcutItems = [NSMutableArray arrayWithArray:[UIApplication sharedApplication].shortcutItems];
for (UIMutableApplicationShortcutItem *shortcutItem in shortcutItems) {
if ([shortcutItem.type isEqualToString:type]) {
UIMutableApplicationShortcutItem *updatedShortcutItem = [[UIMutableApplicationShortcutItem alloc] initWithType:type localizedTitle:title localizedSubtitle:subtitle icon:[self getIconFrom:icon] userInfo:nil];
NSUInteger index = [shortcutItems indexOfObject:shortcutItem];
[shortcutItems replaceObjectAtIndex:index withObject:updatedShortcutItem];
[UIApplication sharedApplication].shortcutItems = shortcutItems;
}
}
}
And apart from the technical aspect, according to the user experience point of view, updating UIApplicationShortcutItem when application is in background is not really a good idea.
Because when application is in background, user is not in the context of the application (no interaction occurs). Changing UIApplicationShortcutItem too often while user is not aware of why, could confuse user a lot. Better way of doing it should be informing user explicitly what is happening while user is interacting with the application.
Sorry, this may not really help achieve what you want.