Accessing 'kSCNetworkInterfaceIPv4' crashes the application.

26 views
Skip to first unread message

Povilas Balciunas

unread,
Mar 27, 2015, 11:30:45 AM3/27/15
to swift-l...@googlegroups.com
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)


Reply all
Reply to author
Forward
0 new messages