-1

I created a fresh app in Xcode 12.5 using the template:
watchOS > iOS App with Watch App > SwiftUI, SwiftUI App

When selecting the brand new ContentView and starting the preview I get the following error:

HumanReadableNSError: The run destination iPhone 12 Pro Max is not valid for Running the scheme 'MYAPP WatchKit App'.

IDEFoundationErrorDomain (1):

Cleaning the build folder and restarting Xcode did not help.

What does it mean? How to resolve it?

de.
  • 7,068
  • 3
  • 40
  • 69

2 Answers2

1

The same "HumanReadableNSError: The run destination iPhone 12 Pro Max is not valid for Running the scheme..." error message appeared when I built and ran a fresh watch template project. The scheme selected was the WatchKit App variety also.

Selecting the iPhone scheme subsequently allows ContentView.swift to be previewed on the iPhone simulator. Additionally, selecting the ContentView.swift in the WatchKit Extension folder will preview the code on the Watch simulator. Both of these previews are launched in the canvas preview.

This behaviour seems intuitive when you consider that the iPhone companion app will potentially contain more content than will fit on the Watch counterpart.

IceMan
  • 71
  • 1
  • 4
0

I found a workaround:

In the 'Scheme'-selector at the top of the Xcode-Window, select the iPhone app instead of the Watch App.

enter image description here

de.
  • 7,068
  • 3
  • 40
  • 69