5

I can launch Google Maps, Mail, Safari and others... but is there the same functionality for Calendar??

EDIT: I only want to add an event into the calendar.

Thanks guys!

Nick.

Nick Cartwright
  • 8,334
  • 15
  • 45
  • 56

6 Answers6

15

That code launch the Calendar app:

NSString* launchUrl = @"calshow://";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: launchUrl]];
matehat
  • 5,214
  • 2
  • 29
  • 40
  • Undocumented, but still works as of iOS 7; can you do more than simply *launch* the Calendar app with it, though? Can you create an entry or jump to a specific date? – mklement0 Nov 15 '13 at 13:27
  • Is this legal way to call calendar? As you told its undocumented method to call. will apple reject while app submission???? @mklement0 – Ramdhas May 20 '14 at 13:08
  • @Ramdy: Good question - I do not know, but it seems that rejection is a possibility; see http://www.idownloadblog.com/2013/10/15/apple-undocumented-apis/ – mklement0 May 20 '14 at 13:44
  • @mklement0, look on this statement "As a result, this document does not describe all URL schemes supported on different Apple platforms." from https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899-CH1-SW1 . Is this statement means, still there are many legal url schemes available in iOS platform? – Ramdhas May 21 '14 at 06:48
  • Any idea what the format is for launching a specific date? Like `calshow://` or something... – Joshua Pinter May 09 '16 at 18:07
  • calshow:{seconds since 1 Jan 2001 00:00}, e.g. launchUrl = @"calshow:50000"; (without slashes) – Fedor Cherepanov Jun 09 '16 at 13:01
2

Answering the EDIT part of your answer: You can add/delete event from calendar programmatically. See SO question: Deleting an event from iPhone's calendar

Community
  • 1
  • 1
Peteee24
  • 510
  • 4
  • 8
1

All those things you mentioned can be easily used to launch the application and go some where:

  • Google Maps: go to an address
  • Mail: open a message to send to an e-mail address
  • Safari: go to a web address

But with the calendar the only real thing you can do is add an event. If this is what you want to do, I think you can just do either of these two suggestions:

start your URL with ical://www.somesite.com/event-information.ical Or drop the special scheme and just do http://www.somesite.com/even-information.ical

But there is no way that I am aware of where you can just jump to a certain date in the calendar.

Nick Berardi
  • 54,393
  • 15
  • 113
  • 135
  • Hi there - this is exactly what I want to do, but neither of your suggestions worked. using 'ical://www.somesite.com/event-information.ical', the iPhone refuses to open the URL, and 'http://www.somesite.com/even-information.ical' I get the message 'Cannot Subscribe - Could not subscribe to the calendar entry'! Thanks loads for your suggestions though, this is on the right track! Nick. – Nick Cartwright Aug 27 '09 at 15:27
1

The calendar application is not listed as an application that can be launched using a URL in the Apple URL Scheme Reference.

The following applications are listed as supported:

  • Mail
  • Phone
  • SMS
  • Maps
  • YouTube
  • iTunes
mklement0
  • 382,024
  • 64
  • 607
  • 775
Adam Hughes
  • 3,732
  • 24
  • 25
  • I think you might be correct here... unless anyone knows of a backdoor to add an entry to the calendar through hook or crook? N – Nick Cartwright Aug 27 '09 at 16:15
  • 1
    @JasperPol The answer is still largely correct (FaceTime should be added), but there are *unsupported, undocumented* schemes - such as `calshow://` that also work - see [here](http://stackoverflow.com/questions/7658685/how-to-open-native-ios-app-calendar-notes-from-a-link-on-website?lq=1); though it's unclear to me whether you can do more with them than simply *launch* the app in question. – mklement0 Nov 15 '13 at 13:25
1

With iOS 4.0 you now have access to the new Calendar API.

  • Apple calls it the Event Kit framework - https://developer.apple.com/library/ios/documentation/datamanagement/conceptual/eventkitprogguide/Introduction/Introduction.html - but note that while it offers _programmatic manipulation_ of calendar events and even reminders, you cannot _launch/activate_ the Calendar _app_. – mklement0 May 20 '14 at 13:59
0

as state above. calshow:// but you can use calshow:

it works if you omit the // and replace with the date in time interval (guessing since 1970 or 2001)

URL scheme for opening native calendar with specific event id

Pascale Beaulac
  • 889
  • 10
  • 28