Having an issue running any app with Xcode 12 on a physical device (device running 14.0.1)
Starting with a new project, the simple Hello World app will not launch on my device while connected to Xcode.
The screen remains black with the white bottom home bar showing. Xcode shows app is running, no warnings, no errors.
struct ContentView: View {
var body: some View {
Text("Hello, world!").foregroundColor(.red)
.padding()
.onAppear {
print("Working....")
}
}
}
It works fine on the simulator, and thus prints out the debug text.
But, on my device, I do not get the debug text - so the launch process has failed.
However, if I stop the project on Xcode and then run the installed app on my device the app runs as expected!!
I changed the font color a couple of times, and it correctly installs the app to the device but fails to run when connected to Xcode, but works when running the app on the phone
I unpaired my device that didn't help.
No sure what to try next...
Thanks for any suggestions
I pass on this solution, which fixed this issue for me:
Of course, it probably helps to be on the latest Xcode (12.0.1 as of writing) for this.