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?

Rich
  • 7,348
  • 4
  • 34
  • 54
  • Hi Rich I am facing the same issues. Is there any workaround on xcode 5.1.1 ? – Vijay Sep 23 '14 at 11:15
  • @Vijay 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. – Rich Sep 29 '14 at 09:12
  • 3
    Actually, we have this issue still going on. Any idea? – Blitz Oct 02 '14 at 11:08
  • Same here, experiencing the issue on the latest iOS8 release. – Matthys Du Toit Oct 24 '14 at 10:01
  • @LordT If you can, upgrade to Xcode 6. Otherwise, the only thing I can suggest is logging it in Radar and crossing your fingers :(. – Rich Oct 24 '14 at 10:51
  • Any solution for those who want to compile with Xcode 5 and ios7 SDK? – Eliktz Nov 18 '14 at 13:54
  • @Eliktz 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. – Rich Nov 19 '14 at 11:53

1 Answers1

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.

Rich
  • 7,348
  • 4
  • 34
  • 54
  • 1
    Sorry but this bug is still alive and well, please see my post https://stackoverflow.com/questions/26545518/uidocumentinteractioncontroller-mailcompose-not-dismissing-in-ios8 – Matthys Du Toit Oct 24 '14 at 10:00
  • @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. – Rich Oct 24 '14 at 10:47