Is there an iPhone URL shortcut for calendar?

2019-01-20 00:05发布

问题:

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.

回答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


回答2:

That code launch the Calendar app:

NSString* launchUrl = @"calshow://";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: launchUrl]];


回答3:

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



回答4:

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.



回答5:

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



回答6:

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