0

I'm trying to preview my widget I've made in Xcode, and I'm getting the following error:

RemoteHumanReadableError

ProcessError: Failed to launch widget extension: The operation couldn’t be completed. (CHSErrorDomain error 1300.)

I can't find anything on the internet related to it at all, so I've come here. Any help will be appreciated.

I've tried rebooting, restarting & cleaning the Xcode build folder and using DevCleaner to clean ALL of Xcode's cache

Update: This only will happen if I have my .previewContext(WidgetPreviewContext(family: .systemSmall)) added to my preview. If I don't, it builds perfectly.

Lemon
  • 1,184
  • 11
  • 33

3 Answers3

3

I ended up solving this by editing my Build Phases settings.

Your Project > <Widget Extension> > Build Phases > Embed App Extensions > Unchecked 'copy only when installing'

Went back to previews and they loaded no trouble.

Lemon
  • 1,184
  • 11
  • 33
2

I had this issue and it was fixed by disabling Xcode rosetta mode.

Mohamed Shaban
  • 2,263
  • 1
  • 15
  • 23
0

I came across this problem either and solved it in other ways. I created a new scheme, and selected the widget extension as its target. After selecting this scheme as current scheme, I retried preview and it worked.

Dharman
  • 30,962
  • 25
  • 85
  • 135