Xcode 12.1 on Device Previews and running the app on an iPhone does not work

Hi,
I am running macOS Big Sur developer beta 9 and Xcode 12.1.
I can't test my app on an iPhone. The Swift UI Preview On Device also does not work. My iPhone is running iOS 14.2 beta 4.

I have signed in using my Apple ID to create a signing profile so that I can side load an app to my device.

When I try to build and run on phone by choosing the destination as my iPhone, it gives me an error that it can't connect to the device and ask me to reconnect it which I did and it doesn't work. Restarted the Mac and iPhone and it still doesn't work.

When I try to run a SwiftUI preview on Device, it gives me the following error.

Code Block
FailedToConnectToDTServiceHubError: Cannot connect to Jainam Shah
Try disconnecting and reconnecting the device.
Jainam Shah {
}

Is there anything I am missing or doing wrong or is it just beta life ? Also how do I achieve the preview on device or side loading the app wirelessly!!

Thanks

I'm having the same issue on MacOS 10.15.7 and Xcode 12.4. For some reason, the SwiftUI previews won't work in any projects. Each time I resume preview, no matter what device is currently selected, I get the following error:
Code Block
FailedToConnectToDTServiceHubError: Cannot connect to iPhone 12
Try disconnecting and reconnecting the device.
iPhone 12 {}


Did you manage to solve your problem @jainam26 ?

Sorry to hear you are having problems getting previews working. Best next step will be to file a feedback with diagnostics. We will need the diagnostics Xcode Previews generates in order to make sure we understand the error the previews system is encountering.

  1. When you get an error in Xcode Previews, an error banner appears in the canvas
  2. Click the "Diagnostics" button in that banner
  3. In the sheet that appears, click "Generate Report" in the bottom left of the sheet
  4. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)
Xcode 12.1 on Device Previews and running the app on an iPhone does not work
 
 
Q