当我通过消息点击我的应用程序的共享时,我在 Xcode 控制台中得到了这个:但是,邮件工作得很好。Message 控制器从不明显显示,这在已发布的应用程序中很烦人。
Remote compose controller timed out (YES)!
这是苹果的错误吗?它今天才开始发生。
代码:
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];
}
}