Hi,
I am using NetworkExtension framwork for getting the list of all the available wifi's SSID. I am using below code:
let bundleId = NSBundle.mainBundle().bundleIdentifier!
var options:Dictionary<String, NSObject> = Dictionary(minimumCapacity: 1)
options[kNEHotspotHelperOptionDisplayName] = Constants.kDescriptionWiFiAnnotation
let queue:dispatch_queue_t = dispatch_queue_create(bundleId, DISPATCH_QUEUE_CONCURRENT)
let _ = NEHotspotHelper.registerWithOptions(options, queue: queue, handler: {(command) -> Void in
switch command.commandType {
case .FilterScanList:
//adding ssids to a local variable here
//handled other cases as well
}
But this code is casuing crash sometimes. I'm not sure what is wrong here. Here is the crash report:
#9. Crashed: App's Bundle Identifier here
0 App Name 0x1be324 __hidden#12577_ (__hidden#12751_)
1 App Name 0x1bc87c __hidden#12577_ (__hidden#12751_:192)
2 NetworkExtension 0x2ff717ed __53+[NEHotspotHelper registerWithOptions:queue:handler:]_block_invoke + 72
3 CaptiveNetwork 0x2a603033 __CNPluginHandleCommandInfo_block_invoke + 26
4 libdispatch.dylib 0x238b3cbf _dispatch_call_block_and_release + 10
5 libdispatch.dylib 0x238bc6d5 _dispatch_async_redirect_invoke + 1368
6 libdispatch.dylib 0x238bf6a1 _dispatch_root_queue_drain + 1572
7 libdispatch.dylib 0x238bf07b _dispatch_worker_thread3 + 94
8 libsystem_pthread.dylib 0x23a52e0d _pthread_wqthread + 1024
9 libsystem_pthread.dylib 0x23a529fc start_wqthread + 8
It doesn't provide any other information. Can anyone please let me know what is wrong here.
This crash was not there ealier, it is happening after recent iOS updates.
Thanks in advance.