Swift 5: messageKey = "attributedMessage" titleKey = "attributetTitle" alert.setValue( NSAttributedString( string: "Your alert message text", attributes: [ .foregroundColor : .red ] ), forKey: messageKey )