当从 UIActivityViewController 调用时,WhatsApp 在选择收件人后冻结 [英] When Called From UIActivityViewController WhatsApp Freezes After a Recipient Is Selected

查看:18
本文介绍了当从 UIActivityViewController 调用时,WhatsApp 在选择收件人后冻结的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 UIActivityViewController 来分享我的 iOS 应用.

I am using UIActivityViewController to share my iOS app.

当从选项列表中选择 WhatsApp 时,它会将我带到正确的屏幕.我可以四处走动,所有按钮都可以使用.

When WhatsApp is selected from the list of options, it takes me to the proper screen. I can move around, and all the buttons work.

但是,一旦我选择了收件人,WhatsApp 就会冻结.

However, once I select a recipient, WhatsApp freezes.

有人知道这是怎么回事吗?有没有人遇到过这个错误?

Does anyone know what's going on here? Has anyone encountered this bug before?

编辑(添加代码)

这是我用来调用 UIActivityViewController 的代码:

Here's the code I'm using to call the UIActivityViewController:

- (void) sharePressed:(UIBarButtonItem *)sender {

NSString* shareText = @"Hello World!";

UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:@[shareText] applicationActivities:nil];

[self presentViewController:controller animated:YES completion:nil];


NSLog(@"This method ran: sharePressed");
}

它非常基础.它适用于除 WhatsApp 之外的所有内容.

It's as basic as it gets. It works for everything except WhatsApp.

推荐答案

我认为该错误实际上是 whatsapp 或 UIActivityViewController 的内部问题,因为我的其他应用程序使用了 UIActivityViewController 昨晚无法在 WhatsApp 上分享.不过今天早上,即使我没有更改代码中的任何内容,但一切正常!

I think the error was actually an internal problem with either whatsapp or UIActivityViewController because my other apps that use UIActivityViewController couldn't share on whatsApp last night. This morning though, even though I didn't change anything in my code, everything works perfectly!

这篇关于当从 UIActivityViewController 调用时,WhatsApp 在选择收件人后冻结的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