@@ -149,6 +149,9 @@ typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) {
149
149
Keep the raw value for users that would like to root the push */
150
150
@property (readonly )NSDictionary *rawPayload;
151
151
152
+ /* iOS 10+ : Groups notifications into threads */
153
+ @property (readonly )NSString *threadId;
154
+
152
155
@end
153
156
154
157
// ## OneSignal OSNotification
@@ -204,15 +207,20 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
204
207
OSNotificationPermissionDenied,
205
208
206
209
// 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
208
214
};
209
215
210
216
211
217
212
218
// Permission Classes
213
219
@interface OSPermissionState : NSObject
214
220
221
+ @property (readonly , nonatomic ) BOOL reachable;
215
222
@property (readonly , nonatomic ) BOOL hasPrompted;
223
+ @property (readonly , nonatomic ) BOOL providesAppNotificationSettings;
216
224
@property (readonly , nonatomic ) OSNotificationPermission status;
217
225
- (NSDictionary *)toDictionary ;
218
226
@@ -311,13 +319,20 @@ extern NSString * const kOSSettingsKeyInAppLaunchURL;
311
319
/* Prompt user yes/no to open URL's from push notifications*/
312
320
extern NSString * const kOSSSettingsKeyPromptBeforeOpeningPushURL ;
313
321
314
- /* iOS10 +
322
+ /* iOS 10 +
315
323
Set notification's in-focus display option.
316
324
Value must be an OSNotificationDisplayType enum
317
325
*/
318
326
extern NSString * const kOSSettingsKeyInFocusDisplayOption ;
319
327
320
328
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
+
321
336
322
337
// ======= OneSignal Class Interface =========
323
338
@interface OneSignal : NSObject
@@ -354,6 +369,12 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
354
369
// Only use if you set kOSSettingsKeyAutoPrompt to false
355
370
+ (void )registerForPushNotifications __deprecated_msg(" Please use promptForPushNotificationsWithUserResponse instead." );
356
371
+ (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 ;
357
378
358
379
// - Logging
359
380
+ (void )setLogLevel : (ONE_S_LOG_LEVEL)logLevel visualLevel : (ONE_S_LOG_LEVEL)visualLogLevel ;
0 commit comments