File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
FirebaseMessaging/Sources Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,12 +112,12 @@ - (void)populateNotificationContent:(UNMutableNotificationContent *)content
112
112
113
113
// The `userInfo` property isn't available on newer versions of tvOS.
114
114
#if TARGET_OS_IOS || TARGET_OS_OSX || TARGET_OS_WATCH
115
- NSString *currentImageURL = content.userInfo [kPayloadOptionsName ][kPayloadOptionsImageURLName ];
116
- if (!currentImageURL) {
115
+ NSObject *currentImageURL = content.userInfo [kPayloadOptionsName ][kPayloadOptionsImageURLName ];
116
+ if (!currentImageURL || currentImageURL == [ NSNull null ] ) {
117
117
[self deliverNotification ];
118
118
return ;
119
119
}
120
- NSURL *attachmentURL = [NSURL URLWithString: currentImageURL];
120
+ NSURL *attachmentURL = [NSURL URLWithString: ( NSString *) currentImageURL];
121
121
if (attachmentURL) {
122
122
[self loadAttachmentForURL: attachmentURL
123
123
completionHandler: ^(UNNotificationAttachment *attachment) {
You can’t perform that action at this time.
0 commit comments