-1

I'm new to Swift and Xcode and have been having issues previewing projects on my connected device (iPhone 13). I'm able to preview just fine in the simulator, the issue seems to be working with the connected device. I've seen several different errors, but the general/most common error is "Cannot preview in this file" with the following diagnostics:

RemoteHumanReadableError: The operation couldn’t be completed. Transaction failed. Process failed to launch. (process launch failed)

BSTransactionError (1):
==error-reason: process launch failed
==NSLocalizedFailureReason: Transaction failed. Process failed to launch. (process launch failed)
==transaction: <FBApplicationProcessLaunchTransaction: 0x283f607e0>
==error-description: Process failed to launch.

==================================

|  MessageSendFailure: Message send failure for <ServiceMessage 13: relaunch>

This issue seems to be related to this open question, but is a slightly different error.

I've tried:

  • Deleting the DerivedData
  • Unchecking "Automatically Refresh Canvas"
  • Restarting my Mac
  • Installing the newest version of Xcode (v14.0) from the developer site (14A309)
  • Installing the newest version of iOS (v16.0)
  • Cleaning the build folder
  • Opening new projects with unit tests disabled (currently testing with the default contents of a new project, so it's nothing in my code specifically that's breaking things)
  • Getting in touch with Apple's developer support team (still waiting to hear back...)

Anything I'm missing?

gclarke
  • 21
  • 2
  • I think I’ve seen 3-4 questions that are very similar. Try Xcode RC from the developer site. I had that installed before the App Store version and I can’t reproduce the issue. – lorem ipsum Sep 13 '22 at 21:30
  • I just downloaded a fresh copy of Xcode from the developer site yesterday and still see the same errors – gclarke Sep 13 '22 at 22:14

1 Answers1

2

I discovered that opening my app as an application on iOS (versus seeing the preview within the Xcode Previews application) triggers the untrusted developer dialog.

Configuring my phone to trust my developer account resolved the issue, under Settings > General > VPN & Device Management > [my developer account]

gclarke
  • 21
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Vikram Parimi Sep 17 '22 at 18:36