I need to schedule a UILocalNotification
when battery is n percent. UILocalNotification
has fireDate
property only and UIApplication
class has below methods for presenting local notifications.
- (void)presentLocalNotificationNow:(UILocalNotification *)notification;
- (void)scheduleLocalNotification:(UILocalNotification *)notification;
Is they are anything else that would help me post local notifications based on events and not time. I can do it when the app is in active or background state. But I want to schedule it, so even if app is terminated, it can post the notification.
答案 0 :(得分:0)
不,您的应用需要运行才能安排本地通知。
为了做你想做的事情,你需要一些方法来在电池电量达到指定水平时启动你的应用,我不认为这是可能的。