iOS SDK  12.0.0
 All Classes Functions Enumerations Enumerator Groups Pages
FlurryMessaging.h
1 //
2 // FlurryMessaging.h
3 // FlurryMessaging
4 //
5 // Created by Shruthi Ramesh on 11/16/17.
6 // Copyright (c) 2021 Yahoo. All rights reserved.
7 //
8 #if !TARGET_OS_WATCH
9 #import <Foundation/Foundation.h>
10 #import <UserNotifications/UserNotifications.h>
11 
12 @class FlurryMessage;
13 
22 @protocol FlurryMessagingDelegate <NSObject>
23 
24 @optional
25 
33 -(void) didReceiveMessage:(nonnull FlurryMessage*)message;
34 
42 -(void) didReceiveActionWithIdentifier:(nullable NSString*)identifier message:(nonnull FlurryMessage*)message;
43 
44 @end
45 
46 typedef void(^MessagingHandler)(void);
47 
58 @interface FlurryMessage : NSObject
59 
60 @property (nonatomic, readonly, strong, nullable) NSString* title;
61 @property (nonatomic, readonly, strong, nullable) NSString* body;
62 @property (nonatomic, readonly, strong, nullable) NSString* sound;
63 @property (nonatomic, readonly, strong, nullable) NSDictionary* appData;
64 
65 @end
66 
67 
68 @interface FlurryMessaging : NSObject
69 
82 +(void) setDeviceToken:(nullable NSData *)deviceToken
83 NS_SWIFT_NAME(set(deviceToken:));
84 
106 #if TARGET_OS_IPHONE
107 +(void) receivedRemoteNotification:(nonnull NSDictionary *)userInfo withCompletionHandler:(_Nullable MessagingHandler)completionHandler
108 NS_SWIFT_NAME(receivedRemoteNotification(_:completionHandler:));
109 #endif
110 
134 +(void) presentNotification:(nonnull UNNotification *)notification withCompletionHandler:(_Nullable MessagingHandler)completionHandler API_AVAILABLE(ios(10.0))
135 NS_SWIFT_NAME(presentNotification(_:completionHandler:));
136 
159 #if !TARGET_OS_TV
160 +(void) receivedNotificationResponse:(nonnull UNNotificationResponse *)response withCompletionHandler:(_Nullable MessagingHandler) completionHandler API_AVAILABLE(ios(10.0))
161 NS_SWIFT_NAME(receivedNotificationResponse(_:completionHandler:));
162 #endif
163 
181 +(BOOL) isFlurryMsg:(nonnull NSDictionary*)userInfo;
182 
183 
203 
221 +(void) setMessagingDelegate:(nonnull id<FlurryMessagingDelegate>)delegate
222 NS_SWIFT_NAME(set(delegate:));
223 
224 
240 +(void) setMessagingDelegate:(nonnull id<FlurryMessagingDelegate>)delegate withCallbackQueue:(nonnull dispatch_queue_t)messagingCallbackQueue
241 NS_SWIFT_NAME(set(delegate:callbackQueue:));
242 @end
243 #endif