Skip to content

Commit 12f23f3

Browse files
committed
Adding setInAppMessageDelegate with new lifecycle methods included
OSInAppMessageDelegate previously just had the handleMessageAction method, but there was no way to set the delegate and was never called.
1 parent 091a612 commit 12f23f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

iOS_SDK/OneSignalSDK/Source/OneSignal.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ typedef NS_ENUM(NSUInteger, OSNotificationActionType) {
208208
@protocol OSInAppMessageDelegate <NSObject>
209209
@optional
210210
- (void)handleMessageAction:(OSInAppMessageAction * _Nonnull)action NS_SWIFT_NAME(handleMessageAction(action:));
211+
- (void)onWillDisplayInAppMessage:(NSString *)message;
212+
- (void)onDidDisplayInAppMessage:(NSString *)message;
213+
- (void)onWillDismissInAppMessage:(NSString *)message;
214+
- (void)onDidDismissInAppMessage:(NSString *)message;
211215
@end
212216

213217
// Pass in nil means a notification will not display
@@ -472,6 +476,7 @@ typedef void (^OSInAppMessageClickBlock)(OSInAppMessageAction * _Nonnull action)
472476
+ (void)setNotificationWillShowInForegroundHandler:(OSNotificationWillShowInForegroundBlock _Nullable)block;
473477
+ (void)setNotificationOpenedHandler:(OSNotificationOpenedBlock _Nullable)block;
474478
+ (void)setInAppMessageClickHandler:(OSInAppMessageClickBlock _Nullable)block;
479+
+ (void)setInAppMessageDelegate:(NSObject<OSInAppMessageDelegate> *_Nullable)delegate;
475480

476481
#pragma mark Post Notification
477482
+ (void)postNotification:(NSDictionary* _Nonnull)jsonData;

0 commit comments

Comments
 (0)