@@ -64,6 +64,12 @@ NS_SWIFT_NAME(InAppMessagingActionButton)
64
64
// / Unavailable.
65
65
- (instancetype )init NS_UNAVAILABLE;
66
66
67
+ // / Exposed for unit testing only, or for use in SwiftUI previews. Don't instantiate this in your
68
+ // / app directly.
69
+ - (instancetype )initWithButtonText:(NSString *)buttonText
70
+ buttonTextColor:(UIColor *)textColor
71
+ backgroundColor:(UIColor *)backgroundColor;
72
+
67
73
@end
68
74
69
75
/* * Contain display data for an image for a fiam message.
@@ -84,6 +90,10 @@ NS_SWIFT_NAME(InAppMessagingImageData)
84
90
// / Unavailable.
85
91
- (instancetype )init NS_UNAVAILABLE;
86
92
93
+ // / Exposed for unit testing only, or for use in SwiftUI previews. Don't instantiate this in your
94
+ // / app directly.
95
+ - (instancetype )initWithImageURL:(NSString *)imageURL imageData:(NSData *)imageData;
96
+
87
97
@end
88
98
89
99
/* * Defines the metadata for the campaign to which a FIAM message belongs.
@@ -128,7 +138,8 @@ NS_SWIFT_NAME(InAppMessagingAction)
128
138
// / Unavailable.
129
139
- (instancetype )init NS_UNAVAILABLE;
130
140
131
- // / This class should only be initialized from a custom in-app message UI component implementation.
141
+ // / This class should only be initialized from a custom in-app message UI component implementation
142
+ // / or in unit testing.
132
143
- (instancetype )initWithActionText:(nullable NSString *)actionText
133
144
actionURL:(nullable NSURL *)actionURL;
134
145
@@ -229,6 +240,21 @@ NS_SWIFT_NAME(InAppMessagingCardDisplay)
229
240
// / Unavailable.
230
241
- (instancetype )init NS_UNAVAILABLE;
231
242
243
+ // / Exposed for unit testing only, or for use in SwiftUI previews. Don't instantiate this in your
244
+ // / app directly.
245
+ - (instancetype )initWithCampaignName:(NSString *)campaignName
246
+ titleText:(NSString *)title
247
+ bodyText:(nullable NSString *)bodyText
248
+ textColor:(UIColor *)textColor
249
+ portraitImageData:(FIRInAppMessagingImageData *)portraitImageData
250
+ landscapeImageData:(nullable FIRInAppMessagingImageData *)landscapeImageData
251
+ backgroundColor:(UIColor *)backgroundColor
252
+ primaryActionButton:(FIRInAppMessagingActionButton *)primaryActionButton
253
+ secondaryActionButton:(nullable FIRInAppMessagingActionButton *)secondaryActionButton
254
+ primaryActionURL:(nullable NSURL *)primaryActionURL
255
+ secondaryActionURL:(nullable NSURL *)secondaryActionURL
256
+ appData:(nullable NSDictionary *)appData;
257
+
232
258
@end
233
259
234
260
/* * Class for defining a modal message for display.
@@ -274,6 +300,18 @@ NS_SWIFT_NAME(InAppMessagingModalDisplay)
274
300
// / Unavailable.
275
301
- (instancetype )init NS_UNAVAILABLE;
276
302
303
+ // / Exposed for unit testing only, or for use in SwiftUI previews. Don't instantiate this in your
304
+ // / app directly.
305
+ - (instancetype )initWithCampaignName:(NSString *)campaignName
306
+ titleText:(NSString *)title
307
+ bodyText:(nullable NSString *)bodyText
308
+ textColor:(UIColor *)textColor
309
+ backgroundColor:(UIColor *)backgroundColor
310
+ imageData:(nullable FIRInAppMessagingImageData *)imageData
311
+ actionButton:(nullable FIRInAppMessagingActionButton *)actionButton
312
+ actionURL:(nullable NSURL *)actionURL
313
+ appData:(nullable NSDictionary *)appData;
314
+
277
315
@end
278
316
279
317
/* * Class for defining a banner message for display.
@@ -314,6 +352,17 @@ NS_SWIFT_NAME(InAppMessagingBannerDisplay)
314
352
// / Unavailable.
315
353
- (instancetype )init NS_UNAVAILABLE;
316
354
355
+ // / Exposed for unit testing only, or for use in SwiftUI previews. Don't instantiate this in your
356
+ // / app directly.
357
+ - (instancetype )initWithCampaignName:(NSString *)campaignName
358
+ titleText:(NSString *)title
359
+ bodyText:(nullable NSString *)bodyText
360
+ textColor:(UIColor *)textColor
361
+ backgroundColor:(UIColor *)backgroundColor
362
+ imageData:(nullable FIRInAppMessagingImageData *)imageData
363
+ actionURL:(nullable NSURL *)actionURL
364
+ appData:(nullable NSDictionary *)appData;
365
+
317
366
@end
318
367
319
368
/* * Class for defining a image-only message for display.
@@ -334,6 +383,13 @@ NS_SWIFT_NAME(InAppMessagingImageOnlyDisplay)
334
383
// / Unavailable.
335
384
- (instancetype )init NS_UNAVAILABLE;
336
385
386
+ // / Exposed for unit testing only, or for use in SwiftUI previews. Don't instantiate this in your
387
+ // / app directly.
388
+ - (instancetype )initWithCampaignName:(NSString *)campaignName
389
+ imageData:(FIRInAppMessagingImageData *)imageData
390
+ actionURL:(nullable NSURL *)actionURL
391
+ appData:(nullable NSDictionary *)appData;
392
+
337
393
@end
338
394
339
395
// / The way that an in-app message was dismissed.
0 commit comments