You can define the days as an array of EKRecurrenceDayOfWeek like
let days = [EKRecurrenceDayOfWeek]()
Or you should cast NSMutableArray to expected argument type [EKRecurrenceDayOfWeek]
let rule = EKRecurrenceRule(recurrenceWith: .weekly, interval: 1, daysOfTheWeek: days as? [EKRecurrenceDayOfWeek], daysOfTheMonth: nil, monthsOfTheYear: nil, weeksOfTheYear: nil, daysOfTheYear: nil, setPositions: nil, end: nil)