NWTXTRecord dictionary keys are lowercased in iOS 17 beta

NWTXTRecord dictionary keys are lowercased in iOS 17, on iOS Simulator and the device.

Records returned by NWBrowser in the listener block:

        browser.browseResultsChangedHandler = { result, changes in

metadata : ["dvty": “AppName”, "txtvers": "1", "dbid": "50BFB79F"]

But the actual keys are: "DvTy", "DbId".

So, in iOS 17 all keys were lowercased, but not in any previous versions. And if in the app we were looking for “DvTy” key, nil is returned. The existing app simply stopped working properly in the first iOS 17 betas.

Is it a bug or the app should be updated now to check for lowercased keys always?

FB12309561

Is it a bug … ?

That’s a matter of debate (-:

FB12309561

Thanks for filing that. It’s definite being looked at by the right folks, and I’ve added my own comments to it.

Share and Enjoy

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

I have the same problem

Same problem in iOS 17.0. That said, lookup using subscript operator or getEntry(for:) is still case sensitive, while dictionary result has its keys lowercased.

I can’t talk about specifics but:

  • AFAICT everyone agrees that this change is a bug.

  • It isn’t fixed in the current iOS 17.0 )-:

Share and Enjoy

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

For everyone watching, we see that this has been fixed in iOS 17.1, if you used an if #available(iOS 17, *) you may a new bug to fix in iOS 17.1

NWTXTRecord dictionary keys are lowercased in iOS 17 beta
 
 
Q