简体   繁体   English

iPhone和Webapp通过iCloud同步?

[英]iPhone and Webapp sync through iCloud ??

just checking if its possible to sync iOS devices AND a web app through iCloud. 只是检查是否可以通过iCloud同步iOS设备和Web应用程序。 Currently we've got an iOS app built, are looking at using iCloud for synching between all the devices and also want a web app component. 目前我们已经构建了一个iOS应用程序,正在考虑使用iCloud在所有设备之间进行同步,并且还需要一个Web应用程序组件。 iCloud would be great to use as the module to sync everything together. iCloud非常适合用作同步所有内容的模块。

Anyone know if it's possible ? 任何人都知道它是否可能?

I have a similar requirement and have wondered about this too. 我有类似的要求,也对此感到疑惑。

Unfortunately iCloud data doesn't seem to be accessible to a Web app. 不幸的是,Web应用程序似乎无法访问iCloud数据。 And if you found a hack around it, it would still be an unreliable solution as Apple could always make changes down the road that break your Web component, intentionally or not. 如果你发现它周围的黑客,它仍然是一个不可靠的解决方案,因为苹果总是可以在有意或无意破坏你的Web组件的道路上做出改变。

Edit : With CloudKit this is no longer true. 编辑 :使用CloudKit,这不再是真的。 It comes with a Javascript API for the explicit purpose of providing a web version of your app. 它附带了一个Javascript API,用于明确提供应用程序的Web版本。

Sorry if I'm misunderstanding the question, but I was looking to add iCloud support to my web app recently and came across the official iCloud JS API. 很抱歉,如果我误解了这个问题,但我最近希望在我的网络应用程序中添加iCloud支持并遇到官方的iCloud JS API。 The promo text reads: 促销文字如下:

Keep your apps connected and up to date across iOS, OS X, and now on the web with CloudKit JS . 使用CloudKit JS在iOS,OS X 和现在的Web上保持应用程序的连接和最新。

[emphasis added] [强调补充]

https://developer.apple.com/icloud/ https://developer.apple.com/icloud/

You could possibly do this, but only if 你可以做到这一点,但前提是

  • You where running your own server 你在哪里运行自己的服务器
  • The server was running on the iOS platform 服务器在iOS平台上运行
  • You where able to create software in Objective-C for that server 您可以在Objective-C中为该服务器创建软件

You could then potentially write a server application, that could be used to connect to the iCloud API, then return the calls back to the end user as Json messages that could be consumed, perhaps by some html interface. 然后,您可以编写可用于连接到iCloud API的服务器应用程序,然后将调用作为可能被消费的Json消息返回给最终用户,可能是通过某些html接口。

It is really hard to determine what you mean.... If you are asking if you can implement iCloud in a web app, then I believe that the answer is 'no', since there is only an API for Objective-C for iCloud. 很难确定你的意思....如果你问你是否可以在网络应用程序中实现iCloud,那么我认为答案是'不',因为iCloud只有Objective-C的API 。

However, you might be able to embed your JS code inside of a native wrapper and write some native code for working with iCloud. 但是,您可以将JS代码嵌入到本机包装器中,并编写一些本机代码以使用iCloud。 However, that may or may not be an option depending on your particular situation. 但是,根据您的具体情况,这可能是也可能不是。

Edited for spelling. 编辑拼写。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM