Symbol not found: _NEHotspotConfigurationErrorDomain

Hi all,

our app uses an iOS 11.0 target.


We have also enabled the following capabilities:

- Access WiFi Information

- Hotspot Configuration

- Network Extension


In our code, we use the "NetworkExtension" framework to connect to a particular Wifi network, but when we run the app in both simulators (any iOS < 13 and) and devices the app crash with the following log:


dyld: Symbol not found: _NEHotspotConfigurationErrorDomain
  Referenced from: /var/containers/Bundle/Application/9708E713-8FB7-4385-B3BD-90EF46453ECD/TheApp.app/TheApp
  Expected in: /System/Library/Frameworks/NetworkExtension.framework/NetworkExtension
 in /var/containers/Bundle/Application/9708E713-8FB7-4385-B3BD-90EF46453ECD/TheApp.app/TheApp
(lldb)


The assembly part (if useful):


dyld`__abort_with_payload:
    0x1027be410 <+0>:  mov    x16, #0x209
    0x1027be414 <+4>:  svc    #0x80
->  0x1027be418 <+8>:  b.lo   0x1027be430               ; <+32>
    0x1027be41c <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1027be420 <+16>: mov    x29, sp
    0x1027be424 <+20>: bl     0x1027bd850               ; cerror_nocancel
    0x1027be428 <+24>: mov    sp, x29
    0x1027be42c <+28>: ldp    x29, x30, [sp], #0x10
    0x1027be430 <+32>: ret   


No idea why this happens.

The use of NEHotspotConfiguration should be available starting from iOS 11 as written in the doc:

https://developer.apple.com/documentation/networkextension/nehotspotconfiguration



These are my 3 lines of code:


import NetworkExtension

func connect()
        let hotspotConfig = NEHotspotConfiguration(ssid: wifiName, passphrase: wifiPassword, isWEP: wep)
        NEHotspotConfigurationManager.shared.apply(hotspotConfig) { (hotSpotError) in
            // [...]
        }
}


Running the app on iOS >= 13 (both device/simulator) works well as usual.

Changing the iOS version to 12.0 makes the app crash like 11.0 version.


Someone can help, please?


thanks

Alberto

Replies

See this thread.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"