14
14
* limitations under the License.
15
15
*/
16
16
17
- #import < TargetConditionals.h>
18
- #if TARGET_OS_IOS || TARGET_OS_TV
17
+ #import < Foundation/Foundation.h>
19
18
20
- # import < UIKit/UIKit.h >
19
+ @class UIColor;
21
20
22
21
NS_ASSUME_NONNULL_BEGIN
23
22
24
- // / The type and UI style of an in-app message.
23
+ // / The type and UI style of an in-app message. This enum is unavailable on macOS, macOS Catalyst,
24
+ // / and watchOS.
25
25
typedef NS_ENUM (NSInteger , FIRInAppMessagingDisplayMessageType) {
26
26
// / Modal style.
27
27
FIRInAppMessagingDisplayMessageTypeModal,
@@ -31,18 +31,21 @@ typedef NS_ENUM(NSInteger, FIRInAppMessagingDisplayMessageType) {
31
31
FIRInAppMessagingDisplayMessageTypeImageOnly,
32
32
// / Card style.
33
33
FIRInAppMessagingDisplayMessageTypeCard
34
- };
34
+ } API_UNAVAILABLE(macos, watchos) ;
35
35
36
- // / Represents how an in-app message should be triggered to appear.
36
+ // / Represents how an in-app message should be triggered to appear. This enum is unavailable on
37
+ // / macOS, macOS Catalyst, and watchOS.
37
38
typedef NS_ENUM (NSInteger , FIRInAppMessagingDisplayTriggerType) {
38
39
// / Triggered on app foreground.
39
40
FIRInAppMessagingDisplayTriggerTypeOnAppForeground,
40
41
// / Triggered from an analytics event being fired.
41
42
FIRInAppMessagingDisplayTriggerTypeOnAnalyticsEvent
42
- };
43
+ } API_UNAVAILABLE(macos, watchos) ;
43
44
44
- /* * Contains the display information for an action button.
45
+ /* * Contains the display information for an action button. This class is unavailable on macOS,
46
+ * macOS Catalyst, and watchOS.
45
47
*/
48
+ API_UNAVAILABLE (macos, watchos)
46
49
NS_SWIFT_NAME(InAppMessagingActionButton)
47
50
@interface FIRInAppMessagingActionButton : NSObject
48
51
@@ -73,8 +76,10 @@ NS_SWIFT_NAME(InAppMessagingActionButton)
73
76
@end
74
77
75
78
/* * Contain display data for an image for a fiam message.
79
+ * This class is unavailable on macOS, macOS Catalyst, and watchOS.
76
80
*/
77
81
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
82
+ API_UNAVAILABLE(macos, watchos)
78
83
NS_SWIFT_NAME(InAppMessagingImageData)
79
84
@interface FIRInAppMessagingImageData : NSObject
80
85
@@ -98,8 +103,10 @@ NS_SWIFT_NAME(InAppMessagingImageData)
98
103
@end
99
104
100
105
/* * Defines the metadata for the campaign to which a FIAM message belongs.
106
+ * This class is unavailable on macOS, macOS Catalyst, and watchOS.
101
107
*/
102
108
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
109
+ API_UNAVAILABLE(macos, watchos)
103
110
NS_SWIFT_NAME(InAppMessagingCampaignInfo)
104
111
@interface FIRInAppMessagingCampaignInfo : NSObject
105
112
@@ -124,8 +131,10 @@ NS_SWIFT_NAME(InAppMessagingCampaignInfo)
124
131
@end
125
132
126
133
/* * Defines the metadata for a FIAM action.
134
+ * This class is unavailable on macOS, macOS Catalyst, and watchOS.
127
135
*/
128
136
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
137
+ API_UNAVAILABLE(macos, watchos)
129
138
NS_SWIFT_NAME(InAppMessagingAction)
130
139
@interface FIRInAppMessagingAction : NSObject
131
140
@@ -151,8 +160,10 @@ NS_SWIFT_NAME(InAppMessagingAction)
151
160
/* *
152
161
* Base class representing a FIAM message to be displayed. Don't create instance
153
162
* of this class directly. Instantiate one of its subclasses instead.
163
+ * This class is unavailable on macOS, macOS Catalyst, and watchOS.
154
164
*/
155
165
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
166
+ API_UNAVAILABLE(macos, watchos)
156
167
NS_SWIFT_NAME(InAppMessagingDisplayMessage)
157
168
@interface FIRInAppMessagingDisplayMessage : NSObject
158
169
@@ -188,7 +199,12 @@ NS_SWIFT_NAME(InAppMessagingDisplayMessage)
188
199
189
200
@end
190
201
202
+ /* *
203
+ * A displayable in-app card message.
204
+ * This class is unavailable on macOS, macOS Catalyst, and watchOS.
205
+ */
191
206
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
207
+ API_UNAVAILABLE(macos, watchos)
192
208
NS_SWIFT_NAME(InAppMessagingCardDisplay)
193
209
@interface FIRInAppMessagingCardDisplay : FIRInAppMessagingDisplayMessage
194
210
@@ -262,9 +278,12 @@ NS_SWIFT_NAME(InAppMessagingCardDisplay)
262
278
263
279
@end
264
280
265
- /* * Class for defining a modal message for display.
281
+ /* *
282
+ * Class for defining a modal message for display.
283
+ * This class is unavailable on macOS, macOS Catalyst, and watchOS.
266
284
*/
267
285
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
286
+ API_UNAVAILABLE(macos, watchos)
268
287
NS_SWIFT_NAME(InAppMessagingModalDisplay)
269
288
@interface FIRInAppMessagingModalDisplay : FIRInAppMessagingDisplayMessage
270
289
@@ -320,9 +339,12 @@ NS_SWIFT_NAME(InAppMessagingModalDisplay)
320
339
321
340
@end
322
341
323
- /* * Class for defining a banner message for display.
342
+ /* *
343
+ * Class for defining a banner message for display.
344
+ * This class is unavailable on macOS, macOS Catalyst, and watchOS.
324
345
*/
325
346
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
347
+ API_UNAVAILABLE(macos, watchos)
326
348
NS_SWIFT_NAME(InAppMessagingBannerDisplay)
327
349
@interface FIRInAppMessagingBannerDisplay : FIRInAppMessagingDisplayMessage
328
350
@@ -372,9 +394,12 @@ NS_SWIFT_NAME(InAppMessagingBannerDisplay)
372
394
373
395
@end
374
396
375
- /* * Class for defining a image-only message for display.
397
+ /* *
398
+ * Class for defining a image-only message for display.
399
+ * This class is unavailable on macOS, macOS Catalyst, and watchOS.
376
400
*/
377
401
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
402
+ API_UNAVAILABLE(macos, watchos)
378
403
NS_SWIFT_NAME(InAppMessagingImageOnlyDisplay)
379
404
@interface FIRInAppMessagingImageOnlyDisplay : FIRInAppMessagingDisplayMessage
380
405
@@ -401,6 +426,7 @@ NS_SWIFT_NAME(InAppMessagingImageOnlyDisplay)
401
426
@end
402
427
403
428
// / The way that an in-app message was dismissed.
429
+ // / This enum is unavailable on macOS, macOS Catalyst, and watchOS.
404
430
typedef NS_ENUM (NSInteger , FIRInAppMessagingDismissType) {
405
431
// / Message was swiped away (only valid for banner messages).
406
432
FIRInAppMessagingDismissTypeUserSwipe,
@@ -410,21 +436,24 @@ typedef NS_ENUM(NSInteger, FIRInAppMessagingDismissType) {
410
436
FIRInAppMessagingDismissTypeAuto,
411
437
// / Dismiss method unknown.
412
438
FIRInAppMessagingDismissUnspecified,
413
- };
439
+ } API_UNAVAILABLE(macos, watchos) ;
414
440
415
441
// / Error code for an in-app message that failed to display.
442
+ // / This enum is unavailable on macOS, macOS Catalyst, and watchOS.
416
443
typedef NS_ENUM (NSInteger , FIAMDisplayRenderErrorType) {
417
444
// / The image data for this in-app message is invalid.
418
445
FIAMDisplayRenderErrorTypeImageDataInvalid,
419
446
// / Unexpected error.
420
447
FIAMDisplayRenderErrorTypeUnspecifiedError,
421
- };
448
+ } API_UNAVAILABLE(macos, watchos) ;
422
449
423
450
/* *
424
451
* A protocol defining those callbacks to be triggered by the message display component
425
452
* under appropriate conditions.
453
+ * This protocol is unavailable on macOS, macOS Catalyst, and watchOS.
426
454
*/
427
455
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
456
+ API_UNAVAILABLE(macos, watchos)
428
457
NS_SWIFT_NAME(InAppMessagingDisplayDelegate)
429
458
@protocol FIRInAppMessagingDisplayDelegate <NSObject>
430
459
@@ -481,8 +510,10 @@ NS_SWIFT_NAME(InAppMessagingDisplayDelegate)
481
510
482
511
/* *
483
512
* The protocol that a FIAM display component must implement.
513
+ * This protocol is unavailable on macOS, macOS Catalyst, and watchOS.
484
514
*/
485
515
NS_EXTENSION_UNAVAILABLE (" Firebase In App Messaging is not supported for iOS extensions." )
516
+ API_UNAVAILABLE(macos, watchos)
486
517
NS_SWIFT_NAME(InAppMessagingDisplay)
487
518
@protocol FIRInAppMessagingDisplay
488
519
@@ -497,5 +528,3 @@ NS_SWIFT_NAME(InAppMessagingDisplay)
497
528
displayDelegate:(id <FIRInAppMessagingDisplayDelegate>)displayDelegate;
498
529
@end
499
530
NS_ASSUME_NONNULL_END
500
-
501
- #endif // TARGET_OS_IOS || TARGET_OS_TV
0 commit comments