App crashes when trying to run widget extension - M1 Mac with Rosetta

I have a Xcode project with a widget extension, Xcode, simulator and terminal are running with Rosetta (I can't change this).

When I build and run the main project, the widget does not get loaded on the widgets list, when running the widget scheme on Xcode the app crashes when loading the application on simulator. Same happens on device.

Macs with Intel silicon run it okay. Xcode without rosetta is also okay.

Xcode log window shows the following message:

SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'Gabriel.Widget-Rosetta.Widget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)}." UserInfo={NSLocalizedDescription=Failed to show Widget 'Gabriel.Widget-Rosetta.Widget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)}., NSUnderlyingError=0x600001106010 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)}}}

Domain: DTXMessage

Code: 1

User Info: {

    DVTErrorCreationDateKey = "2022-07-06 14:45:31 +0000";

}

--

System Information

macOS Version 12.2.1 (Build 21D62)
Xcode 13.2.1 (19586) (Build 13C100)
Timestamp: 2022-07-06T15:45:31+01:00

Console shows the following message:

libc++abi: terminating with uncaught exception of type NSException

dyld4 config: DYLD_FRAMEWORK_PATH=/Users/gabriel.soria/DD/Widget-Rosetta-bhlamdqmnxdfvtapitjtbxxspnfc/Build/Products/Debug-iphonesimulator DYLD_LIBRARY_PATH=/Users/gabriel.soria/DD/Widget-Rosetta-bhlamdqmnxdfvtapitjtbxxspnfc/Build/Products/Debug-iphonesimulator DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_NSXPCDistantObject ___nsx_pingHost:]: unrecognized selector sent to instance 0x600003948aa0'

_LSContextInitReturningError() failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0xf6701f12 bb1a56bb bba5f39f 3f7801a6 ... f9fe6ee0 ef307d24 }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0x9da4b2b1 56f7ac19 1a99bc21 b7ec95c2 ... c4004d14 03ef83dc }}

terminating with uncaught exception of type NSException

CoreSimulator 783.5 - Device: iPhone SE (2nd generation) (E360DB1E-33FF-45A4-926C-A6093DFB3699) - Runtime: iOS 15.2 (19C51) - DeviceType: iPhone SE (2nd generation)

Accepted Reply

Update on this Q: Apple replied to a feedback I opened saying Xcode does not have official support for Rosetta. I had no option but to put an enormous effort into adding support to Apple Silicon Macs. Thanks, Apple.

Replies

Update on this Q: Apple replied to a feedback I opened saying Xcode does not have official support for Rosetta. I had no option but to put an enormous effort into adding support to Apple Silicon Macs. Thanks, Apple.