I can't get the current language with Network extionsion.

If you change the iOS language, the device will restart automatically. At this time, if you acquire the language with the network extension, the language before the change will be acquired. You must manually restart the device to get the changed language.

let language = NSLocale.preferredLanguages.first?.components(separatedBy: "-").first

This happens on iOS 15.1 and later. In 15.0.1 I was able to get the changed language.

Is it a bug?

Is it a bug?

It’s definitely weird. What sort of NE provider are you creating? Packet tunnel? App proxy? Content filter? DNS proxy?

Share and Enjoy

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

I can't get the current language with Network extionsion.
 
 
Q