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
For more options, visit