Thanks for the read.
Yesterday morning all was well, but around noon I started getting the following errors:
- Undefined symbol: OBJC_CLASS$_NEHotspotConfiguration
- Undefined symbol: OBJC_CLASS$_NEHotspotConfigurationManager
As you can see in the screenshot at the bottom my app has the "Hotspot Configuration" entitlement. I have confirmed that the entitlement is also present in my app's entitlement file with the value "YES".
However, the "undefined symbol" errors won't go away. I've tried cleaning, rebuilding, reinstalling Xcode, rebooting the iMac, and adding every available capability to my app's entitlements. As I said, this was building fine yesterday, and I didn't modify any of my code interacting with NEHotspotConfiguration. I working in Objective C.
The following code is sufficient to trigger the Undefined symbol: _OBJC_CLASS_$_NEHotspotConfigurationManager
error:
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <NetworkExtension/NetworkExtension.h>
#import <SystemConfiguration/CaptiveNetwork.h>
void IosUtility::disconnectFromDashcamWifi( const QString& ssid ) {
NSLog( @"disconnectFromDashcamWifi enter" );
[[NEHotspotConfigurationManager sharedManager] removeConfigurationForSSID:ssid.toNSString()];
NSLog( @"disconnectFromDashcamWifi exit" );
}
Do you have any ideas for how to get things back on the rails?
NetworkExtension.framework
was present on the General tab under the section "Frameworks, Libraries, and Embedded Content. However, it was listed with Do Not Embed
. Changing it to Embed & Sign
caused a new error: Command CodeSign failed with a nonzero exit code
I then changed all of the frameworks to the Embed Without Signing
. This allowed the build to complete, but the install to the iPhone failed. The details on the failure error included the phrase Could not inspect the application package.
. Deleting the app on the iPhone and trying again gave the same error.
An internet search suggested doing a "clean". I changed the framework option back to Do Not Embed
and did a clean. Things worked after doing a rebuild.
I did do a clean prior to this yesterday, so I'm not sure which steps were required to get things back on the rails. However, things are back to working now.
Many thanks Quinn!