0

This is my preview code:

struct MyPreview: PreviewProvider {
    static var previews: some View {
        if #available(iOSApplicationExtension 16.0, *) {
            if #available(watchOS 9.0, *) {
                MonthCheckerWidgetView(entry: LastMonthEntry(date: Date(), month: MockMonth()))
                    .previewContext(WidgetPreviewContext(family: .accessoryRectangular))
            } else {
                // Fallback on earlier versions
            }
        } else {
            // Fallback on earlier versions
        }
    }
}

and this is an error:

HumanReadableNSError: Request to launch pl.blueworld.fieldservice.watch.extension failed.

com.apple.dt.deviceprocesscontrolservice (2):
==NSLocalizedFailureReason: The request to open "pl.blueworld.fieldservice.watch.extension" failed. : Failed to launch process with bundle identifier 'pl.blueworld.fieldservice.watch.extension'.

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

|  HumanReadableNSError: The request to open "pl.blueworld.fieldservice.watch.extension" failed.
|  
|  FBSOpenApplicationServiceErrorDomain (1):
|  ==FBSOpenApplicationRequestID: 0xeb91
|  ==NSLocalizedFailureReason: The request was denied by service delegate (IOSSHLMainWorkspace) for reason: Unspecified ("Dropping last assertion").
|  ==BSErrorCodeDescription: RequestDenied
|  
|  ==================================
|  
|  |  HumanReadableNSError: The operation couldn’t be completed. Dropping last assertion
|  |  
|  |  FBSOpenApplicationErrorDomain (1):
|  |  ==BSErrorCodeDescription: Unspecified
|  |  ==NSLocalizedFailureReason: Dropping last assertion

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

|  MessageSendFailure: Message send failure for launch agent

When I launch this on my Watch, it launches successfully, but cannot add my complication, for example .accessoryRectangular which is displayed on iOS very correctly. How can I do the same on watchOS? Am I missing something?

This is an preview error:

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358

0 Answers0