UIActivityViewController 报告“远程编写控制器超时"; [英] UIActivityViewController reports "Remote compose controller timed out"
问题描述
当我通过消息点击我的应用程序共享时,我在 Xcode 控制台中得到了这个:但是,邮件工作得很好.Message 控制器从不明显显示,这使得它在已发布的应用中很烦人.
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)!
这是苹果的bug吗?它今天才开始发生.
Is this an Apple bug? It only started to happen today.
代码:
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];
}
}
推荐答案
这段代码没有任何问题.它在我的设备上没有问题.您可能想尝试重新启动您的设备或在另一台设备上尝试.
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.
我发现的少数与此问题相关的孤立引用与 iOS 6 的 Beta 版或其他遭受偶尔崩溃的人有关,所以也许我们只是在减缓此消息传递 UI 中的问题.
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.
这篇关于UIActivityViewController 报告“远程编写控制器超时";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!