I have a very simple test application that contains only the following code attached to 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 collection works without problems and works under iOS 7 (on the 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 displayed email sheet can never be fired. Clicking Submit does send the mail, but the email sheet continues to display. Clicking on βCancelβ and choosing to delete or save the draft have no effect.
The problem occurs when a test application is created using Xcode 5.1.1. However, if the application is built using Xcode 6 GM, then the problem does not occur, and the code works fine.
Is there something wrong with the code above?
source share