@@ -83,8 +83,10 @@ - (void)testMessageWithFutureStartTime {
83
83
XCTAssertTrue ([FIRMessagingContextManagerService handleContextManagerMessage: message]);
84
84
85
85
XCTAssertEqual (self.scheduledLocalNotifications .count , 1 );
86
-
86
+ #pragma clang diagnostic push
87
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
87
88
UILocalNotification *notification = [self .scheduledLocalNotifications firstObject ];
89
+ #pragma clang diagnostic pop
88
90
NSDate *date = [self .dateFormatter dateFromString: startTimeString];
89
91
XCTAssertEqual ([notification.fireDate compare: date], NSOrderedSame);
90
92
#endif
@@ -134,7 +136,10 @@ - (void)testMessageWithPastStartAndFutureEndTime {
134
136
XCTAssertTrue ([FIRMessagingContextManagerService handleContextManagerMessage: message]);
135
137
136
138
XCTAssertEqual (self.scheduledLocalNotifications .count , 1 );
139
+ #pragma clang diagnostic push
140
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
137
141
UILocalNotification *notification = [self .scheduledLocalNotifications firstObject ];
142
+ #pragma clang diagnostic pop
138
143
// schedule notification after start date
139
144
XCTAssertEqual ([notification.fireDate compare: startDate], NSOrderedDescending);
140
145
// schedule notification after end date
@@ -163,7 +168,10 @@ - (void)testTimedNotificationsUserInfo {
163
168
XCTAssertTrue ([FIRMessagingContextManagerService handleContextManagerMessage: message]);
164
169
165
170
XCTAssertEqual (self.scheduledLocalNotifications .count , 1 );
171
+ #pragma clang diagnostic push
172
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
166
173
UILocalNotification *notification = [self .scheduledLocalNotifications firstObject ];
174
+ #pragma clang diagnostic pop
167
175
XCTAssertEqualObjects (notification.userInfo [messageIdentifierKey], messageIdentifier);
168
176
XCTAssertEqualObjects (notification.userInfo [customDataKey], customData);
169
177
#endif
@@ -175,6 +183,8 @@ - (void)testTimedNotificationsUserInfo {
175
183
- (void )mockSchedulingLocalNotifications {
176
184
#if TARGET_OS_IOS
177
185
id mockApplication = OCMPartialMock ([UIApplication sharedApplication ]);
186
+ #pragma clang diagnostic push
187
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
178
188
__block UILocalNotification *notificationToSchedule;
179
189
[[[mockApplication stub ]
180
190
andDo: ^(NSInvocation *invocation) {
@@ -189,6 +199,7 @@ - (void)mockSchedulingLocalNotifications {
189
199
}
190
200
return NO ;
191
201
}]];
202
+ #pragma clang diagnostic pop
192
203
#endif
193
204
}
194
205
0 commit comments