Affiliate Disclosure
If you buy through our links, we may get a commission. Read our ethics policy.

Apple adds server-to-server web service requests to CloudKit

Apple's CloudKit framework for automating apps' storage and retrieval of user data "in the cloud" has learned a new trick. Developers can now read and write data in their app's public database from a server-side process or script.

Apple launched CloudKit in 2014 to provide third party app developers with easy to use, secure, scalable iCloud data storage for their users. It used the technology to launch its own new Photos app, which automatically stores users' photos in an iCloud database that keeps images in sync between devices.

Last summer, the company added support for accessing CloudKit app data via JavaScript and Web Services, enabling developers to build websites that present the same data to users who sign in with their Apple ID. Apple used this feature to develop a iCloud web client for Notes, presenting a web view of the same content users see when they open their Notes app on iOS 9 or a Mac.

Source: Apple

Apple has now introduced the ability for developers to access their iCloud data via an automated server-to-server request, making it possible to build apps and web sites that not only store data, but can update, process or otherwise editor or modify user data stored on Apple's servers.

An app like Photos, for example, could offer cloud-based image processing, while an app like Notes could update users' documents with live data or perform scripted server-side editing (such as optical character recognition in images).

The new functionality makes CloudKit a more flexible and powerful tool for app and web developers who want to leverage cloud-based storage and processing without rolling their own server-side implementation, enabling them to focus on client app features instead.



8 Comments

🎄
Rayz2016 8 Years · 6957 comments

Okay, that's all well and good, but when is Apple going to {{ insert bizarre use case that affects only you out of a billion other users, and has nothing to do with the topic at hand }}

Example: Okay, iCloud server-side scripting is all well and good, but when is Apple going to put polka dots on the iPad cases so they're easier to see against my Paisley design duvet covers?

If I don't see polka dot iPad cases this year then I'll really have no choice but to buy a Surface machine. 

🎅
slprescott 10 Years · 759 comments

Related to this general topic of programmatic use of iCoud:

Is iCloud a general purpose storage repository, allowing app developers to define their own datasets and store them in iCloud? Or, are app developers limited to working with the data sets that Apple hosts on iCloud today (photos,notes, docs, etc.)?

Example: if I were writing an app to collect Climate Change data from sensors throughout the world, could I write the app to use iCloud as a central repository for that data?

🌟
nolamacguy 10 Years · 4750 comments

Related to this general topic of programmatic use of iCoud:

Is iCloud a general purpose storage repository, allowing app developers to define their own datasets and store them in iCloud? Or, are app developers limited to working with the data sets that Apple hosts on iCloud today (photos,notes, docs, etc.)?

Example: if I were writing an app to collect Climate Change data from sensors throughout the world, could I write the app to use iCloud as a central repository for that data?

yes, you can store your own data in the iCloud database, it's not limited to the media types you listed. 

🎄
dick applebaum 17 Years · 12525 comments

Related to this general topic of programmatic use of iCoud:

Is iCloud a general purpose storage repository, allowing app developers to define their own datasets and store them in iCloud? Or, are app developers limited to working with the data sets that Apple hosts on iCloud today (photos,notes, docs, etc.)?

Example: if I were writing an app to collect Climate Change data from sensors throughout the world, could I write the app to use iCloud as a central repository for that data?

yes, you can store your own data in the iCloud database, it's not limited to the media types you listed. 


Another look at this announcement:

http://9to5mac.com/2016/02/05/apple-adds-server-api-to-cloudkit-unlocking-new-developer-possibilities-for-the-icloud-service/
Here are some of the iCloud DB Field Types:


https://developer.apple.com/library/prerelease/ios/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/Types/Types.html#//apple_ref/doc/uid/TP40015240-CH3-SW2

The Bytes Field Type can contain anything ... It is interesting that this is the same as the base encoding used in Apples recently-acquired FoundationDB.Some of the fields contain dictionaries -- for example, the Location Field Type is quite a comprehensive Dictionary which contains:



When accessing records in your DB you can filter on many things such as whether the Location is within a specified distance of a specified location ...
Now, That's all in CloudKit!
Consider that IBM has an iOS SDK for Watson:

Introducing the new IBM Watson iOS SDK (beta)
Of course, it’s written entirely in Swift. The IBM Watson iOS SDK (beta) makes interacting with IBM Watson services quick and painless. 
The IBM Watson iOS SDK gives developers a Swift application programming interface (API) to simplify integration with many of the Watson Developer Cloud services, including the Watson DialogLanguage TranslationNatural Language ClassifierPersonality InsightsSpeech To TextText to SpeechAlchemy Language, or Alchemy Vision services – all of which are available today, and can now be integrated with just a few lines of code.

https://developer.ibm.com/swift/2015/12/18/introducing-the-new-watson-sdk-for-ios-beta/So, you can write an iOS app in Swift that exploits the capabilities of iCloud and Watson -- with some pretty comprehensive capabilities ...And that's just for starters -- this is worth a few minutes read:

https://developer.ibm.com/bluemix/2015/11/23/future-of-cognitive-computing/