Accessing 'kSCNetworkInterfaceIPv4' crashes the application.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Accessing 'kSCNetworkInterfaceIPv4' crashes the application.

Povilas Balciunas
I have a two liner swift app. main.swift:

import SystemConfiguration

var netInterface = kSCNetworkInterfaceIPv4

And this little code crashes my application with segmentation fault. This obviously looks like a bug. 

Anyways, is there a workaround If I want to use it in such a context:

var netInterface = SCNetworkInterfaceCreateWithInterface(kSCNetworkInterfaceIPv4, kSCNetworkInterfaceTypeL2TP)


--
You received this message because you are subscribed to the Google Groups "Swift Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/swift-language/48967703-b1f4-47e6-bead-a856c0e0b029%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.