|
54 | 54 |
|
55 | 55 | @protocol OSUserNotificationCenterDelegate <NSObject>
|
56 | 56 | @optional
|
57 |
| -- (void)userNotificationCenter:(id)center willPresentNotification:(id)notification withCompletionHandler:(void (^)(NSUInteger options))completionHandler; |
58 |
| -- (void)userNotificationCenter:(id)center didReceiveNotificationResponse:(id)response withCompletionHandler:(void (^)())completionHandler; |
| 57 | +- (void)userNotificationCenter:(id)center willPresentNotification:(id)notification withCompletionHandler:(void (^)(NSUInteger options))completionHandler __deprecated_msg("Can use your own delegate as normal."); |
| 58 | +- (void)userNotificationCenter:(id)center didReceiveNotificationResponse:(id)response withCompletionHandler:(void (^)())completionHandler __deprecated_msg("Can use your own delegate as normal."); |
59 | 59 | @end
|
60 | 60 |
|
61 | 61 | #endif
|
@@ -148,6 +148,9 @@ typedef OSNotificationDisplayType OSInFocusDisplayOption;
|
148 | 148 | Set to false when app is in focus and in-app alerts are disabled, or the remote notification is silent. */
|
149 | 149 | @property(readonly, getter=wasShown)BOOL shown;
|
150 | 150 |
|
| 151 | +/* Set to true if the app was in focus when the notification */ |
| 152 | +@property(readonly, getter=wasAppInFocus)BOOL isAppInFocus; |
| 153 | + |
151 | 154 | /* Set to true when the received notification is silent
|
152 | 155 | Silent means there is no alert, sound, or badge payload in the aps dictionary
|
153 | 156 | requires remote-notification within UIBackgroundModes array of the Info.plist */
|
@@ -233,7 +236,7 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
|
233 | 236 | + (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId;
|
234 | 237 | + (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback;
|
235 | 238 | + (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings;
|
236 |
| -+ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationReceived:(OSHandleNotificationReceivedBlock)receivedCallback handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings; |
| 239 | ++ (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId handleNotificationReceived:(OSHandleNotificationReceivedBlock)erceivedCallback handleNotificationAction:(OSHandleNotificationActionBlock)actionCallback settings:(NSDictionary*)settings; |
237 | 240 |
|
238 | 241 | + (NSString*)app_id;
|
239 | 242 |
|
@@ -276,10 +279,10 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
|
276 | 279 | // Optional method that sends us the user's email as an anonymized hash so that we can better target and personalize notifications sent to that user across their devices.
|
277 | 280 | + (void)syncHashedEmail:(NSString*)email;
|
278 | 281 |
|
279 |
| -// - iOS 10 BETA features currently only available on XCode 8 & iOS 10.0+ |
| 282 | +// - iOS 10 features currently only available on XCode 8 & iOS 10.0+ |
280 | 283 | #if XC8_AVAILABLE
|
281 |
| -+ (void)setNotificationCenterDelegate:(id<OSUserNotificationCenterDelegate>)delegate; |
282 |
| -+ (id<OSUserNotificationCenterDelegate>)notificationCenterDelegate; |
| 284 | ++ (void)setNotificationCenterDelegate:(id<OSUserNotificationCenterDelegate>)delegate __deprecated_msg("Can use your own delegate as normal."); |
| 285 | ++ (id<OSUserNotificationCenterDelegate>)notificationCenterDelegate __deprecated_msg("Can use your own delegate as normal."); |
283 | 286 | #endif
|
284 | 287 |
|
285 | 288 | @end
|
0 commit comments