Note that there are some explanatory texts on larger screens.

plurals
  1. POMail compose bug on iPhone 3GS
    primarykey
    data
    text
    <p>I'm having a client testing an app on his device, he's using a iPhone 3GS with iOS 6.1.3. </p> <p>The app contains a simple sections where you can share information and such about the app. </p> <p>The problem he reports is that when the mail composer open up (presentViewController) the app the automatically closes the mail window right after it is displayed. So it goes up and then directly down again with the same result as if you would cancel the email.</p> <p>I have absolutely no idea why this it's only this singel tester that has reported the problem. It works great on the simulater iOS 6.1 and 7.0 and it works great on all other devices like iPhone 4, 4S and 5. Here's the code, maybe I'm doing something wrong that the 3GS can't compile:</p> <pre><code>#pragma mark - Share to mail // Share mail button - (IBAction)shareTo_mail_BtnClicked:(id)sender { [HUD showUIBlockingIndicatorWithText:@"Laddar mail"]; // Email Subject NSString *emailTitle = PROMO_TEXT; // Email Content NSString *messageBody = SHARED_INFO_TEXT; // If mail account can't bee found if(![MFMailComposeViewController canSendMail]) { [HUD hideUIBlockingIndicator]; // Alert the user that no mail account is connected to the phone UIAlertView *warningAlert = [[UIAlertView alloc] initWithTitle:@"Ett fel inträffade" message:@"Kontrollera att du har ett mail-konto anslutet till telefonen." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [warningAlert show]; return; }else { NSLog(@"Mail account found!"); } MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init]; mc.mailComposeDelegate = self; [mc setSubject:emailTitle]; [mc setMessageBody:messageBody isHTML:NO]; [self presentViewController:mc animated:YES completion:nil]; [HUD hideUIBlockingIndicator]; } // Mail did finish with result - (void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error { switch (result) { case MFMailComposeResultCancelled: NSLog(@"Mail cancelled"); break; case MFMailComposeResultSaved: NSLog(@"Mail saved"); break; case MFMailComposeResultSent: NSLog(@"Mail sent"); break; case MFMailComposeResultFailed: NSLog(@"Mail sent failure: %@", [error localizedDescription]); break; default: break; } // Close the Mail Interface [self dismissViewControllerAnimated:YES completion:nil]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload