简体   繁体   English

如何询问用户是否希望在CloudKit JS中被发现?

[英]How to ask user if they want to be discoverable in CloudKit JS?

I have watched the WWDC 2015 videos on CloudKit JS and have tried to find a way to ask the user of my web app if they would like to be discoverable so I can have access to their first and last name. 我已经在CloudKit JS上观看了WWDC 2015视频,并试图找到一种方法来询问我的Web应用程序的用户是否希望被发现,以便我可以访问他们的名字和姓氏。 It seems that the userInfo.isDiscoverable property needs to be set to true in order for this to happen. 似乎需要将userInfo.isDiscoverable属性设置为true才能使此操作发生。 I have tried many things to make this happen, but I have had no success and Apple's does not give an example of this on their early documentation. 我已经尝试了很多方法来实现这一目标,但是我没有成功,Apple的早期文档中也没有给出这样的例子。 I know iOS has a standard way to do this, but I haven't been able to find that for JS. 我知道iOS有执行此操作的标准方法,但我无法为JS找到它。 Has anyone been able to do this correctly? 有人能正确做到这一点吗? Thanks 谢谢

You can configure CloudKit to ask the user if they want to be discoverable during sign in. 您可以配置CloudKit来询问用户是否希望在登录过程中被发现。

  1. Log in to the CloudKit Dashboard at https://icloud.developer.apple.com/dashboard . 通过https://icloud.developer.apple.com/dashboard登录到CloudKit仪表板。
  2. Go to the 'API Access' section. 转到“ API访问权限”部分。
  3. Select your API token and check 'Request user discoverability at sign in'. 选择您的API令牌,然后选中“在登录时请求用户可发现性”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM