Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS 6 MFMailComposeViewController: Only support RGBA or the White color space, this method is a hack
    primarykey
    data
    text
    <p>really, really odd error</p> <p>I have an app that was working fine in iOS5/.1, now I'm having a few transition problems with iOS6 but this one is confusing. </p> <p>I have some code that launches a mail composer, and since iOS 6 it causes a crash with this error:</p> <p><strong>* Assertion failure in -[UICGColor encodeWithCoder:], /SourceCache/UIKit/UIKit-2372/UIColor.m:1191 2012-09-26 02:14:38.044 MyCQs Medical[2126:1b03] *</strong> Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only support RGBA or the White color space, this method is a hack.'</p> <p>Any suggestions? Through trial and error commenting out various lines it seems to be the alloc/init line that causes the error, though when all the lines are uncommented, all of the NSLogs are executed, including "present" which indicates that everything that should be called, has been. the app crashes before the mailcomposer is presented on screen, I'd really appreciate any advice here</p> <pre><code> if (indexPath.row == 3) { if([MFMailComposeViewController canSendMail]){ mailComposer = [[MFMailComposeViewController alloc]init]; NSLog(@"Alloc, init"); mailComposer.mailComposeDelegate = self; NSLog(@"Set delegate"); NSArray *toArray = [[NSArray alloc]initWithObjects:@"john@doe.com", nil]; NSLog(@"To array"); [mailComposer setToRecipients:toArray]; NSLog(@"To recipients"); [mailComposer setSubject:@"Message from a MyCQs user!"]; NSLog(@"Subject"); NSLog(@"About to present mail composer"); [[mailComposer navigationBar] setTintColor:[UIColor blackColor]]; [self presentModalViewController:mailComposer animated:YES]; NSLog(@"Present"); } } </code></pre>
    singulars
    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.
 

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