diff --git a/ios/Shared/RCTAlertAction.swift b/ios/Shared/RCTAlertAction.swift index 98341313..f3488f51 100644 --- a/ios/Shared/RCTAlertAction.swift +++ b/ios/Shared/RCTAlertAction.swift @@ -28,7 +28,9 @@ class RCTAlertAction { self.title = ""; } - if let image = details["image"] as? NSString { + // The new architecture sends an unset image as an empty string, and + // UIImage(named: "") logs "Invalid asset name supplied" each time the menu is built. + if let image = details["image"] as? NSString, image.length > 0 { if #available(iOS 13.0, *) { self.image = UIImage(systemName: image as String) if let imageColor = details["imageColor"] { diff --git a/ios/Shared/RCTMenuItem.swift b/ios/Shared/RCTMenuItem.swift index bb6bb2b7..c586b612 100644 --- a/ios/Shared/RCTMenuItem.swift +++ b/ios/Shared/RCTMenuItem.swift @@ -27,7 +27,9 @@ class RCTMenuAction { self.identifier = UIAction.Identifier(rawValue: identifier as String); } - if let image = details["image"] as? NSString { + // The new architecture sends an unset image as an empty string, and + // UIImage(named: "") logs "Invalid asset name supplied" each time the menu is built. + if let image = details["image"] as? NSString, image.length > 0 { self.image = UIImage(systemName: image as String); if self.image === nil { self.image = UIImage(named: image as String)