Provides a complete example, with Xcode project, that shows how to add a new event to the device's calendar from within an application.
This example is built to support iOS 5 and later. It takes into account changes introduced in iOS 6 that require the application to explicitly request permission from the user to have access to their Calendar.
See Apple's EKEventStore Class Ref for more details.