@@ -149,6 +149,9 @@ typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) {
149149 Keep the raw value for users that would like to root the push */
150150@property (readonly )NSDictionary *rawPayload;
151151
152+ /* iOS 10+ : Groups notifications into threads */
153+ @property (readonly )NSString *threadId;
154+
152155@end
153156
154157// ## OneSignal OSNotification
@@ -204,15 +207,20 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
204207 OSNotificationPermissionDenied,
205208
206209 // The application is authorized to post user notifications.
207- OSNotificationPermissionAuthorized
210+ OSNotificationPermissionAuthorized,
211+
212+ // the application is only authorized to post Provisional notifications (direct to history)
213+ OSNotificationPermissionProvisional
208214};
209215
210216
211217
212218// Permission Classes
213219@interface OSPermissionState : NSObject
214220
221+ @property (readonly , nonatomic ) BOOL reachable;
215222@property (readonly , nonatomic ) BOOL hasPrompted;
223+ @property (readonly , nonatomic ) BOOL providesAppNotificationSettings;
216224@property (readonly , nonatomic ) OSNotificationPermission status;
217225- (NSDictionary *)toDictionary ;
218226
@@ -311,13 +319,20 @@ extern NSString * const kOSSettingsKeyInAppLaunchURL;
311319/* Prompt user yes/no to open URL's from push notifications*/
312320extern NSString * const kOSSSettingsKeyPromptBeforeOpeningPushURL ;
313321
314- /* iOS10 +
322+ /* iOS 10 +
315323 Set notification's in-focus display option.
316324 Value must be an OSNotificationDisplayType enum
317325*/
318326extern NSString * const kOSSettingsKeyInFocusDisplayOption ;
319327
320328
329+ /* iOS 12 +
330+ Used to determine if the app is able to present it's
331+ own customized Notification Settings view
332+ */
333+ extern NSString * const kOSSettingsKeyProvidesAppNotificationSettings ;
334+
335+
321336
322337// ======= OneSignal Class Interface =========
323338@interface OneSignal : NSObject
@@ -354,6 +369,12 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
354369// Only use if you set kOSSettingsKeyAutoPrompt to false
355370+ (void )registerForPushNotifications __deprecated_msg(" Please use promptForPushNotificationsWithUserResponse instead." );
356371+ (void )promptForPushNotificationsWithUserResponse : (void (^)(BOOL accepted))completionHandler ;
372+ + (void )promptForPushNotificationsWithUserResponse : (void (^)(BOOL accepted))completionHandler fallbackToSettings : (BOOL )fallback ;
373+
374+ // This method opens the iOS Settings app and navigates to the Push Notification Settings
375+ // page for your app specifically
376+ + (void )presentAppSettings ;
377+ + (void )registerForProvisionalAuthorization : (void (^)(BOOL accepted))completionHandler ;
357378
358379// - Logging
359380+ (void )setLogLevel : (ONE_S_LOG_LEVEL)logLevel visualLevel : (ONE_S_LOG_LEVEL)visualLogLevel ;
0 commit comments