opendal icon indicating copy to clipboard operation
opendal copied to clipboard

feat: Add iCloud Drive/Photo support

Open Xuanwo opened this issue 2 years ago • 7 comments

I am now an iCloud user, thanks to my wife who bought me a new iPhone. I would like to enable iCloud Drive/Photo support so that I can access and edit them without using my phone (since I do not yet have a MacBook).

This issue is being used to track my progress in adding iCloud support. It's worth noting that developing for Apple services can be challenging outside of the Apple ecosystem.

Context

  • iCloud Drive: Apple's personal storage services, need a personal iCloud account
  • iCloud Phone: Apple's phone sync services, need a personal iCloud account
  • iCloud Containers: Apple's storage solution for iOS app developers, needs an Apple Developer account

This issue is to adding iCloud Drive/Phone support first (since I'm not ready to register an Apple Developer account).

Blockers

  • [ ] Authentication: 2FA (which is required for every account now), ADP (more complex)
    • NOTE: I have already enabled ADP, maybe I should start with a new account without it first.

References

Xuanwo avatar Jul 13 '23 06:07 Xuanwo

@Xuanwo On back burner atm?

JasCodes avatar Oct 24 '23 16:10 JasCodes

@Xuanwo On back burner atm?

Not working on this issue so far.

Xuanwo avatar Oct 25 '23 05:10 Xuanwo

@bokket is interested in addressing this issue. He has implemented a quick hack for iCloud as follows:

image

Xuanwo avatar Jan 02 '24 10:01 Xuanwo

Hi.I have to discuss this here.Stat cannot be obtained according to path.Because in iCloud, all Drivewsid came to the send request directory or file, but the problem is that the variable can only be listed by folder::com.apple.clouddocs::root get.And then only knew the id. 深度截图_选择区域_20240107235157

bokket avatar Jan 07 '24 15:01 bokket

Current idea. We can first get the drivewsid and name of all directory from the root and save them in iCloudDrive: HashMap <string, String>. This may be forced user to enter the path of \root\path\opendal.They will be searched for the name of ""and drivewsid to folder::com.apple.clouddocs::root below.Get Name with the HashMap index for request iCloud server. So which came first, the chicken or the egg?

bokket avatar Jan 07 '24 17:01 bokket

Because in iCloud, all Drivewsid came to the send request directory or file, but the problem is that the variable can only be listed by folder::com.apple.clouddocs::root get.And then only knew the id.

We can maintain an id-path mapping in memory.

Xuanwo avatar Jan 07 '24 17:01 Xuanwo

Apple Icloud Drive Roadmap:

  • [x] Add basic read/stat support: #3980
  • [ ] Add rename/delete/list support
  • [ ] Add write support

Others

ADP:iCloud Advanced Data Protection (PCS)

Of course, I would also like to extract and write a separate experimental icloud library related to raw and http-utils apart, which will be beneficial for future learners interested in Photos or other applications to learn OpenDAL.

bokket avatar Jan 17 '24 18:01 bokket

No actionable task for us to do now. Thank you @bokket for working on this!

Xuanwo avatar Sep 15 '25 06:09 Xuanwo