流程完成后,我将发送本地通知,并且效果很好。
这是我的 didReceiveLocalNotification 代码:
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
CounterViewController *counterVC = [CounterViewController sharedInstance];
[counterVC notificationArrived];
}
但是当 iPhone 被锁定时,这些行不会被调用……我该怎么做才能让它们在后台运行?