Crash with XCode 11.3, Simulator iPhone X with iOS 13.2.2 & Apple Watch 42mm with watchOS 4.2

Viewed 138

Getting crash for Apple Watch 1

dyld: lazy symbol binding failed: Symbol not found: _WKExtensionMain
 Referenced from: /Users/User/Library/Developer/CoreSimulator/Devices/8C1ABCBE-4C0B-47BE-8169-0278C2BE766B/data/Containers/Bundle/Application/B0118FCC-A517-4339-8166-65A7D0D33217/Watch.app/PlugIns/Watch Extension.appex/Watch Extension
 Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS 4.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/WatchKit.framework/WatchKit

dyld: Symbol not found: _WKExtensionMain
 Referenced from: /Users/User/Library/Developer/CoreSimulator/Devices/8C1ABCBE-4C0B-47BE-8169-0278C2BE766B/data/Containers/Bundle/Application/B0118FCC-A517-4339-8166-65A7D0D33217/Watch.app/PlugIns/Watch Extension.appex/Watch Extension
 Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS 4.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/WatchKit.framework/WatchKit

Same code for Apple Watch 2, 3, 4, 5 working fine

Thank you for your help

2 Answers

Release note of Xcode 11 says:

The WatchKit framework is no longer included in the iOS SDK. If you’re using WatchKit APIs from iOS, you need to remove this use. The WatchKit framework remains available on watchOS. If you’re using WatchKit APIs from iOS to infer availability of features on the paired Apple Watch, include information about your use case when you submit feedback to Feedback Assistant. (49707950)

https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes

You can change build setting to legacy for this to work for now.

PS: legacy settings are deprecated in Xcode 12b2

https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes

I would recommend you to not use legacy build settings. You're missing many features from new build system, also its being deprecated in upcoming Xcode version

Related