在开发期间在CloudKit中测试NSUserDeletedZone [英] Test NSUserDeletedZone in CloudKit While In Development

查看:90
本文介绍了在开发期间在CloudKit中测试NSUserDeletedZone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您的关注。我希望有人能提供帮助,在这里我不知所措。

Thanks for taking a look. I'm hoping someone can help, I am a bit at my wits end here.

我在生产环境中有一个应用程序,当前无法处理CloudKit的CKErrorUserDeletedZone错误。当用户从其iPhone / iPad上的设置-> iCloud区域或Mac上的系统偏好设置-> iCloud区域删除容器数据时,会发生这种情况。

I have an application in production that currently does not handle CloudKit's CKErrorUserDeletedZone error. This happens when a user deletes the container data from the Settings->iCloud area on their iPhone/iPad, or System Preferences->iCloud area on their Mac.

我遇到的问题是从Xcode运行时无法测试此方案,因为它使用的是Development而不是Production服务器。 设置/系统偏好设置区域中仅显示生产数据库。这意味着我无法在Xcode中进行调试的同时重新创建场景。在生产中进行测试的唯一方法是导出应用程序,但遗憾的是,完成后无法从Xcode进行调试。

The problem I am having is I am not able to test this scenario while running from Xcode since it uses the Development not Production servers. Only production databases show up in the Settings/System Preferences areas. This means I cannot recreate the scenario while able to debug in Xcode. The only way to test in production is to export the application and sadly there's no way to debug from Xcode when that's done.

是否有任何方法可以对此进行测试或我在这里完全失明了吗?我很乐意在生产中处理它,但是拥有大量用户,当当前只有少数用户遇到问题时,我宁愿不做任何事情。

Is there any way to potentially test this or am I flying completely blind here? I'd happily just deal with it in production but with a very large number of users I'd rather not make a mess of things when only a few users are encountering issues at the moment.

谢谢!

推荐答案

您可以配置调试版本以供使用通过将以下条目添加到您的.entitlements文件中来生产生产容器:

You can configure your debug build to use the production container by adding the following entry to your .entitlements file:

<key>com.apple.developer.icloud-container-environment</key>
<string>Production</string>

在准备提交应用程序时,Xcode会做同样的事情。

Xcode does the same thing when preparing your app for submission.

这篇关于在开发期间在CloudKit中测试NSUserDeletedZone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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