CloudKit和Web服务器

I want to save data from my iOS application (written in swift), and make a web application as well.

How would I be able to use CloudKit with Swift (client) and PHP/Javascript (server)?

Apple provide a Javascript API designed for use in a web page, and a web services API designed to be used from server application.

That being said it is also possible to use the Javascript API from a NodeJS command line application running on a server. Just like it is possible to use the web services API wrapping it in the programming language of your choice, since ultimately it is just web calls.

Subscription notifications are a rather tricky thing to setup and might not work yet on server command line apps.

For reference, in case you are interested in a PHP wrapper around the web services API, you can view my attempt here: https://github.com/malhal/CloudKit-PHP

Or if you want to try cutting edge Swift on Linux use: https://github.com/BennyKJohnson/OpenCloudKit

Here is a python wrapper: https://github.com/Longhanks/PyCloudKit