NEHotspotHelper supportedNetworkInterfaces Swift interface

Originator:keithbsmiley
Number:rdar://22443968 Date Originated:26-Aug-2015 02:05 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7 beta 6 7A192o
Classification:UI/Usability Reproducible:Always
 
Summary:

In the new NetworkExtension framework, NEHotspotHelper's `supportedNetworkInterfaces` returns `[AnyObject]` in Swift. Beside this return there is also this comment:

```
public class func supportedNetworkInterfaces() -> [AnyObject] /* of NEHotspotNetwork */
```

Making me thing that this return type should be annotated to correctly return `[NEHotspotNetwork]`. Also the documentation comment for this function has this:

```
* @return
*   nil if no network interfaces are being managed,
*   non-nil NSArray of NEHotspotNetwork objects otherwise.
```

Which seems to conflict with the return type as well. This comment implies that this return value could be nil, although it seems like that is impossible. I assume it would return `[]` in this case.

Expected Results:

- The return type should be correctly annotated to not return `[AnyObject]`
- The documentation comment should be updated to reflect the actual possible return values of this function.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!