MFMessageComposeViewController presented without recipient field (iOS 11)

410 Views Asked by At

When I present MFMessageComposeViewController on an iOS 11 device it's presented mysteriously missing the recipient field. The same code works on an iPhone 6 running iOS 10.

enter image description here

1

There are 1 best solutions below

0
On

After a lot of messing around, I found that if I remove my project-wide hiding of the status bar in my info.plist: View controller-based status bar appearance: NO and instead manually prefer that the status bar is hidden in each of my own view controllers I got the correct behavior. This seems like a bug to me so I plan on filing a radar.

You need to set the below in each of your UIViewController subclasses if you want to retain the status bar behavior:

override var prefersStatusBarHidden: Bool {
    return true
}