Search code examples
javascriptioscloudkitdiscovery

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. It seems that the userInfo.isDiscoverable property needs to be set to true in order for this to happen. 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. I know iOS has a standard way to do this, but I haven't been able to find that for JS. Has anyone been able to do this correctly? Thanks


Solution

  • You can configure CloudKit to ask the user if they want to be discoverable during sign in.

    1. Log in to the CloudKit Dashboard at https://icloud.developer.apple.com/dashboard.
    2. Go to the 'API Access' section.
    3. Select your API token and check 'Request user discoverability at sign in'.