Showing posts with label iCal. Show all posts
Showing posts with label iCal. Show all posts

Saturday, October 21, 2017

iCloud calendar invitations to non-iCloud accounts are still broken

It’s been over a year since I first posted that iCloud invitations to a non-iCloud (ex: Google) account have been broken since 2011. Briefly, if someone sends an invitation from iCloud to my gmail address I’ll never see it. Somehow Apple looks up one of the four (that I know of[1]) iCloud accounts that I have, presumably one that references my gmail address, and uses that one instead.

In late 2016 Apple introduced an obscure workaround, an advanced iCloud (only) Calendar setting to receive event invitations by email — “if your primary calendar is not iCloud”.

I was working on a book chapter today so I revisited the old bug to check out the workaround. From my son’s (unused) iCloud Calendar I sent myself an invitation. Despite the setting nothing appeared in any of my (unused) Apple iCloud Calendars.

I waded through my Apple IDs to identify which one was associated with that Gmail address. I had to answer Apple’s “secret” questions [2] several times, but I found an Apple ID of mine associated with an iCloud account that did had the “receive by email” option enabled and had iCloud mail services. I tried from several iCloud accounts; none of the invitations appeared anywhere. They didn’t show as email, they didn’t show up on my iCloud calendar. They went into the ether.

Apple iCloud calendar invitations to non-iCloud addresses are still broken.

[1] Multiple iCloud accounts, some with email services and some without, is a longstanding Apple fiasco. Cook promised to clean it up several years ago and quietly abandoned hope. I periodically read hints from insiders that Apple’s identity management is more screwed up than even the most cynical outsiders can imagine.

[2] Also known as a hacker’s best friend.

 

Tuesday, July 26, 2016

The sensible way to subscribe to a calendar feed in Apple's screwed up calendar ecosystem.

I think I know how Apple screwed this up. It’s one of those evolutionary path-dependency things. Their iCloud calendar is the child of their old OS X Server calendar (via MobileMe). They bolted a web service atop a server side model. In the old model the client was where different calendar sources were assembled, not the server. iCloud/web is stuck with that model.

So when it comes to Calendar feed subscription assembly happens on the Mac, or it happens on the iPhone. It doesn’t happen in iCloud/web. There’s no UI for adding a feed to iCloud/web because there’s no application model for that.

Which explains Apple’s bizarre instructions for getting a feed to iCloud to iPhone via the Mac. Whoever wrote that up was probably sobbing with despair. I suspect the resulting iCloud/web calendar only gets updated when the Mac updates itself. Let me know if I’m wrong.

I think there are really only two ways to do calendar feeds in the Apple world. One is to add the feed to the iOS device(s) (calendar.app) and the Mac (calendar.app) separately. Forget about seeing it in iCloud/web - that really doesn’t work.

The other is to do the subscription in a Google Calendar and subscribe to that on Mac or iPhone (and give up on iCloud/web). But then you’re going to have to deal with iOS failure to support Google’s CalDAV sync select. So this is a geek-only solution (It’s what my family does).

Here’s how to do it the simple way (iPhone and Mac only, not iCloud/web):

  • iPhone: Calendars:Add Account:Other:Add Subscribed.
  • Mac: I think you should ignore the iCloud option, but let me know if it updates without the Mac driving the update.

Thursday, January 21, 2016

iCloud calendar invitations have been broken since 2011 and nobody has noticed

I’m not sure what’s more amazing — that this has been broken for five years, or that someone once thought this was a clever idea, or that almost no-one understands what’s wrong…

Warning: iCloud Calendar invitations have unpre... | Apple Support Communities

I suspect few people use iCloud Calendar invitations — or else we'd all know about this. It's not a new behavior, it was first documented in 2011. It's still true.

It's important to know about this.

When you send an event invitation to an email address iCloud will look up the person associated with that email address (possibly using Contacts). If that person has an iCloud email address then the invitation will go to their iCloud calendar. No email will be generated. If they don't actually use that iCloud calendar they will never see the invitation.

If the invited person does not have an iCloud address in contacts then an email will be generated.

So if you invite with a gmail address, and iCloud finds an iCloud address associated with the gmail address Contact (see update for correction), no email will be sent to Google Calendar. Instead an iCloud Calendar event will be created.

There is such a thing as being too clever.

Some details are here: http://apple.stackexchange.com/questions/27449/icloud-calendar-not-sending-invit es/29970

