Cannot dismiss email sheet invoked from UIDocumentInteractionController in iOS 8
Asked Answered
L

1

6

I've got a very simple test app which contains nothing but the following code, attached to a UIButton:

- (IBAction)buttonUp:(id)sender {

  // Build file path
  NSString* filePath = [[NSBundle mainBundle] pathForResource:@"testfile"
                                                       ofType:@"txt"];

  NSURL *url = [NSURL fileURLWithPath:filePath];

  m_interactionController = [UIDocumentInteractionController interactionControllerWithURL:url];

  [m_interactionController presentOptionsMenuFromRect:CGRectMake(200, 200, 100, 100)
                                               inView:[self view]
                                             animated:YES];
}

This builds with no issues, and running under iOS 7 (on a 4th generation iPad: A1458), this code works fine.

The problem is that, in iOS 8 Beta 5, if the user selects "Mail" from the UIDocumentInteractionController, then the email sheet that is displayed can never be dismissed. Tapping Send does indeed send the mail, but the email sheet continues to be displayed. Tapping on Cancel and electing to either delete or save the draft has no effect.

The problem occurs when the test app is built using Xcode 5.1.1. However, if the app is built with the Xcode 6 GM, then problem does not occur, and the code works fine.

Is there anything wrong with the code above?

Lunette answered 1/9, 2014 at 14:6 Comment(7)
Hi Rich I am facing the same issues. Is there any workaround on xcode 5.1.1 ?Alguire
@Alguire Not aware of any workaround other than to rebuild with Xcode 6, but, for us at least, the problem does not occur in the release version of iOS 8.Lunette
Actually, we have this issue still going on. Any idea?Shakira
Same here, experiencing the issue on the latest iOS8 release.Konya
@LordT If you can, upgrade to Xcode 6. Otherwise, the only thing I can suggest is logging it in Radar and crossing your fingers :(.Lunette
Any solution for those who want to compile with Xcode 5 and ios7 SDK?Paperweight
@Paperweight I don't believe there is one. Your should log it in Radar, as the more people that do so the more likely Apple will fix it, but I wouldn't hold your breath.Lunette
L
0

For us, the problem did not occur in the final released version of iOS 8.

I had posted it to Radar, and it was closed as a duplicate (with the status of the duplicate being "Open"), so presumably it was a bug in the prerelease versions of iOS 8.

Lunette answered 29/9, 2014 at 9:10 Comment(2)
Sorry but this bug is still alive and well, please see my post #26546018Konya
@MatthysDuToit Well, for us there were two solutions which both fixed the problem. Upgrading to the release iOS 8 fixed it, but so did upgrading to Xcode 6. If the former's not working for you, I'd try the latter.Lunette

© 2022 - 2024 — McMap. All rights reserved.