【发布时间】:2014-10-01 06:33:24
【问题描述】:
在 iOS8 上,我使用 UIActivityViewController 将 UIImage 共享到 Facebook/Twitter 等。它似乎工作正常,但今天在我的 iPad 上运行代码时突然开始崩溃。但是,它仍然可以在模拟器中按预期工作。
我的代码:
UIActivityViewController *controller =
[[UIActivityViewController alloc]
initWithActivityItems:@[text, url, myImage]
applicationActivities:nil];
[self presentViewController:controller animated:YES completion:nil];
在崩溃时,Xcode 吐出:
发现的扩展:{( {id = com.apple.share.Facebook.post}, {id = com.apple.share.Twitter.post}, {id = com.apple.share.TencentWeibo.post}, {id = com.apple.share.SinaWeibo.post} )} 用于属性:{ NSExtensionActivationRule = { 扩展项 = ( { 附件 = ( { 注册类型标识符 = ( “公众形象” ); }, { 注册类型标识符 = ( “public.plain-text” ); }, { 注册类型标识符 = ( “公共.url” ); } ); } ); }; NSExtensionPointName = ( "com.apple.share-services", "com.apple.ui-services", “com.apple.services” ); 2014-08-07 21:38:59.208 collageTest[279:11021] LaunchServices:invalidationHandler 称为 2014-08-07 21:38:59.212 collageTest[279:11016] 发现的扩展:{( {id = com.apple.share.Flickr.post}, {id = com.apple.mobileslideshow.StreamShareService}, {id = com.apple.share.Twitter.post}, {id = com.apple.share.Facebook.post}, {id = com.apple.share.Vimeo.post}, {id = com.apple.share.SinaWeibo.post}, {id = com.apple.share.TencentWeibo.post} )} 属性:{ NSExtensionPointName = "com.apple.share-services"; 2014-08-07 21:38:59.216 collageTest[279:11021] LaunchServices: 调用了 invalidationHandler
【问题讨论】:
标签: ios8 uiactivityviewcontroller