9

I am trying to open an ics (Calendar) file within my iOS application.

For debug purposes i have added a ics file to my bundle of a calendar event created within iCal.

I am using UIDocumentInteractionController to present the data of the calendar invite with the hope of letting the user add it to their calendar.

However on presenting the UIDocumentInteractionController with in ics as the source file, it correctly shows all the data related to the event, however the button 'add to calendar' is replaced with 'This invitation data is out of date'

If i use the share option to send the file via SMS or Email and then try to open it, it works as expected using the UIDocumentInteractionController, therefore i don't think its an corrupt file.

I was wondering if i am missing something simple with the UIDocumentInteractionController or if this a known issue.

Any ideas would be great

self.documentController = [UIDocumentInteractionController
                               interactionControllerWithURL:[NSURL fileURLWithPath:filePath]];

self.documentController.delegate = self;
[self.documentController presentPreviewAnimated:YES];

Edit: I cannot use EKEvents as i need to add invitees to the event

Dan
  • 1,447
  • 2
  • 14
  • 30
  • Hi, just wondering if you've managed to solve this, as I'm running into the same problem too. – jklp Jan 14 '14 at 03:28
  • Nope. Although i did read that the Document Control never should have supported ICS files, and it working in previous versions was actually an undocumented feature. In the end we've had to park it as we can't seem to find an alternative. – Dan Jan 14 '14 at 09:08
  • That's a shame. I've just written a bug report to Apple so hopefully something gets done about it. In the end I just used an EKEventEditViewController (I know this isn't available to you) though my client was happy with that. Have you considered emailing the .ics file, and then having the participants view that via email? – jklp Jan 15 '14 at 00:49
  • Yeh, thats kinda a last resort as it has a horrible User Flow to it. – Dan Jan 15 '14 at 10:36
  • @Dan Total shot in the dark here, any chance you remember where you read that Document Control shouldn't support ics files? I've ran into pretty much the same issue and [asked on here](http://stackoverflow.com/questions/27927665/uidocumentinteractioncontroller-calendar-access) if it might be a permission issue. Haven't had much luck in my research as to why ics isn't supported by UIDocumentInteractionController (but `vcf` is) – Alex Jan 15 '15 at 20:32
  • Anyone found a solution already? – Robert Jul 04 '18 at 10:12

1 Answers1

0

This may be irrelevant to your issue and probably explains nothing, but an employee was having an issue with his iPhone inconsistently accepting ICS calendar invites and was receiving "this invitation data is out of date" messages when it would not work. After multiple attempts of trial and error, the result was that if the iPhone was connected to wifi, it would give the "this invitation data is out of date" message. If it was connected only to the phone carrier network, it would successfully add the event.