CNContactViewController对于UnknownContact不可用,破坏了接口 [英] CNContactViewController forUnknownContact unusable, destroys interface

查看:89
本文介绍了CNContactViewController对于UnknownContact不可用,破坏了接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[似乎已在iOS 10中修复!] 因此,以下内容仅适用于iOS 9 ...

[Appears to be fixed in iOS 10!] So what follows applies to iOS 9 only...

我一直在尝试使用Apple的新Contacts框架,并且在CNContactViewController的三种形式之一中发现了一个巨大的错误.它破坏了周围的界面,使您的应用变得无用;用户被卡住了.

I have been experimenting with Apple's new Contacts framework, and I've found a huge bug in one of the three forms of CNContactViewController. It destroys the surrounding interface so that your app becomes useless; the user is stuck.

为使此错误更易于查看,我在 https://github.com/上发布了一个示例项目. mattneub/CNContactViewControllerBug .

To make this bug easy to see, I've posted an example project at https://github.com/mattneub/CNContactViewControllerBug.

要进行实验,请运行项目并执行以下步骤:

To experiment, run the project and do the following steps:

  1. 点击按钮(未知人员").

  1. Tap the button (Unknown Person).

根据要求授予访问权限.

Grant access if requested.

在我们的导航界面中会显示部分联系人(请注意顶部的后退"按钮).

You are shown the partial contact, in our navigation interface (note the Back button at the top).

点击添加到现有联系人.联系人选择器出现.

Tap Add to Existing Contact. The contact picker appears.

点击取消.您实际上可以从此处执行什么操作都没有关系,但是点击取消"是最简单的方法,并且是解决该错误的最快方法.

Tap Cancel. It doesn't actually matter what you do from here, but tapping Cancel is simplest and is the fastest way to reach the bug.

我们现在回到了部分联系人,但是导航界面不见了.用户无法退出此界面. 该应用已关闭.

We are now back at the partial contact, but the navigation interface is gone. The user has no way to escape from this interface. The app is hosed.

请澄清一下,这是您需要采取的步骤的屏幕截图:

Just to clarify, here are screenshots of the steps you need to take:

点击添加到现有联系人以查看此内容:

Tap Add to Existing Contact to see this:

点击取消"以查看此内容;观察到它与第一个屏幕截图相同,但是导航栏消失了:

Tap Cancel to see this; observe that it is the same as the first screen shot, but the navigation bar is gone:

我已经尝试了多种方法来解决此错误,但似乎没有办法.据我所知,此窗口是由进程外"框架呈现的,而不是您的应用程序的一部分.你无法摆脱它.

I've tried many ways to work around this bug, but there seems to be no way. As far as I can tell, this window is being presented by the framework "out-of-process" and is not part of your app. You can't get rid of it.

那是什么问题?我想是这样的:任何人都可以向我展示一种使此视图控制器(以这种形式)可用的方法吗?有没有我没有找到的解决方法?

So what's the question? I guess it's this: can anyone show me a way to make this view controller (in this form) usable? Is there a workaround I haven't found?

编辑:此错误出现在iOS 9.0中,并且仍然存在于iOS 9.1中.在评论中,@ SergeySkopus报告说,切换到不建议使用的通讯簿框架没有帮助;该错误位于某个地方的底层结构中.

EDIT This bug appeared in iOS 9.0 and is still present in iOS 9.1. In a comment, @SergeySkopus reports that switching to the deprecated Address Book framework doesn't help; the bug is in the underlying structure somewhere.

推荐答案

很明显,这是一个错误,因为Apple最终通过声明我的错误报告来回应我的错误报告.

Evidently this is a bug, since Apple has finally responded to my bug report by declaring it a duplicate.

这篇关于CNContactViewController对于UnknownContact不可用,破坏了接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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