I discovered this while doing research for a book on using smartphones to support independent living for special needs teens and adults. Using my sister’s iCloud calendar I invited myself using my gmail address. I didn’t get an email, and her iCloud account didn’t show a sent message. Google found the 2011 StackExchange comment so I checked my unused iCloud calendar. There was the event, waiting acceptance.

A wonderful example of how being clever can be stupid.

Update 1/22/2016

A family member tells me her iCloud invitations appear to recipients with a name that is only associated with the Apple ID she uses for iTunes purposes — because it’s on her credit card.

This suggests the AppleID lookup is based on the email address associated with one’s Apple ID, not on anything in Contacts.app. I visited the AppleID associated with the iCloud calendar that my test invitation appeared on, and it is associated with two non-Apple email addresses. One of them is the gmail address I used in the test invitation.

Note that many people have multiple Apple IDs. I have four. More, Apple now allows one to have an Apple ID with a non-iCloud email address. Note also that it’s been four years since Cook promised Apple would find a way to merge Apple IDs.

This is my new “Apple FUBAR” example.

Update 11/30/2016

Apple has introduced a new Advanced preference setting to iCloud Calendar (web only) that may have been created to fix this problem. They recommend receiving event invitations by email — “if your primary calendar is not iCloud”. Yes, it’s bizarre that this refers to how an iCloud calendar receives invitations, but I think it turns off Apple’s obscure redirect mechanism.

Screen Shot 2016 11 30 at 7 32 12 PM

Update 6/16/2023

I think this is still broken. On reviewing the original Stack Exchange post I saw a reference to a bug with invitations that had locations set. I don't know if that was ever fixed.

Tuesday, December 22, 2015

Calendar sharing between Google and iCloud is very confusing: webcal vs http vs. https

A book project forced me to dig into a perennially painful topic — Calendar sharing and subscription in iOS and OS X (MacOS Yosemite) for Google and Apple.

I discovered:

  • iCloud uses Webcal protocol links to share public calendars among iCloud users. Google can parse these, but it in my tests no events appeared. Old web pages say Apple blocks Google access to public iCloud calendars (robots.txt).
  • Google uses https links to an ICS file to share public calendars. Yosemite Calendar.app can use these links and iOS Calendar.app can use these URLs [1], but iCloud.com Calendar can’t. At least in my testing, with Yosemite, Calendar.app on MacOS and Calendar.app on iOS don’t share these calendar subscriptions.
  • Safari.app on iOS will pass an iCloud webcal URL link to Calendar.app and this will trigger a calendar subscription. Google ICS file (https) links won’t work, renaming them to webcal doesn’t work either (I think it might have in the past).
This confusing situation is reminiscent of the complex hoops required to support CalDAV sync for multiple Google Calendars in iOS and MacOS. Apple and Google have very different models for calendaring and they also appear to have different approaches to implementing CalDAV (and they’re probably on different CalDAV versions too).
 
On balance I much prefer Google’s approach to managing Calendars. On the other hand, if one stays entirely within iCloud and ignores Google calendar sharing, then Apple’s Calendars are simpler to use and understand and are better documented.
 
Don’t bother trying to share a public iCloud Calendar to the world, when Apple says “public” they really mean “iCloud”. If you do want to subscribe to a Google Calendar on your iPhone or MacOS, you will have to do it separately on every device you use (it my testing these subscriptions do not sync, I do hope they are backed up).
 
If you are sharing a Google Calendar, you’ll want to provide directions for iOS and MacOS users and you’ll need to explain that they won’t be able to see the calendar using iCloud.com.
 
Sample links used in my testing:
- fn -

[1] Documentation: Subscribe to a calendar. Go to Settings > Mail, Contacts, Calendars, then tap Add Account. Tap Other, then tap Add Subscribed Calendar. Enter the server and filename of the .ics file to subscribe to. You can also subscribe to an iCalendar (.ics) calendar published on the web, by tapping a link to the calendar. The second part of this documentation is incorrect, you can only subscribe for a webcal URL and only iCloud seems to produce the “right” ones.

See also (references)

Monday, August 31, 2015

Yosemite Mac Calendar.app travel time feature isn't compatible with Google Calendar

Travel Time for Appointments in Apple Calendar (Yosemite) is a nice feature, but it’s not compatible with Google Calendar. I suspect travel time is an attribute of the appointment, not a separate appointment, and it’s not a standard CalDAV feature.

So if you’re using iOS or OS X Calendar.app with a Google Calendar back end don’t bother with this feature. 

Is kind of nifty I admit.

Friday, August 23, 2013

Google's Calendar Sync with Mountain Lion through Yosemite Calendar.app is a flaming mess

