shouldChangeCharactersIn called twice on simulator

After update on Xcode Version 14.3 (14E222b) all functions shouldChangeCharactersIn are called twice. I've checked all sources and even new projects are with the bug

Post not yet marked as solved Up vote post of tereks_list Down vote post of tereks_list
7.0k views

Replies

I'm experiencing the same problem. However works fine on the colleague's laptop. The only difference is the laptop model "MacBook Pro 16-inch, 2019" (does not work correctly) and "MacBook Pro 16-inch, 2021"(works fine)

As a "workaround" could be used Combine by using publisher for the ".editingChanged" event.

Same problem here. XCode 14.3 & Macbook Pro 16" M1 Max. I hope this gets fixed asap, because otherwise the Simulator is unusable.

In my case empty space characters is being triggered as soon as I start typing, say for example if I type A then 'shouldChangeCharactersIn' will be called once for A and then second time for empty space. This is happening only in iOS 16.4 simulator and Xcode 14.3. Working fine with other iOS simulators and devices.

Add a Comment

The Same problem here is that calling textField.text will now also call shouldChangeCharactersIn

I have same issue.

I'm calcularing final text in shouldChangeCharactersIn. For example, current text is "1234". I enter "5" in text field. Result text after first call of shouldChangeCharactersIn is "12345". Result text after second call of shouldChangeCharactersIn is "1234".

And one more thing. Notification "textDidChangeNotification" is sent correctly. Only once with final text is "12345".

Post not yet marked as solved Up vote reply of MaxT Down vote reply of MaxT

Same issue, wasted like 2/3 hours on this. Dosen't work on simulator as expected but works fine on real device.

Same issue in Simulator (Rosetta) with Xcode 14.3, MacBook Pro M2 Max :/

same issue here, on xcode15 simulators, makes it almost impossible to test on simulator, has anyone filed a FB? im going to

Filed FB12258036

  • my issue is combination of Xcode 14.3 + iOS 16.4 simulator. Works fine for Xcode 14.3 + iOS 16.0 simulators.

Add a Comment

my issue is combination of Xcode 14.3 + iOS 16.4 simulator. Works fine for Xcode 14.3 + iOS 16.0 simulators. — jainygaurav less than a minute ago

Noticing this issue in iOS 17 using the Xcode 15 Beta as well.

Remove arm64 from excluded archs of your project build setting. Apple is no longer fixing x86_64 simulator issues.

  • i have nothing in my Excluded Archs field in build settings :( so i dont think thats it.

  • At least on our team that's what worked for all our devs using M1 MacBook Pros running macOS Ventura.

Add a Comment

When running an app from a build with NativeScript the TextField character inputs have the final character removed when using a simulator. I tried all of the suggested resolutions, but the problem hasn't been resolved. There are some workarounds on the javascript side, but it would be preferable if this was fixed by Apple.

Noticing this issue in iOS 17 Simulator using the Xcode 15 official release. Come on Apple! This is beyond ridiculous.

I had a fix using a debounce in Nativescript, but it fails to resolve the issue on the simulator. When I attempted to disable x86 architecture in the POD file, the build fails with a code of 65.