When that function is called, will eventCode ever be more than one item? The documentation isn't really clear on this. eventCode is an OptionSet, not an enum, so in theory multiple items could exist at the same time, right?
When that function is called, will
ever be more than one item?eventCode
No.
The documentation isn't really clear on this.
Agreed. It’d help if you filed a bug against the docs here, specifically the places you looked for this answer.
is aneventCode, not an enum, so in theory multiple items could exist at the same time, right?OptionSet
Correct. This is just a leaky abstraction.
Stream uses the
OptionSet internally to track the events that are pending, but it then makes sure that events are delivered to the delegate one at a time.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"