Returns the goal at the specified index in the behavior’s list of goals.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
An index in the behavior’s list of goals; must be less than the value of the
The goal at the specified index.
The order of goals in a behavior is undefined. However, you can use this method to enumerate all goals in a behavior.