3

I get this in the Xcode console when tapping on my App's share via Message: The Mail one works perfectly fine however. The Message controller never displays obviously, which makes this annoying in a shipped app.

Remote compose controller timed out (YES)!

Is this an Apple bug? It only started to happen today.

Code:

if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0"))
{
    NSString *textToShare = [NSString stringWithFormat:@"test"];
    NSArray *activityItems = [[NSArray alloc]  initWithObjects:textToShare, nil];
    UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems
                                                  applicationActivities:nil];

    activityVC.completionHandler = ^(NSString *activityType, BOOL completed)
    {
        NSLog(@" activityType: %@", activityType);
        NSLog(@" completed: %i", completed);
    };

    if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    {
        self.popover = [[UIPopoverController alloc] initWithContentViewController:activityVC];

        CGRect rect = [[UIScreen mainScreen] bounds];

        [self.popover
                    presentPopoverFromRect:rect inView:self.view permittedArrowDirections:0 animated:YES];
    }
    else
    {
        [self presentViewController:activityVC animated:YES completion:nil];
    }
}
Rob
  • 415,655
  • 72
  • 787
  • 1,044
klcjr89
  • 5,862
  • 10
  • 58
  • 91
  • Updated question above with the code I'm using. – klcjr89 Dec 03 '12 at 05:24
  • I'm still having the bug after your recommendations. See my updated code in my question above. – klcjr89 Dec 03 '12 at 14:34
  • I am customizing my table view, but i'm not using the 'appearance' UI. I'm stumped! – klcjr89 Dec 03 '12 at 20:12
  • If it makes you feel better, you're not alone. See http://stackoverflow.com/questions/13259047/remote-view-controller-crashes-in-ios6-on-iphone4-when-opening-an-sms-view or http://stackoverflow.com/questions/13575192/presenting-mfmessagecomposeviewcontroller-broken-in-ios-6 – Rob Dec 03 '12 at 21:02
  • Thanks Rob, rebooting my iPhone 5 solved the problem! Hope iOS 6.1 squashes these bugs. – klcjr89 Dec 03 '12 at 21:44

1 Answers1

3

There's nothing wrong with this code. It works without problem on my devices. You might want to try rebooting your device or trying on another device.

The few isolated references that I found to this problem were related to beta versions of iOS 6 or other people suffering from the occasional crash, so perhaps we're just slowing working through the kinks in this messaging UI.

Rob
  • 415,655
  • 72
  • 787
  • 1,044