SwiftUI iOS 14 beta TextField 100% CPU

Using iOS 14 and Xcode 12.0 beta 6 if I try and use a simple TextField anywhere

Code Block
import SwiftUI
struct ContentView: View {
  @State private var name: String = "Tim"
  var body: some View {
    VStack {
      TextField("Enter your name", text: $name)
      Text("Hello, \(name)!")
    }
  }
}

the keyboard opens but then the CPU goes to 99%/100% and app is frozen.

Is this a known issue? How do I fix it?

Same behaviour in iOS 14 GM Version. CPU Usage goes up to 100% the moment you tap the Textfield and the Keyboard opens. It stays at 100% even after you closed the keyboard and navigated to different views.
I have the same problem in my app. Was working fine before 14.0. Now it's not a 100% of the time, but around 30-40% of the time the CPU usage goes to 100% when I tap on the textfield, making my app unusable.
Not sure if this adds more context, but I have a TabView, which contains a NavigationView, which contains a view with a TextField. The CPU usage seems to go down when switching to a different tab, but within the same tab, the CPU stays at 100% indefinitely, causing the phone to burn up. This only happens the first time I bring the keyboard up after launching the app.
We have this same issue in our application as well. It's a swiftUI app with a TextField and we see the hang whenever the user taps the TextField and brings up a keyboard.


We have verified that in iOS 13 the behavior is not there.
In iOS 14.2 beta the behavior seems to be fixed.
But in iOS 14 and 14.0.1 we are seeing 100% CPU and memory allocations increasing in some sort of busy loop.

We have a very similar layout to a previous comment:

Not sure if this adds more context, but I have a TabView, which contains a NavigationView, which contains a view with a TextField.

We have a TabView hosting a UISplitViewController hosting a UINavigationController hosting a UIHostingController with a ListView ultimately containing a TextField.

Any workarounds or hints would be MUCH appreciated since this bug renders our application unusable.
same problem here
After doing a lot of digging - it seems like some issue with the tab view and keyboard. When I first click on a keyboard, the onAppear method of every single view contained within the tab view is called, which leads me to think that there is some bug, which tries to render every view in the tab view at the same time when the keyboard is brought up, causing some weird loop.

I tried changing the TabView to use        

.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
.ignoresSafeArea(.all, edges: .bottom)

the problem does not happen anymore. However, this changes the animation for navigation links inside the tab view, which kind of sucks.
Just an update: Same behavior/bug in release version of iOS 14.2
So far we could not find any working fix for this. I think this really is a major/ciritical bug as users are wondering why their phones are getting really hot and the battery is draining like crazy :/
Also just an update. The problem still exists in IOS 14.3. Any news when this will be fixed, since it really renders even a simple app unusable.
Exists in iOS 14.4 as well
Same problem here. It occurs intermittently.
I'm seeing this same issue. My MacBook Pro fan goes crazy whenever the simulator starts up and runs my apps. Similarly, when I test on an actual device, my iPhone gets hot.

I live in Arizona and summer is coming. This sort of bug will make it impossible for me to hold my burning-hot laptop. : )

I'll submit a Feedback. Hopefully you all will too so this gets Apple's attention.
SwiftUI iOS 14 beta TextField 100% CPU
 
 
Q