@@ -189,20 +189,50 @@ typedef NS_ENUM(NSUInteger, OSNotificationDisplayType) {
189
189
190
190
@end ;
191
191
192
+ @interface OSInAppMessageOutcome : NSObject
193
+
194
+ @property (strong , nonatomic , nonnull ) NSString *name;
195
+ @property (strong , nonatomic , nonnull ) NSNumber *weight;
196
+ @property (nonatomic ) BOOL unique;
197
+
198
+ // Convert the class into a NSDictionary
199
+ - (NSDictionary *_Nonnull)jsonRepresentation ;
200
+
201
+ @end
202
+
203
+ @interface OSInAppMessageTag : NSObject
204
+
205
+ @property (strong , nonatomic , nullable ) NSDictionary *tagsToAdd;
206
+ @property (strong , nonatomic , nullable ) NSArray *tagsToRemove;
207
+
208
+ // Convert the class into a NSDictionary
209
+ - (NSDictionary *_Nonnull)jsonRepresentation ;
210
+
211
+ @end
212
+
192
213
@interface OSInAppMessageAction : NSObject
193
214
194
- /* The action name attached to the IAM action */
215
+ // The action name attached to the IAM action
195
216
@property (strong , nonatomic , nullable ) NSString *clickName;
196
217
197
- /* The URL (if any) that should be opened when the action occurs */
218
+ // The URL (if any) that should be opened when the action occurs
198
219
@property (strong , nonatomic , nullable ) NSURL *clickUrl;
199
220
200
- /* Whether or not the click action is first click on the IAM */
221
+ // Whether or not the click action is first click on the IAM
201
222
@property (nonatomic ) BOOL firstClick;
202
223
203
- /* Whether or not the click action dismisses the message */
224
+ // Whether or not the click action dismisses the message
204
225
@property (nonatomic ) BOOL closesMessage;
205
226
227
+ // The outcome to send for this action
228
+ @property (strong , nonatomic , nullable ) NSArray <OSInAppMessageOutcome *> *outcomes;
229
+
230
+ // The tags to send for this action
231
+ @property (strong , nonatomic , nullable ) OSInAppMessageTag *tags;
232
+
233
+ // Convert the class into a NSDictionary
234
+ - (NSDictionary *_Nonnull)jsonRepresentation ;
235
+
206
236
@end
207
237
208
238
@protocol OSInAppMessageDelegate <NSObject >
@@ -335,6 +365,48 @@ typedef NS_ENUM(NSInteger, OSNotificationPermission) {
335
365
336
366
@end
337
367
368
+ @interface OSDevice : NSObject
369
+ /* *
370
+ * Get the app's notification permission
371
+ * @return false if the user disabled notifications for the app, otherwise true
372
+ */
373
+ - (BOOL )isNotificationEnabled ;
374
+ /* *
375
+ * Get whether the user is subscribed to OneSignal notifications or not
376
+ * @return false if the user is not subscribed to OneSignal notifications, otherwise true
377
+ */
378
+ - (BOOL )isUserSubscribed ;
379
+ /* *
380
+ * Get whether the user is subscribed
381
+ * @return true if isNotificationEnabled, isUserSubscribed, getUserId and getPushToken are true, otherwise false
382
+ */
383
+ - (BOOL )isSubscribed ;
384
+ /* *
385
+ * Get the user notification permision status
386
+ * @return OSNotificationPermission
387
+ */
388
+ - (OSNotificationPermission)getNotificationPermissionStatus ;
389
+ /* *
390
+ * Get user id from registration (player id)
391
+ * @return user id if user is registered, otherwise false
392
+ */
393
+ - (NSString *)getUserId ;
394
+ /* *
395
+ * Get apple deice push token
396
+ * @return push token if available, otherwise null
397
+ */
398
+ - (NSString *)getPushToken ;
399
+ /* *
400
+ * Get the user email id
401
+ * @return email id if user address was registered, otherwise null
402
+ */
403
+ - (NSString *)getEmailUserId ;
404
+ /* *
405
+ * Get the user email
406
+ * @return email address if set, otherwise null
407
+ */
408
+ - (NSString *)getEmailAddress ;
409
+ @end
338
410
339
411
typedef void (^OSWebOpenURLResultBlock)(BOOL shouldOpen);
340
412
@@ -451,6 +523,7 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) {
451
523
+ (void )IdsAvailable : (OSIdsAvailableBlock)idsAvailableBlock __deprecated_msg(" Please use getPermissionSubscriptionState or addSubscriptionObserver and addPermissionObserver instead." );
452
524
453
525
+ (OSPermissionSubscriptionState*)getPermissionSubscriptionState ;
526
+ + (OSDevice*)getUserDevice ;
454
527
455
528
+ (void )addPermissionObserver : (NSObject <OSPermissionObserver>*)observer ;
456
529
+ (void )removePermissionObserver : (NSObject <OSPermissionObserver>*)observer ;
0 commit comments