[This is unchanged in Yosemite and I suspect is also true of El Capitan.]

This is what Mountain Lion shows as my Calendars as of August 2013 after standard setup against my Gmail account:

myCalendars

The accounts I see under "Google" are the set of Calendars my Gmail account has access too that are also checked in the web page that controls Google CalDAV access for iOS Calendar.apphttps://calendar.google.com/calendar/syncselect

The Delegate list is what appears based on my selections in Calendar:Preferences:Accounts:Delegation, where options include ALL calendars known to Google, not just those selected in https://www.google.com/calendar/syncselect.

If I check all of the calendars in Calendar.app (Mac) I'll get duplicate entries. If I disable "delegation", which appears to be Google's undocumented recommendation I get a neat list, but any changes I make in Calendar.app do not appear in Google Calendar (sync is broken, or, if you prefer, it's "one-way" from Google to Calendar.app).

If I uncheck Calendars under the 'Google' tree in Mountain Lion Calendar.app "Calendar List" and just use the Delegates sync is more-or-less bidirectional (not broken). That's what I'm doing for now.

I once thought Google was responsible for this mess, but given Apple’s software bungling over the past 4-5 years I think it’s more likely their issue.

Sunday, August 04, 2013

Using Automator to create a plaintext list of upcoming events from OS X Calendar.app

This isn't the Using AppleScript to create a plaintext list of upcoming events from OS X Calendar.app solution I want (much less something built into Calendar.app), and it's not necessarily better than How to get a reasonable plaintext listing of calendar events using Google Calendar or OS X Calendar.app, but this Automator solution was pretty easy to put together.

It's not so easy to share though, one of the weird things about Automator is how hard it is to share a set of steps. Here's a screenshot that gives the gist of it:

Screen Shot 2013 08 04 at 5 02 05 PM

The output is clunky, but I've seen worse:

...

EVENT 16 OF 18
Summary: bdfafdf
Status: none
Date: 8/24/13 to 8/25/13
Time: 12:00:00 AM to 12:00:00 AM
Location:
Notes:

...

See also:

Using AppleScript and/or Python to create a plaintext list of upcoming events from OS X Calendar.app

[This post starts with the general problem and some basic scripts -- but don't worry -- it ends with two definitive solutions.]

Yesterday I described several clumsy hacks to get a plaintext display of upcoming Calendar events from one or more Mac or Google Calendars. In today's post I look at what's possible with AppleScript [1] (or Python and AppScript) support -- though as of 8/4/13 I'm not done with it.

Specifically I want to get a plaintext list of events on one or more Google Calendars through AppleScript and Calendar.app when Calendar.app is configured to read Calendars from a Google share. Based on some articles I found, it looks possible:
I was able to retrieve the references and names of all my Google Calendars using 2005 code from MacTech

tell application "iCal"
set theCalendars to every calendar
end tell
and
tell application "iCal"
set theCalendarNames to title of every calendar
end tell

I was also able to view a calendar at a specified date and I found it used the selected calendars though not in my desired format.

This script listed events by event id for the current date and it seems easy to modify if I study some AppleScript date arithmetic ...

set {year:y, month:m, day:d} to current date
set str to (m as string) & " " & (d as string) & " " & (y as string)
set today to date str
set tomorrow to today + 60 * 60 * 24
tell application "iCal"
tell calendar "Lotus Notes"
set curr to every event whose start date is greater than or equal to today ¬
and start date is less than or equal to tomorrow
end tell
end tell

This one worked, but search can take a very long time...
tell application "iCal"
tell calendar "Domestic"
set theEventList to every event whose summary contains "Recycling"
end tell
set theEvent to first item of theEventList
return summary of theEvent
end tell

I'll have to leave this task for a bit, but I have a long family car drive coming up and I might be able to play with it on the way. I've also asked about this on MacScripter.net, where respondents have been known to solve problems very thoroughly.

Or I could just try Automator...Using Automator to create a plaintext list of upcoming events from OS X Calendar.app

- fn -

[1] SQL, AppleScript and COBOL all have one thing in common - they were designed for use by "non-programmers". Let that be a lesson.

See also
Update 8/5/13: Nigel Garvey, a moderator at the extraordinary and venerable MacScripter site, did a professional version of this script. It's working quite well for me, though it only works with one Calendar. It's easy to tweak the text result. (See post for his comments.)

-- Ask the user for the range of dates to be covered.on getDateRange()
   set today to (current date)
   set d1 to today's short date string
   set d2 to short date string of (today + 6 * days)
   
   set dateRange to text returned of (display dialog "Enter the required date range:" default answer d1 & " - " & d2)
   set dateRangeStart to date (text from word 1 to word 3 of dateRange)
   set dateRangeEnd to date (text from word -3 to word -1 of dateRange)
   set dateRangeEnd's time to days - 1 -- Sets the last date's time to 23:59:59, the last second of the range.   
   return {dateRangeStart, dateRangeEnd}
end getDateRange

-- Return the start dates and summaries which are in the given date range.on filterToDateRange(theStartDates, theSummaries, dateRangeStart, dateRangeEnd)
   set {eventDatesInRange, eventSummariesInRange} to {{}, {}}
   repeat with i from 1 to (count theStartDates)
       set thisStartDate to item i of theStartDates
       if (not ((thisStartDate comes before dateRangeStart) or (thisStartDate comes after dateRangeEnd))) then
           set end of eventDatesInRange to thisStartDate
           set end of eventSummariesInRange to item i of theSummaries
       end if
   end repeat
   
   return {eventDatesInRange, eventSummariesInRange}
end filterToDateRange

-- Sort both the start-date and summary lists by start date.on sortByDate(eventDatesInRange, eventSummariesInRange)
   -- A sort-customisation object for sorting the summary list in parallel with the date list.   script custom
       property summaries : eventSummariesInRange
       
       on swap(i, j)
           tell item i of my summaries
               set item i of my summaries to item j of my summaries
               set item j of my summaries to it
           end tell
       end swap
   end script
   
   CustomBubbleSort(eventDatesInRange, 1, -1, {slave:custom})
end sortByDate

-- CustomBubbleSort from "A Dose of Sorts" by Nigel Garvey.-- The number of items to be sorted here is likely to be small.on CustomBubbleSort(theList, l, r, customiser)
   script o
       property comparer : me
       property slave : me
       property lst : theList
       
       on bsrt(l, r)
           set l2 to l + 1
           repeat with j from r to l2 by -1
               set a to item l of o's lst
               repeat with i from l2 to j
                   set b to item i of o's lst
                   if (comparer's isGreater(a, b)) then
                       set item (i - 1) of o's lst to b
                       set item i of o's lst to a
                       slave's swap(i - 1, i)
                   else
                       set a to b
                   end if
               end repeat
           end repeat
       end bsrt
       
       -- Default comparison and slave handlers for an ordinary sort.       on isGreater(a, b)
           (a > b)
       end isGreater
       
       on swap(a, b)
       end swap
   end script
   
   -- Process the input parameters.   set listLen to (count theList)
   if (listLen > 1) then
       -- Negative and/or transposed range indices.       if (l < 0) then set l to listLen + l + 1
       if (r < 0) then set r to listLen + r + 1
       if (l > r) then set {l, r} to {r, l}
       
       -- Supplied or default customisation scripts.       if (customiser's class is record) then set {comparer:o's comparer, slave:o's slave} to (customiser & {comparer:o, slave:o})
       
       -- Do the sort.       o's bsrt(l, r)
   end if
   
   return -- nothing end CustomBubbleSort

-- Compose the text from the items in the start-date and summary lists.on composeText(eventDatesInRange, eventSummariesInRange)
   set txt to ""
   set gap to linefeed & linefeed
   
   repeat with i from 1 to (count eventDatesInRange)
       set txt to txt & (date string of item i of eventDatesInRange) & (linefeed & item i of eventSummariesInRange & gap)
   end repeat
   
   return text 1 thru -3 of txt
end composeText

on main()
   tell application "iCal" to set {theStartDates, theSummaries} to {start date, summary} of events of calendar "FL Family Calendar"
   
   set {dateRangeStart, dateRangeEnd} to getDateRange()
   set {eventDatesInRange, eventSummariesInRange} to filterToDateRange(theStartDates, theSummaries, dateRangeStart, dateRangeEnd)
   sortByDate(eventDatesInRange, eventSummariesInRange)
   set txt to composeText(eventDatesInRange, eventSummariesInRange)
   
   tell application "TextEdit"
       make new document with properties {text:txt}
       activate
   end tell
end main

main()

Update 8/6/13: Clark Goble codes up comingevents.py, which uses PyObjC, AppScript, Osax and, of course, Python. It includes Parsedatetime so date entry can be free text and outputs plain text, HTML, Clipboard and probably sends a message to another dimension. I think at this point we've got scripted plaintext event publication covered. Be sure not to miss his links to related posts.