PWAlert Class Reference
| Inherits from | NSObject |
| Conforms to | NSCoding NSCopying |
| Declared in | PWAlert.h |
Overview
A PWAlert object encapsulates all information related to an alert. This includes but is not limited to: the message, the alert ID and the payload dictionary.
Properties
alertID
An NSInteger value that represents the alert ID.
@property (readonly) NSInteger alertIDDeclared In
PWAlert.hInstance Methods
initWithNotificationUserInfo:
Initializes a PWAlert object. You can only initialize a PWAlert object with a valid userInfo dictionary.
- (instancetype)initWithNotificationUserInfo:(NSDictionary *)userInfoParameters
- userInfo
The userInfo that encapsulates the notification. This is fetched from the following locations:
application:didReceiveRemoteNotification:passed a userInfoNSDictionary. You can use this dictionary to instantiate aPWAlertobject.application:didFinishLaunchingWithOptions:may have aUIApplicationLaunchOptionsRemoteNotificationKeyif the application was launched through a push notification. You can extract the userInfo from the launchOptionsNSDictionaryusing the aformentioned key.
Declared In
PWAlert.h