问题描述
你不能上传任何代码以在Apple的服务器上运行?
You cannot upload any code to run on Apple's servers?
我听说它与Google App Engine和其他云计算平台进行了比较,但无法运行自己的代码,是不是整个事情都非常有限而且没有真正的可比性?
I've heard it being compared to Google App Engine and other cloud computing platforms, but without the ability to run your own code, isn't the whole thing pretty limited and not really comparable?
例如,如果我想构建一个新闻应用程序,定期推送用户所在主题的故事感兴趣的是,这不能仅仅使用CloudKit来完成,因为我需要在服务器上安排作业和数据处理。
For example, if I want to build a news app which periodically pushes stories on topics that the user is interested, then this can't be done just using CloudKit because I would need scheduled jobs and data processing on the server.
有什么想法吗?
推荐答案
服务器端
正如您所说,CloudKit不允许服务器端代码。
Server-side
As you said CloudKit doesn't allow server-side code.
但有可能。
您不希望每天连接到iCloud Dashboard以执行推送添加记录。这里的一个解决方案是在mac服务器上编写应用程序(我想mac mini,因为服务器将更受CloudKit欢迎),添加新的每日
CKRecord
每天。
You don't want to connect to the iCloud Dashboard everyday in order to perform the push by adding a record. One solution here is to code an app on a mac server (I guess mac mini as server will become more popular with CloudKit) that add a new Daily
CKRecord
every day.
订阅概念是客户注册的具体更新。例如,您可以创建一个名为 Daily
的记录类型,并让用户注册它。您应该查看和WWDC14视频(即使订阅不详细,这是一个很好的起点)。
Subscriptions concept is that the client registers for specific updates. You can create a record type called Daily
for instance and make users register to it. You should check the Apple documentation and WWDC14 videos (even if Subscriptions are not detailed, it's a good start point).
好处是推送通知与订阅概念相关联。所以基本上你说:发送我的通知为每个新的 CKRecord
类型每日
已添加。
The good thing is push notifications are linked with the subscription concept. So basically you say: Send my a notification for each new CKRecord
of type Daily
added.
使用CloudKit有什么意义(vs Parse和其他?)
What is the point for using CloudKit (vs Parse and other?)
- 价格:CloudKit定价非常不错
- 准备好了:在XCode内点击2次就可以了
- 用户一致性:您通过其iCloud帐户获得所有设备的免费用户登录。拥有非常好的隐私系统。你可以与智能系统建立关系。
但是:
- 你坚持使用Apple平台。我们甚至不知道我们是否可以导出数据..
- 目前仅以数据为中心(无服务器端代码)
- CloudKit仪表板太有限了
CloudKit仍然很新。在WWDC上,一些背后的人让我明白他们仍在努力工作。我的投注是他们正在研究两个重点:
CloudKit is still pretty new. At the WWDC some guys behind it made me understand that they are still heavily working on it. My bets are they are working on 2 important points :
- 通过远程计划任务执行服务器端代码
- CloudKit for Analytics(可视化方面)
编辑:Apple员工完全清楚并担心数据缺乏Web访问权限。这意味着有一天 可以从其他平台访问。我在评论中读到Apple可能会购买Parse如果CloudKit不是更好,AFAIK他们试图购买Parse(技能买它说,但我们真的不知道)。
Apple guys are fully aware and concerned about the lack of web access for the data. It means that one day it may be accessible from other platforms. I read in a comment that Apple probably would have bought Parse if CloudKit wasn't better, AFAIK they tried to buy Parse (skills buy it's said, but we don't really know).
现在可以在JS中使用CloudKit,现在可以使用一些仪表板。等等看。
CloudKit is now available in JS and some dashboard are available now. Wait and see.
CloudKit现在支持
CloudKit Now Supports Server-to-Server Web Service Requests
这篇关于CloudKit - 没有服务器端逻辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!