20
20
21
21
@implementation FIRInAppMessagingDisplayMessage
22
22
23
- - (instancetype )initWithMessageID : (NSString *)messageID
24
- campaignName : (NSString *)campaignName
25
- renderAsTestMessage : (BOOL )renderAsTestMessage
26
- messageType : (FIRInAppMessagingDisplayMessageType)messageType
27
- triggerType : (FIRInAppMessagingDisplayTriggerType)triggerType
28
- appData : (NSDictionary *)appData {
29
- if (self = [super init ]) {
30
- #pragma clang diagnostic push
31
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
32
- _campaignInfo = [[FIRInAppMessagingCampaignInfo alloc ] initWithMessageID: messageID
33
- campaignName: campaignName
34
- renderAsTestMessage: renderAsTestMessage];
35
- #pragma clang diagnostic pop
36
- _type = messageType;
37
- _triggerType = triggerType;
38
- _appData = [appData copy ];
39
- }
40
- return self;
41
- }
42
-
43
23
- (instancetype )initWithMessageID : (NSString *)messageID
44
24
campaignName : (NSString *)campaignName
45
25
renderAsTestMessage : (BOOL )renderAsTestMessage
@@ -51,11 +31,9 @@ - (instancetype)initWithMessageID:(NSString *)messageID
51
31
renderAsTestMessage: renderAsTestMessage];
52
32
_type = messageType;
53
33
_triggerType = triggerType;
54
- _appData = nil ;
55
34
}
56
35
return self;
57
36
}
58
-
59
37
@end
60
38
61
39
@implementation FIRInAppMessagingCardDisplay
@@ -76,36 +54,6 @@ - (void)setSecondaryActionURL:(NSURL *_Nullable)secondaryActionURL {
76
54
_secondaryActionURL = secondaryActionURL;
77
55
}
78
56
79
- - (instancetype )initWithMessageID : (NSString *)messageID
80
- campaignName : (NSString *)campaignName
81
- renderAsTestMessage : (BOOL )renderAsTestMessage
82
- triggerType : (FIRInAppMessagingDisplayTriggerType)triggerType
83
- titleText : (NSString *)title
84
- textColor : (UIColor *)textColor
85
- portraitImageData : (FIRInAppMessagingImageData *)portraitImageData
86
- backgroundColor : (UIColor *)backgroundColor
87
- primaryActionButton : (FIRInAppMessagingActionButton *)primaryActionButton
88
- primaryActionURL : (NSURL *)primaryActionURL
89
- appData : (NSDictionary *)appData {
90
- #pragma clang diagnostic push
91
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
92
- if (self = [super initWithMessageID: messageID
93
- campaignName: campaignName
94
- renderAsTestMessage: renderAsTestMessage
95
- messageType: FIRInAppMessagingDisplayMessageTypeCard
96
- triggerType: triggerType
97
- appData: appData]) {
98
- #pragma clang diagnostic pop
99
- _title = title;
100
- _textColor = textColor;
101
- _portraitImageData = portraitImageData;
102
- _displayBackgroundColor = backgroundColor;
103
- _primaryActionButton = primaryActionButton;
104
- _primaryActionURL = primaryActionURL;
105
- }
106
- return self;
107
- }
108
-
109
57
- (instancetype )initWithMessageID : (NSString *)messageID
110
58
campaignName : (NSString *)campaignName
111
59
renderAsTestMessage : (BOOL )renderAsTestMessage
@@ -122,8 +70,7 @@ - (instancetype)initWithMessageID:(NSString *)messageID
122
70
campaignName: campaignName
123
71
renderAsTestMessage: renderAsTestMessage
124
72
messageType: FIRInAppMessagingDisplayMessageTypeCard
125
- triggerType: triggerType
126
- appData: nil ]) {
73
+ triggerType: triggerType]) {
127
74
#pragma clang diagnostic pop
128
75
_title = title;
129
76
_textColor = textColor;
@@ -138,33 +85,6 @@ - (instancetype)initWithMessageID:(NSString *)messageID
138
85
@end
139
86
140
87
@implementation FIRInAppMessagingBannerDisplay
141
- - (instancetype )initWithMessageID : (NSString *)messageID
142
- campaignName : (NSString *)campaignName
143
- renderAsTestMessage : (BOOL )renderAsTestMessage
144
- triggerType : (FIRInAppMessagingDisplayTriggerType)triggerType
145
- titleText : (NSString *)title
146
- bodyText : (NSString *)bodyText
147
- textColor : (UIColor *)textColor
148
- backgroundColor : (UIColor *)backgroundColor
149
- imageData : (nullable FIRInAppMessagingImageData *)imageData
150
- actionURL : (nullable NSURL *)actionURL
151
- appData : (NSDictionary *)appData {
152
- if (self = [super initWithMessageID: messageID
153
- campaignName: campaignName
154
- renderAsTestMessage: renderAsTestMessage
155
- messageType: FIRInAppMessagingDisplayMessageTypeBanner
156
- triggerType: triggerType
157
- appData: appData]) {
158
- _title = title;
159
- _bodyText = bodyText;
160
- _textColor = textColor;
161
- _displayBackgroundColor = backgroundColor;
162
- _imageData = imageData;
163
- _actionURL = actionURL;
164
- }
165
- return self;
166
- }
167
-
168
88
- (instancetype )initWithMessageID : (NSString *)messageID
169
89
campaignName : (NSString *)campaignName
170
90
renderAsTestMessage : (BOOL )renderAsTestMessage
@@ -179,8 +99,7 @@ - (instancetype)initWithMessageID:(NSString *)messageID
179
99
campaignName: campaignName
180
100
renderAsTestMessage: renderAsTestMessage
181
101
messageType: FIRInAppMessagingDisplayMessageTypeBanner
182
- triggerType: triggerType
183
- appData: nil ]) {
102
+ triggerType: triggerType]) {
184
103
_title = title;
185
104
_bodyText = bodyText;
186
105
_textColor = textColor;
@@ -190,40 +109,10 @@ - (instancetype)initWithMessageID:(NSString *)messageID
190
109
}
191
110
return self;
192
111
}
193
-
194
112
@end
195
113
196
114
@implementation FIRInAppMessagingModalDisplay
197
115
198
- - (instancetype )initWithMessageID : (NSString *)messageID
199
- campaignName : (NSString *)campaignName
200
- renderAsTestMessage : (BOOL )renderAsTestMessage
201
- triggerType : (FIRInAppMessagingDisplayTriggerType)triggerType
202
- titleText : (NSString *)title
203
- bodyText : (NSString *)bodyText
204
- textColor : (UIColor *)textColor
205
- backgroundColor : (UIColor *)backgroundColor
206
- imageData : (nullable FIRInAppMessagingImageData *)imageData
207
- actionButton : (nullable FIRInAppMessagingActionButton *)actionButton
208
- actionURL : (nullable NSURL *)actionURL
209
- appData : (nullable NSDictionary *)appData {
210
- if (self = [super initWithMessageID: messageID
211
- campaignName: campaignName
212
- renderAsTestMessage: renderAsTestMessage
213
- messageType: FIRInAppMessagingDisplayMessageTypeModal
214
- triggerType: triggerType
215
- appData: appData]) {
216
- _title = title;
217
- _bodyText = bodyText;
218
- _textColor = textColor;
219
- _displayBackgroundColor = backgroundColor;
220
- _imageData = imageData;
221
- _actionButton = actionButton;
222
- _actionURL = actionURL;
223
- }
224
- return self;
225
- }
226
-
227
116
- (instancetype )initWithMessageID : (NSString *)messageID
228
117
campaignName : (NSString *)campaignName
229
118
renderAsTestMessage : (BOOL )renderAsTestMessage
@@ -239,8 +128,7 @@ - (instancetype)initWithMessageID:(NSString *)messageID
239
128
campaignName: campaignName
240
129
renderAsTestMessage: renderAsTestMessage
241
130
messageType: FIRInAppMessagingDisplayMessageTypeModal
242
- triggerType: triggerType
243
- appData: nil ]) {
131
+ triggerType: triggerType]) {
244
132
_title = title;
245
133
_bodyText = bodyText;
246
134
_textColor = textColor;
@@ -255,25 +143,6 @@ - (instancetype)initWithMessageID:(NSString *)messageID
255
143
256
144
@implementation FIRInAppMessagingImageOnlyDisplay
257
145
258
- - (instancetype )initWithMessageID : (NSString *)messageID
259
- campaignName : (NSString *)campaignName
260
- renderAsTestMessage : (BOOL )renderAsTestMessage
261
- triggerType : (FIRInAppMessagingDisplayTriggerType)triggerType
262
- imageData : (nullable FIRInAppMessagingImageData *)imageData
263
- actionURL : (nullable NSURL *)actionURL
264
- appData : (nullable NSDictionary *)appData {
265
- if (self = [super initWithMessageID: messageID
266
- campaignName: campaignName
267
- renderAsTestMessage: renderAsTestMessage
268
- messageType: FIRInAppMessagingDisplayMessageTypeModal
269
- triggerType: triggerType
270
- appData: appData]) {
271
- _imageData = imageData;
272
- _actionURL = actionURL;
273
- }
274
- return self;
275
- }
276
-
277
146
- (instancetype )initWithMessageID : (NSString *)messageID
278
147
campaignName : (NSString *)campaignName
279
148
renderAsTestMessage : (BOOL )renderAsTestMessage
@@ -284,8 +153,7 @@ - (instancetype)initWithMessageID:(NSString *)messageID
284
153
campaignName: campaignName
285
154
renderAsTestMessage: renderAsTestMessage
286
155
messageType: FIRInAppMessagingDisplayMessageTypeModal
287
- triggerType: triggerType
288
- appData: nil ]) {
156
+ triggerType: triggerType]) {
289
157
_imageData = imageData;
290
158
_actionURL = actionURL;
291
159
}
0 commit comments