EWTBackgroundLocalNotification
Show queued local notification as soon as app enters background.
Preview
Installation
CocoaPods
EWTBackgroundLocalNotification is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "EWTBackgroundLocalNotification"
Usage
- Import the header
#import "EWTBackgroundLocalNotification.h"
- Create one or multiple local notification
//Sample local notification
UILocalNotification *notification = [[UILocalNotification alloc] init];
[notification setAlertBody:@"message"];
[notification setTimeZone:[NSTimeZone defaultTimeZone]];
[notification setUserInfo:@{@"info":message}];
- Add the notification to queue
[EWTBackgroundLocalNotification queueLocalNotification:notification];
- The local notification(s) queued would be shown when the app is brought to background.