Can you use CloudKit to access a user's contacts from a React/Django project? - contacts

I have a react/django project and we need to somehow access the contacts of our users. I was told to look into CloudKit's API in order to take care of this, however there seems to be no real information in their docs or in my Google searches on using this API to specifically access a user's contacts.
I am open to other suggestions as well. The ideal would be to access their contacts initially and then every so often compare their contacts to our list to see if any have been added.

You cannot access this data from a third-party app via a CloudKit API.
While Apple does store a user's contacts on CloudKit, they do so under these conditions:
The user opts-in to sync their contacts with iCloud (this isn't required for iOS users; they can be on-device only, or sync with another service like Google).
The contacts Apple stores on CloudKit are in a container that is private to Apple.
When you use CloudKit as a developer, you are creating a container for your app. You can only access data in containers you create.
Here's what you would have to do:
Create an iOS or macOS app that requests/manages access to the user's contacts.
Add the Contacts entitlement to your target in Xcode: Signing & Capabilities > App Sandbox > App Data > Contacts
Use Apple's Contacts framework to access contact data using Swift in your iOS/macOS app.
Once you have the data in your Swift app, communicate with your Django API to do what you need to.
One last thing. If you choose to go this route, you will have to reveal in your app privacy disclosures (in App Store Connect) what you are doing with the users' data.

Related

Sync contacts to iCloud groups via API

Does Apple offer any API (that doesn't involve an iOS app) that allows contacts to be synced into iCloud and placed into specific groups?
Have a look at Reincubate recloud API:
https://reincubate.com/ricloud-api/

CloudKit private database developer access

I'm wondering if it's possible for me to access a user's private database on the Development schema as the app developer. I'm just testing locally on my devices, but I need to be able to inspect the records of devices not associated with my developer account for debugging purposes.
Thanks so much!
The only way to do this is to sign in to the CloudKit Dashboard with that user's Apple ID. Their data is otherwise private.
Alternatively, you could create a mechanism in your app that pushes a user's data to the Public database of your app for help/troubleshooting purposes. That data is visible to you there as the app developer and you could download and inspect it.

How does Instagram check if the users contact are using the application?

In the Instagram app you are able to sychronize your contacts and than the app shows which of them use the application. They are probably using the Contacts framework. Are they fetching the numbers of all contacts and than comparing them in their database?
Yes, once you allow to give access to your contacts. Step #1 is to sync your contacts with their server and they checkout in their database, if any of your contact already using the app (registered to app with that mobile number), they show it for you to better getting in touch with them, otherwise shows you an option to invite them to get started.

Interface to the AppStore?

I have a requirement that a client wants to be able to allow users to download apps from within an app (which I will call the main app), based on a user's score (when a user achieves a certain score, they can have an app). We would like to do this without linking to the app store directly, so that users of the main app can be granted access to another app.
So, is there a way to interface to the app store while hiding the official app store from the user? I have seen similar functionality in Passbook, but not exactly what we are looking for. Any ideas? Thanks! Viv
Possible duplicate
How to link to apps on the app store
If your app is in Apple appstore, you can use itms:// service to install apps directly. Check the above link that tells awesome stuff about the apple app store itms services.

How can I know app information from appstore programmatically

I am developing one application. In that I want to know some X application is available in AppStore or not programmatically. So please tell me how can I access and get the information from app store programmatically.
You could use for that purposes iTunes Search API. There are a lof of different filters by which you could find apps from iOS App Store and Mac App Store.
The Search API allows you to place search fields in your website to search for content within the iTunes Store, App Store, iBookstore and Mac App Store. You can search for a variety of content; including apps, ebooks, movies, podcasts, music, music videos, audiobooks, and TV shows. You can also call an ID-based lookup request to create mappings between your content library and the digital catalog. Terms and conditions apply.
The Affiliate Program allows you to earn a commission on qualifying revenue generated by clicks initiated from your website or app into the iTunes Store, App Store, iBookstore, and Mac App Store. For more information on the Affiliate Program, see http://www.apple.com/itunes/affiliates.