In iOS 15.0 you can simply use the new configuration API to specify the image placement, in this case: trailing. If you need to support earlier versions, another way of doing this could be by appending an NSTextAttachment (available since iOS 7.0) to an NSMutableAttributedString and use that as the button's title.
It is a bad idea to use the semantic content attribute for this, as suggested in other responses, and force it to right-to-left. That API is not meant for that use-case and can have unintended consequences. In this case, it breaks accessibility, especially navigation using VoiceOver. The reason is that if you are swiping to the right to get to the next element in the screen, and that element is forced to be right-to-left, VoiceOver will also reverse and if you swipe right again it will go to the previous element instead of the next one. If you swipe right again, you are back to the right-to-left element. And so on, and so on. The user gets stuck in a focus trap and it can be very confusing.
So the code could look something like this:
if #available(iOS 15.0, *) {
var configuration = UIButton.Configuration.plain()
let image = UIImage(systemName: "applelogo")
configuration.image = image
configuration.imagePadding = 8.0
configuration.imagePlacement = .trailing
button.configuration = configuration
button.setTitle("Apple", for: .normal)
} else {
let buttonTitle = "Apple"
let titleAttributedString = NSMutableAttributedString(string: buttonTitle + " ")
let textAttachment = NSTextAttachment(image: UIImage(systemName: "applelogo")!)
let textAttachmentAttributedString = NSAttributedString(attachment: textAttachment)
titleAttributedString.append(textAttachmentAttributedString)
button.setAttributedTitle(titleAttributedString, for: .normal)
// When using NSTextAttachment, configure an accessibility label manually either
// replacing it for something meaningful or removing the attachment from it
// (whatever makes sense), otherwise, VoiceOver will announce the name of the
// SF symbol or "Atachement.png, File" when using an image
button.accessibilityLabel = buttonTitle
}