ReminderLaunchEnvironment
public struct ReminderLaunchEnvironment : CleanableLaunchEnvironmentWithMultipleValues, AutoMateLaunchEnvironment
Launch environment supporting EventKit reminders.
Expects bundle and file name for every file containing data of reminders to be added into calendar at test launch.
Structure is defined in example project’s file reminders.json.
Example:
let recurringReminders: ReminderLaunchEnvironment = [ LaunchEnvironmentResourceValue(fileName: "johnys_birthday_reminder", bundleName: "Data") ]
let highPriorityReminders = ReminderLaunchEnvironment(resources: (fileName: "automate_release_reminders", bundleName: "Test data"), (fileName: "wwdc_reminders", bundleName: nil))
let highPriorityReminders = ReminderLaunchEnvironment(shouldCleanBefore: true, resources: (fileName: "automate_release_reminders", bundleName: "Test data"), (fileName: "wwdc_reminders", bundleName: nil))
Warning
SettingshouldCleanBefore to true will remove all reminders from a device.
-
Defines associated type from
LaunchEnvironmentProtocolto beLaunchEnvironmentResourceValue.Declaration
Swift
public typealias Value = LaunchEnvironmentResourceValue
-
Defines
LaunchEnvironmentResourceValueasAutoMateKey.reminders.Declaration
Swift
public static let key: AutoMateKey -
Array to store all resource values from which launch enviroment value is composed.
Declaration
Swift
public let valuesCollection: [Value] -
Flag that indicates if all
EKReminders should be removed before saving new ones.Declaration
Swift
public let shouldCleanBefore: Bool
-
Initializes
EventLaunchEnvironmentthat can be passed toTestLauncher. If handler is added toLaunchEnvironmentManagerdefault handling is provided by AutoMate - AppBuddy.Declaration
Swift
public init(shouldCleanBefore: Bool, valuesCollection: [Value])Parameters
shouldCleanBeforeBoolflag indicating ifEKReminders should be removed before saving new ones.valuesCollectionArrayof all resource values to be passed.
ReminderLaunchEnvironment Structure Reference