簡體   English   中英

XCode 11.3、模擬器 iPhone X 與 iOS 13.2.2 和 Apple Watch 42mm 與 watchOS 4.2 崩潰

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

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

Apple Watch 2、3、4、5 的相同代碼工作正常

謝謝您的幫助

Xcode 11 的發行說明說:

WatchKit 框架不再包含在 iOS SDK 中。 如果您使用 iOS 中的 WatchKit API,則需要刪除此使用。 WatchKit 框架在 watchOS 上仍然可用。 如果您使用 iOS 中的 WatchKit API 來推斷配對 Apple Watch 上功能的可用性,請在向反饋助手提交反饋時包含有關您的用例的信息。 (49707950)

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

您可以將構建設置更改為舊版,以便現在可以使用。

PS:Xcode 12b2 中不推薦使用舊設置

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

我建議您不要使用舊版構建設置。 您缺少新構建系統的許多功能,並且在即將推出的 Xcode 版本中已棄用

將構建設置中的__WKEXTENSIONMAIN_LEGACY_TARGET_5_3設置為legacy ,如 Xcode 發行說明中所述: https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM