We are seeing the same error message as @marioguzman. Info.plist contains WKApplication key entry set to YES in addition we have the Info.plist from the WatchExtension where the WKExtensionDelegateClassName is set with the value set to $(PRODUCT_MODULE_NAME).ExtensionDelegate.
The ExtensionDelegate looks as follows:
import SwiftUI
// ScenePhase observation doesn't work reliably
// https://developer.apple.com/forums/thread/650632
// Implement custom appDelegate and notiy about lifecycle changes
@main
class ExtensionDelegate: NSObject, WKApplicationDelegate {
func applicationWillEnterForeground() {
NotificationCenter.default.post(name: Notification.Name.willEnterForeground, object: nil, userInfo: nil)
}
func applicationDidEnterBackground() {
NotificationCenter.default.post(name: Notification.Name.didEnterBackground, object: nil, userInfo: nil)
}
}
And the watch app crashes at the @main with
Watch[71777:6577905] [default] -[SPRemoteInterface createViewController:className:properties:contextID:info:gestureDescriptions:clientIdentifier:interfaceControllerCreationCompletion:]:3230: Critical failure. Simulating crash: Condition failed:"NO". Couldn't instantiate class _TtC15Watch_Extension17HostingController
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: