In Swift 3, it SequenceTypewas renamed to Sequence(the type suffix was removed from the protocols), generate()was renamed to makeIterator()(the concept of "Generator" was replaced by "Iterator"), and therefore was NSFastGeneratoralso renamed to NSFastEnumerationIterator.
So you want your extension to look like this:
extension CMSensorDataList : Sequence {
public func makeIterator() -> NSFastEnumerationIterator {
return NSFastEnumerationIterator(self)
}
}
source
share