VCalendar
public struct VCalendar
A VCalendar is the core object. When exchanging data with other clients, they are always embedded inside of a VCalendar.
A VCalendar can be seen as a container for other Calendaring and Scheduling objects. It contains timezones and events.
Basic usage
By default a creating a new VCalendar does not require any arguments.
var calendar = VCalendar()
calendar.icalString()
BEGIN:VCALENDAR
PRODID:-//SwiftIcal/EN
VERSION:2.0
END:VCALENDAR
Adding Events
Events can be added by appending to the events property.
By default adding a VEvent will also timezone definitions for all timezones used in the icalString()
If this behaviour is not wanted, it can be disabled by setting autoincludeTimezones to false
-
Product identifier.
Application should set this property to a value to represent the product. Most calendaring applications do not display this information to users. For details refer to Section 3.7.3 of RFC 5545
Declaration
Swift
public var prodid: String -
VCalendar version, currently only 2.0 is supported.
Declaration
Swift
public var version: CalendarVersion -
Timezones in the VCalendar.
Declaration
Swift
public var timezones: [TimeZone] -
VEvents in the Calendar.
Declaration
Swift
public var events: [VEvent] -
If
autoincludeTimezonesis enabled, timezone definitions for all timezones used inveventswill be added to theVCALENDARoutput.Declaration
Swift
public var autoincludeTimezones: Bool -
Creates a new
VCALENDARDeclaration
Swift
public init() -
Returns the
VCALENDARrepresentation as a stringDeclaration
Swift
public func icalString() -> String
VCalendar Structure Reference