0.0
No commit activity in last 3 years
No release in over 3 years
There seem to be no APIs to upload photos to iCloud, so here is a hack.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

ICloudPhoto::Sync

So you want to send photos to your photo stream on iCloud. I looked for an API and couldn't find one. So I made this mess. It uses AppleScript to launch iPhoto and then puppeteers it until the photos are in iPhoto.

It is being used in the Dashing on Apple TV sample.

Setup

Open iPhoto and click on "iCloud" on the side. Sign if if necesssary.

NOTE: this is meant to have total control over this iCloud account. It should be a new account for your dashboard, not your personal one. It may delete you photos.

Import a photo, select "Share...", and share it to the iCloud album(s) you want to use (just to make the album). In the sample, it is called "dashboard."

The first time you run it, you'll likely need to allow some accessibility access to iPhoto from the Applescript. Follow the given instructions.

You should see it succeed after a few times of that. When iPhoto closes itself, that means it worked.

Usage

require 'icloud-photo'

cloud = ICloudPhoto::Sync.new("screenshots")

# put the sampletv image in the dashboard album
cloud.add("dashboard", ["sampletv"])
cloud.upload!

Then don't touch the keyboard!