I was finally able to repro the problem in a minimal demo app, and have submitted the demo app along with a bug report. The report ID is FB15182286
Post
Replies
Boosts
Views
Activity
I found it! Please let me know if there's a better way to do this. If I don't call this method, it fixes MFMailComposeViewController and the mail dialog accepts input again. Unfortunately, now my main app window only takes up one corner of the screen on a 12.9 inch iPad.
-(void) changeScreenScaling
{
/*
Scaling up for iPads that are not 9.7 1024x768.
See also:
- https://forums.developer.apple.com/thread/36336
- https://forums.developer.apple.com/thread/78680
- https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/launch-screen/
- https://developer.apple.com/ios/submit/
Note that the resolutions NOT mentioned in the Info.plist UILaunchImageMinimumOSVersion are automatically
scaled to 9.7" (1024x768) by the iOS. That usually works well, but for example the 11" has different aspect
ratio so it doesn't really work, an the 2018 12.9" has round corners/safe areas, so that doesn't scale well
either.
I'd leave them all to auto-scale anyway, but Apple mandated the proper 12.9" support starting March 2019.
So. Right now info.plist references 1024x768 and 1366x1024 (12.9" device), that way everything is
auto-scaled to 9.7", except for the 12.9" that we now handle ourselves (by doing the same scaling further
down this function).
The 11" on the other hand is not mandated yet, so we're leaving it out. It's a real pain because a different
aspect ratio would require change the control layout across the entire app.
As support for more resolutions is added, we be adding them to Info.plist UILaunchImageMinimumOSVersion
*/
CGSize screenSize = [UIScreen mainScreen].bounds.size;
CGFloat screenLength = MAX(screenSize.height, screenSize.width);
CGFloat scale = screenLength / 1024;
if (scale!=1)
{
CGAffineTransform tr = CGAffineTransformMakeScale(scale, scale);
self.window.transform = tr;
}
}
I would have opened a bug report already, except that I can only repo the problem in our main app. Everything works just as it's supposed to in my sample project.
I've confirmed I can repro the problem with our main app on an iPad Pro 12.9in 5th gen (Model MHNF3LL/A), after upgrading it to iOS 18.0. I tried deleting and reinstalling the app, and upgrading to iOS beta 18.1, but the problem remained so I did a refresh, wiped the iPad clean and reinstalled non-beta 18.0 (build 22A3354), but the problem still remains on that iPad.
Since then we've upgraded an older iPad (~10in, 8th gen, model MYL92LL/A) to iOS 18 (build 22A3354) and that seems to work fine with our main app. So it seems like it's somehow tied to either the newer hardware, or the larger-format screen. I believe there is some layout code in the app that treats larger format screens differently, so that's the next thing for me to look at.
One more bit of information: when I comment out these lines (removing everything I can see that changes the MFMailComposeViewController's appearance at all) our app still has the same problem. So... where else might I look?
[mailComposer setToRecipients:mfrEmail];
[mailComposer setToRecipients:mfrEmail];