Where is NEConfigurationErrorDomain declared?

When attempting to configure a network extension on iOS in the absence of user authorization or MDM provisioning, the call to saveToPreferences() on NEDNSProxyManager fails with an error of code 10 in domain "NEConfigurationErrorDomain". I want to test for this condition in order to present a more helpful message to the user.

However, it appears that NEConfigurationErrorDomain is not declared in any system header. Why not? How do I test for this? Must I resort to a comparison against a string literal "NEConfigurationErrorDomain"?

What other error codes exist in this error domain?

What other error codes exist in this error domain?

Does the error that's emitted from the saveToPreferences completion handler not fit into a switch statement for NEDNSProxyManagerError? See the documentation here.

You are correct that NEConfigurationErrorDomain is not in a public header. If NE is ‘leaking’ such errors to you, that’s a bug. You should be getting a NEDNSProxyManagerError, like Matt said, ideally with the NEConfigurationErrorDomain error as the underlying error.

If you are seeing these errors, please file a bug about that and post your bug number here, just for the record.

FYI, error 10 in the NEConfigurationErrorDomain domains translates to, unsurprisingly, ‘permission denied’.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@Matt: No it doesn't; NEDNSProxyManagerError is an enum representing error codes in the NEDNSProxyErrorDomain, but the error returned is not in that domain. (Even if it were, its integer value exceeds the enum.)

@eskimo: Thanks for confirming this. Filed FB12017478.

Thanks for filing FB12017478.

By a weird coincidence, I actually reproduced this yesterday while helping another developer as part of a DTS tech suport incident.

it's silently transforming

Interesting. I don’t use at-names much so I’ve not noticed this myself.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Where is NEConfigurationErrorDomain declared?
 
 
Q